tests/test_printf.c

changeset 951
8f6d6556380a
parent 890
54565fd74e74
child 956
abd60ccd74f7
equal deleted inserted replaced
950:37e7f92de46b 951:8f6d6556380a
177 cx_testing_allocator_init(&talloc); 177 cx_testing_allocator_init(&talloc);
178 CxAllocator *alloc = &talloc.base; 178 CxAllocator *alloc = &talloc.base;
179 179
180 const char *h = "Hello"; 180 const char *h = "Hello";
181 181
182 int const specimen_count = 13; 182 cxmutstr r[13];
183 cxmutstr r[specimen_count]; 183 size_t specimen_count = cx_nmemb(r);
184 int specimen = 0; 184 int specimen = 0;
185 185
186 CX_TEST_DO { 186 CX_TEST_DO {
187 r[specimen] = cx_asprintf_a(alloc, "teststring"); 187 r[specimen] = cx_asprintf_a(alloc, "teststring");
188 CX_TEST_ASSERT(r[specimen].length == 10); 188 CX_TEST_ASSERT(r[specimen].length == 10);

mercurial