Exemplo n.º 1
0
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 );
}
Exemplo n.º 2
0
static void
test_foreach_entry_if_empty_table() {
  foreach_match_table( test_foreach_entry_if_empty_table_helper, NULL );
}
Exemplo n.º 3
0
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 ) );
}
Exemplo n.º 4
0
static void
test_foreach_match_entry_dies_if_function_is_null() {
  expect_assert_failure( foreach_match_table( NULL, NULL ) );
}
Exemplo n.º 5
0
static void
finalize_packetin_match_table( void ) {
  foreach_match_table( free_user_data_entry, NULL );
  finalize_match_table();
}