tests/test_properties.c

changeset 929
192a440b99df
parent 928
d2d42cb1d59e
--- a/tests/test_properties.c	Sun Oct 13 16:44:29 2024 +0200
+++ b/tests/test_properties.c	Sun Oct 13 16:47:14 2024 +0200
@@ -374,12 +374,15 @@
     cx_testing_allocator_init(&talloc);
     CxAllocator *alloc = &talloc.base;
     CX_TEST_DO {
+        char buffer[512];
+        CxProperties prop;
+        cxPropertiesInitDefault(&prop);
+        cxPropertiesUseStack(&prop, buffer, 512);
+
         const char *str = "key1 = value1\nkey2 = value2\n\n#comment\n\nkey3 = value3\n";
 
         CxMap *map = cxHashMapCreateSimple(CX_STORE_POINTERS);
         cxDefineAdvancedDestructor(map, cxFree, alloc);
-        CxProperties prop;
-        cxPropertiesInitDefault(&prop);
         CxPropertiesSink sink = cxPropertiesMapSink(map);
         sink.data = alloc; // use the testing allocator
         CxPropertiesSource src = cxPropertiesCstrSource(str);

mercurial