This commit is contained in:
alessandro bason 2025-06-24 17:47:08 +02:00
parent 95d74c2ef4
commit a66e58193f
25 changed files with 2600 additions and 93 deletions

12
tests/string_tests.c Normal file
View file

@ -0,0 +1,12 @@
#include "runner.h"
#include "../str.h"
#include "../arena.h"
UNIT_TEST(str_format) {
arena_t arena = arena_make(ARENA_MALLOC, KB(1));
str_t s = str_fmt(&arena, "%d %s", 42, "test");
str_t lit = str(&arena, "42 test");
ASSERT(str_equals(s, lit));
arena_cleanup(&arena);
}