.
This commit is contained in:
parent
524ec0d1ce
commit
61c1060a98
16 changed files with 5043 additions and 31 deletions
11
tests/string_tests.c
Normal file
11
tests/string_tests.c
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include "runner.h"
|
||||
#include "../colla.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);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue