From 7d1d3c33387effd7baa91c55dfc1bd711fd4ffe1 Mon Sep 17 00:00:00 2001 From: Angelo Mantellini Date: Fri, 18 Sep 2020 15:22:20 +0200 Subject: [HICN-636] correct bitmap test Signed-off-by: Angelo Mantellini Change-Id: Id5ffd685ad23530bb93011c1639920faea45639a --- hicn-light/src/hicn/base/test/test-bitmap.cc | 24 ++++++++++++------------ 1 file 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) -- cgit 1.2.3-korg