forked from github/server
update test to check more than one key and cleanup.
This commit is contained in:
parent
0189111876
commit
dbcae5484e
|
@ -7,9 +7,16 @@
|
||||||
static void test_get_set_keys(CuTest *tc) {
|
static void test_get_set_keys(CuTest *tc) {
|
||||||
attrib *a = 0;
|
attrib *a = 0;
|
||||||
key_set(&a, 42);
|
key_set(&a, 42);
|
||||||
|
key_set(&a, 43);
|
||||||
|
key_set(&a, 44);
|
||||||
CuAssertTrue(tc, key_get(a, 42));
|
CuAssertTrue(tc, key_get(a, 42));
|
||||||
|
CuAssertTrue(tc, key_get(a, 43));
|
||||||
|
CuAssertTrue(tc, key_get(a, 44));
|
||||||
key_unset(&a, 42);
|
key_unset(&a, 42);
|
||||||
CuAssertTrue(tc, !key_get(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)
|
CuSuite *get_key_suite(void)
|
||||||
|
|
Loading…
Reference in New Issue