.
This commit is contained in:
parent
95d74c2ef4
commit
a66e58193f
25 changed files with 2600 additions and 93 deletions
12
tests/string_tests.c
Normal file
12
tests/string_tests.c
Normal 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);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue