aboutsummaryrefslogtreecommitdiff
path: root/test_string.c
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2025-07-21 14:37:12 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2025-07-21 14:37:12 +0200
commit780384484cf58939f9413d644ccdd8c40cb82ae5 (patch)
treecedbd921eb07bc4a9e851c07fb312ce792868206 /test_string.c
parent88eb8c969f6abe119994c7ab307b9be58ff076a5 (diff)
feat(string): Arena base allocation for copy
Diffstat (limited to 'test_string.c')
-rw-r--r--test_string.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test_string.c b/test_string.c
index 590a30f..f62f4ab 100644
--- a/test_string.c
+++ b/test_string.c
@@ -10,10 +10,10 @@ char test_string_copy() {
Arena perm = Arena_new(128e3);
Str src = S("Hello");
- Str cpy = Str_copy(&perm, src.data, src.len);
+ Str *cpy = Str_copy(&perm, src.data, src.len);
- t_assert(Str_equals(src, cpy));
- t_assert(Arena_get_used(perm) == 5);
+ t_assert(Str_equals(src, *cpy));
+ t_assert_equal(Arena_get_used(perm), 21);
return 0;
}