static void test_foreach_entry_if_wildcards_table_only() { add_all_wildcards_entry(); char *user_data = xstrdup( USER_DATA ); count = 0; foreach_match_table( test_foreach_entry_if_wildcards_table_only_helper, user_data ); assert_int_equal( count, 5 ); delete_all_wildcards_entry(); XFREE( user_data ); }
static void test_foreach_entry_if_empty_table() { foreach_match_table( test_foreach_entry_if_empty_table_helper, NULL ); }
static void test_foreach_match_entry_dies_if_not_initialized() { assert_true( _match_table_head == NULL ); expect_assert_failure( foreach_match_table( test_foreach_match_entry_dies_if_not_initialized_helper, NULL ) ); }
static void test_foreach_match_entry_dies_if_function_is_null() { expect_assert_failure( foreach_match_table( NULL, NULL ) ); }
static void finalize_packetin_match_table( void ) { foreach_match_table( free_user_data_entry, NULL ); finalize_match_table(); }