diff --git a/test/functional/storage/BitVectorTest.cpp b/test/functional/storage/BitVectorTest.cpp index db92724fe..3e4d53235 100644 --- a/test/functional/storage/BitVectorTest.cpp +++ b/test/functional/storage/BitVectorTest.cpp @@ -510,4 +510,17 @@ TEST(BitVectorTest, Iterator) { for (auto bit : vector) { ASSERT_TRUE(bit % 2 == 0); } +} + +TEST(BitVectorTest, CompareAndSwap) { + storm::storage::BitVector vector(140); + vector.setFromInt(0, 64, 2377830234574424100); + vector.setFromInt(64, 64, 1152921504607379586); + vector.setFromInt(128, 12, 2080); + + bool result = vector.compareAndSwap(0, 68, 68); + ASSERT_FALSE(result); + + result = vector.compareAndSwap(68, 0, 68); + ASSERT_TRUE(result); } \ No newline at end of file