aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_bitvec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_bitvec.cpp')
-rw-r--r--test/test_bitvec.cpp8
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));
+ }
}
}