aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Mantellini <angelo.mantellini@cisco.com>2020-09-18 15:22:20 +0200
committerAngelo Mantellini <angelo.mantellini@cisco.com>2020-09-18 15:22:20 +0200
commit7d1d3c33387effd7baa91c55dfc1bd711fd4ffe1 (patch)
tree03c1dd3873141f6f02892fa1dc3d41ba1ce0b765
parent351bac0bbba54bf3e44f89b13edd4df80831fedf (diff)
[HICN-636] correct bitmap test
Signed-off-by: Angelo Mantellini <angelo.mantellini@cisco.com> Change-Id: Id5ffd685ad23530bb93011c1639920faea45639a
-rw-r--r--hicn-light/src/hicn/base/test/test-bitmap.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/hicn-light/src/hicn/base/test/test-bitmap.cc b/hicn-light/src/hicn/base/test/test-bitmap.cc
index 4aee8a13f..e7ff7044a 100644
--- a/hicn-light/src/hicn/base/test/test-bitmap.cc
+++ b/hicn-light/src/hicn/base/test/test-bitmap.cc
@@ -54,10 +54,10 @@ class BitmapTest : public ::testing::Test {
TEST_F(BitmapTest, BitmapSet)
{
bitmap_set(bitmap, 20);
- EXPECT_TRUE(bitmap_is_set(bitmap, 20) == true);
- EXPECT_TRUE(bitmap_is_unset(bitmap, 20) == false);
- EXPECT_TRUE(bitmap_is_set(bitmap, 19) == false);
- EXPECT_TRUE(bitmap_is_unset(bitmap, 19) == true);
+ EXPECT_TRUE(bitmap_is_set(bitmap, 20));
+ EXPECT_FALSE(bitmap_is_unset(bitmap, 20));
+ EXPECT_FALSE(bitmap_is_set(bitmap, 19));
+ EXPECT_TRUE(bitmap_is_unset(bitmap, 19));
}
@@ -65,19 +65,19 @@ TEST_F(BitmapTest, BitmapUnSet) {
bitmap_set(bitmap, 20);
bitmap_set(bitmap, 19);
bitmap_unset(bitmap, 20);
- EXPECT_TRUE(bitmap_is_set(bitmap, 20) == false);
- EXPECT_TRUE(bitmap_is_unset(bitmap, 20) == true);
- EXPECT_TRUE(bitmap_is_set(bitmap, 19) == true);
- EXPECT_TRUE(bitmap_is_unset(bitmap, 19) == false);
+ EXPECT_FALSE(bitmap_is_set(bitmap, 20));
+ EXPECT_TRUE(bitmap_is_unset(bitmap, 20));
+ EXPECT_TRUE(bitmap_is_set(bitmap, 19));
+ EXPECT_TRUE(bitmap_is_unset(bitmap, 19));
}
TEST_F(BitmapTest, BitmapSetTo) {
bitmap_set_to(bitmap, 40);
- EXPECT_TRUE(bitmap_is_set(bitmap, 20) == true);
- EXPECT_TRUE(bitmap_is_set(bitmap, 21) == true);
- EXPECT_TRUE(bitmap_is_unset(bitmap, 41) == true);
- EXPECT_TRUE(bitmap_is_unset(bitmap, 42) == true);
+ EXPECT_TRUE(bitmap_is_set(bitmap, 20));
+ EXPECT_TRUE(bitmap_is_set(bitmap, 21));
+ EXPECT_TRUE(bitmap_is_unset(bitmap, 41));
+ EXPECT_TRUE(bitmap_is_unset(bitmap, 42));
}
int main(int argc, char **argv)