update test to check more than one key and cleanup.

This commit is contained in:
Enno Rehling 2016-02-09 06:45:28 +01:00
parent 0189111876
commit dbcae5484e
1 changed files with 7 additions and 0 deletions

View File

@ -7,9 +7,16 @@
static void test_get_set_keys(CuTest *tc) {
attrib *a = 0;
key_set(&a, 42);
key_set(&a, 43);
key_set(&a, 44);
CuAssertTrue(tc, key_get(a, 42));
CuAssertTrue(tc, key_get(a, 43));
CuAssertTrue(tc, key_get(a, 44));
key_unset(&a, 42);
CuAssertTrue(tc, !key_get(a, 42));
CuAssertTrue(tc, key_get(a, 43));
CuAssertTrue(tc, key_get(a, 44));
a_removeall(&a, NULL);
}
CuSuite *get_key_suite(void)