diff options
Diffstat (limited to 'common/test/test_session_table.cpp')
| -rw-r--r-- | common/test/test_session_table.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/common/test/test_session_table.cpp b/common/test/test_session_table.cpp index a804dc0..16849b8 100644 --- a/common/test/test_session_table.cpp +++ b/common/test/test_session_table.cpp @@ -3,6 +3,9 @@ #include "tfe_session_table.h" +bool g_print_to_stderr = true; +void * g_packet_io_logger = NULL; + TEST(STREAM_TABLE, INSERT) { // TEST Create @@ -48,10 +51,10 @@ TEST(STREAM_TABLE, SEARCH_BY_ID) struct session_node *node = NULL; node = session_table_search_by_id(table, 1); EXPECT_TRUE(node != nullptr); - EXPECT_STREQ((const char *)node->value, "HELLO"); + EXPECT_STREQ((const char *)node->val_data, "HELLO"); node = session_table_search_by_id(table, 2); EXPECT_TRUE(node != nullptr); - EXPECT_STREQ((const char *)node->value, "WORLD"); + EXPECT_STREQ((const char *)node->val_data, "WORLD"); node = session_table_search_by_id(table, 3); EXPECT_TRUE(node == nullptr); @@ -80,10 +83,10 @@ TEST(STREAM_TABLE, SEARCH_BY_ADDR) struct session_node *node = NULL; node = session_table_search_by_addr(table, &addr1); EXPECT_TRUE(node != nullptr); - EXPECT_STREQ((const char *)node->value, "HELLO"); + EXPECT_STREQ((const char *)node->val_data, "HELLO"); node = session_table_search_by_addr(table, &addr2); EXPECT_TRUE(node != nullptr); - EXPECT_STREQ((const char *)node->value, "WORLD"); + EXPECT_STREQ((const char *)node->val_data, "WORLD"); node = session_table_search_by_addr(table, &addr3); EXPECT_TRUE(node == nullptr); @@ -115,10 +118,10 @@ TEST(STREAM_TABLE, SEARCH_BY_REVERSE_ADDR) struct session_node *node = NULL; node = session_table_search_by_addr(table, &addr1_reverse); EXPECT_TRUE(node != nullptr); - EXPECT_STREQ((const char *)node->value, "HELLO"); + EXPECT_STREQ((const char *)node->val_data, "HELLO"); node = session_table_search_by_addr(table, &addr2_reverse); EXPECT_TRUE(node != nullptr); - EXPECT_STREQ((const char *)node->value, "WORLD"); + EXPECT_STREQ((const char *)node->val_data, "WORLD"); // TEST Destory session_table_destory(table); |
