hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit f13be92fae76411fdc66c4276f5c3c6c422d50e8
parent 1b6ddc406900566afe9a3b56a630acebaeb8e726
Author: Sebastian <sebastian@sebsite.pw>
Date:   Wed, 31 May 2023 01:05:30 -0400

types::c: add strings test

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mtypes/c/+test.ha | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/types/c/+test.ha b/types/c/+test.ha @@ -16,3 +16,9 @@ static assert(align(intptr) == align(uintptr)); static assert(align(ssize) == align(size)); }; + +@test fn strings() void = { + let s = fromstr("hello!"); + defer free(s); + assert(tostr(s)! == "hello!"); +};