tests/test_properties.c

changeset 1582
32b82c424252
parent 1570
8fd491bc2940
equal deleted inserted replaced
1581:814049fb62ee 1582:32b82c424252
669 CxMap *map = cxHashMapCreateSimple(sizeof(cxmutstr)); 669 CxMap *map = cxHashMapCreateSimple(sizeof(cxmutstr));
670 cxDefineAdvancedDestructor(map, cx_strfree_a, &talloc); 670 cxDefineAdvancedDestructor(map, cx_strfree_a, &talloc);
671 CxPropertiesStatus status = cxPropertiesLoadDefault(&talloc.base, fname, map); 671 CxPropertiesStatus status = cxPropertiesLoadDefault(&talloc.base, fname, map);
672 CX_TEST_ASSERT(status == CX_PROPERTIES_NO_ERROR); 672 CX_TEST_ASSERT(status == CX_PROPERTIES_NO_ERROR);
673 CX_TEST_ASSERT(cxMapSize(map) == 2); 673 CX_TEST_ASSERT(cxMapSize(map) == 2);
674 cxstring v1 = CX_STR("value"); 674 cxstring v1 = cx_str("value");
675 cxstring v2 = CX_STR("value2"); 675 cxstring v2 = cx_str("value2");
676 CX_TEST_ASSERT(cx_strcmp_p(cxMapGet(map, "test"), &v1) == 0); 676 CX_TEST_ASSERT(cx_strcmp_p(cxMapGet(map, "test"), &v1) == 0);
677 CX_TEST_ASSERT(cx_strcmp_p(cxMapGet(map, "test2"), &v2) == 0); 677 CX_TEST_ASSERT(cx_strcmp_p(cxMapGet(map, "test2"), &v2) == 0);
678 678
679 CX_TEST_ASSERT(cx_testing_allocator_used(&talloc)); 679 CX_TEST_ASSERT(cx_testing_allocator_used(&talloc));
680 cxMapFree(map); 680 cxMapFree(map);

mercurial