tests/test_kv_list.c

changeset 1653
6a842bd49fea
parent 1605
55b13f583356
equal deleted inserted replaced
1652:db8299984bfe 1653:6a842bd49fea
590 int *y = cxMapGet(map, *key); 590 int *y = cxMapGet(map, *key);
591 CX_TEST_ASSERT(y != NULL); 591 CX_TEST_ASSERT(y != NULL);
592 CX_TEST_ASSERT(*y == 11); 592 CX_TEST_ASSERT(*y == 11);
593 593
594 // removing the element 594 // removing the element
595 CX_TEST_ASSERT(0 == cxMapRemove(map, cx_strn(key->data, key->len))); 595 CX_TEST_ASSERT(0 == cxMapRemove(map, cx_hash_key_as_string(key)));
596 key = cxKvListGetKey(list, 1); 596 key = cxKvListGetKey(list, 1);
597 CX_TEST_ASSERT(0 == cx_strcmp("efg", cx_strn(key->data, key->len))); 597 CX_TEST_ASSERT(0 == cx_strcmp("efg", cx_hash_key_as_string(key)));
598 598
599 // remove the key of element 599 // remove the key of element
600 CX_TEST_ASSERT(0 == cxKvListRemoveKey(list, 1)); 600 CX_TEST_ASSERT(0 == cxKvListRemoveKey(list, 1));
601 CX_TEST_ASSERT(NULL == cxKvListGetKey(list, 1)); 601 CX_TEST_ASSERT(NULL == cxKvListGetKey(list, 1));
602 602

mercurial