diff options
author | David Robillard <d@drobilla.net> | 2018-08-26 14:22:10 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-29 14:50:30 +0200 |
commit | 0d797734a8cc96e8db8c23372f844966603c5877 (patch) | |
tree | 6f623995279843c917ff2ef6edefd84585a0d327 | |
parent | d9fd969f60620bb7255f483d28b899af2a21ae64 (diff) | |
download | chilbert-0d797734a8cc96e8db8c23372f844966603c5877.tar.gz chilbert-0d797734a8cc96e8db8c23372f844966603c5877.tar.bz2 chilbert-0d797734a8cc96e8db8c23372f844966603c5877.zip |
Add check for zero padding to shift tests
-rw-r--r-- | test/test_bitvec.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_bitvec.cpp b/test/test_bitvec.cpp index bd944b5..581b74e 100644 --- a/test/test_bitvec.cpp +++ b/test/test_bitvec.cpp @@ -179,6 +179,10 @@ test_left_shift(Context& ctx) for (size_t i = s; i < N - s; ++i) { assert(r.test(i + s) == v.test(i)); } + + for (size_t i = 0; i < s; ++i) { + assert(!r.test(i)); + } } } @@ -194,6 +198,10 @@ test_right_shift(Context& ctx) for (size_t i = s; i < N - s; ++i) { assert(r.test(i - s) == v.test(i)); } + + for (size_t i = N - 1; i > N - s - 1; --i) { + assert(!r.test(i)); + } } } |