Add GetBit() method to Block

This commit is contained in:
Leonetienne committed 2022-05-24 23:18:39 +02:00
1 parent 6c09afefba
commit ac4b389efc
3 files changed
+29

No files matched your search

+15
View File
@@ -633,3 +633,18 @@ TEST_CASE(__FILE__"/multiple-combined-shifts-and-additions-can-be-undone", "[Blo
REQUIRE(a == initial_a);
}
// Tests that the get-bit method works
TEST_CASE(__FILE__"/get-bit", "[Block]") {
// Setup
Block a = Key::FromPassword("Halleluja");
// Exercise
std::stringstream ss;
for (std::size_t i = 0; i < 512; i++) {
ss << a.GetBit(i);
}
// Verify
REQUIRE(ss.str() == a.ToString());
}