diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_fsb.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_fsb.cpp b/test/test_fsb.cpp index 473438f..c55d9cb 100644 --- a/test/test_fsb.cpp +++ b/test/test_fsb.cpp @@ -26,11 +26,11 @@ using namespace chilbert; template <typename T> int -test_fsb(const int size) +test_fsb(const T& empty_field) { - for (int i = 0; i < size; ++i) { - T field{size}; - field.reset(); + assert(empty_field.none()); + for (int i = 0; i < empty_field.size(); ++i) { + T field = empty_field; field.set(i); assert(field.fsb() == i + 1); } @@ -41,5 +41,5 @@ test_fsb(const int size) int main() { - return test_fsb<CFixBitVec>(FBV_BITS) || test_fsb<CBigBitVec>(1024); + return test_fsb(CFixBitVec{}) || test_fsb(CBigBitVec{1024}); } |