aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/hicn/base/test/test-loop.cc
diff options
context:
space:
mode:
authorEnrico Loparco (eloparco) <eloparco@cisco.com>2021-03-30 17:44:30 +0200
committerEnrico Loparco (eloparco) <eloparco@cisco.com>2021-03-30 17:44:30 +0200
commitf309c4aab4475f5511d00bc236e1f78a457693ed (patch)
tree9c37b91483c3412801cd632f8edcd22fe2cfeebf /hicn-light/src/hicn/base/test/test-loop.cc
parenta5a6ffb506aa3c2a0c7fe8fd09abf3f737984aa5 (diff)
[HICN-555] Fix loop data structure and khash initializations
Signed-off-by: Enrico Loparco (eloparco) <eloparco@cisco.com> Change-Id: I496315ede9b9e9ee2aed79a697e217b8c8b1c211
Diffstat (limited to 'hicn-light/src/hicn/base/test/test-loop.cc')
-rw-r--r--hicn-light/src/hicn/base/test/test-loop.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/hicn-light/src/hicn/base/test/test-loop.cc b/hicn-light/src/hicn/base/test/test-loop.cc
index 44684ef0e..c86ccd5e6 100644
--- a/hicn-light/src/hicn/base/test/test-loop.cc
+++ b/hicn-light/src/hicn/base/test/test-loop.cc
@@ -175,15 +175,10 @@ class LoopTest : public ::testing::Test {
char buffer[BUFFER_SIZE];
};
-TEST_F(LoopTest, LoopCreate)
+TEST_F(LoopTest, LoopCreateAndFree)
{
loop_ = loop_create();
EXPECT_TRUE(loop_ != NULL);
-}
-
-TEST_F(LoopTest, LoopFree)
-{
- loop_ = loop_create();
loop_free (loop_);
EXPECT_TRUE(loop_ != NULL);
}
@@ -205,7 +200,7 @@ TEST_F(LoopTest, EventCreateAndFree)
EXPECT_TRUE(ret >= 0);
// Unregister the event
- ret = loop_event_unregister(event_);
+ ret = loop_event_free(event_);
EXPECT_TRUE(ret >= 0);
// Free event loop
@@ -239,8 +234,8 @@ TEST_F(LoopTest, TimerCreateAndCancel)
loop_undispatch(loop_);
// Unregister the events
- ret = loop_event_unregister(timer_);
- ret += loop_event_unregister(timer2);
+ ret = loop_event_free(timer_);
+ ret += loop_event_free(timer2);
EXPECT_TRUE(ret >= 0);
// Free event loop