basic test on dynamic bitset

This commit is contained in:
buda 2015-09-27 23:05:04 +02:00
parent c155b7b77b
commit 44c9585602
7 changed files with 25 additions and 0 deletions

3
.gitignore vendored
View File

@ -2,3 +2,6 @@
.ycm_extra_conf.py
.ycm_extra_conf.pyc
*.swp
*.swo
*.out
*.dSYM/

3
test/README.md Normal file
View File

@ -0,0 +1,3 @@
# NOTE
Files with .old extension are old test files. They have to be rewritten because of changes in the appropriate project files.
bitblock.hpp is going to be replaced with the dynamic_bitset

19
test/dynamic_bitset.cpp Normal file
View File

@ -0,0 +1,19 @@
#include "catch.hpp"
#include "data_structures/bitset/dynamic_bitset.hpp"
TEST_CASE("Dynamic bitset basic functionality")
{
DynamicBitset<> db;
db.set(2222255555, 1);
bool value = db.at(2222255555, 1);
REQUIRE(value == true);
db.set(32, 1);
value = db.at(32, 1);
REQUIRE(value == true);
db.clear(32, 1);
value = db.at(32, 1);
REQUIRE(value == false);
}