Update wapp array C API

This commit is contained in:
2025-12-07 21:56:16 +00:00
committed by Abdelrahman Said
parent 551836d4c8
commit 2b49bfcdbf
10 changed files with 365 additions and 3991 deletions

View File

@@ -615,11 +615,11 @@ TestFuncResult test_str8_join(void) {
TestFuncResult test_str8_from_bytes(void) {
b8 result;
Str8 str = wapp_str8_buf(1024);
U8Array bytes = wapp_u8_array('W', 'A', 'P', 'P');
wapp_str8_from_bytes(&str, &bytes);
Str8 str = wapp_str8_buf(1024);
u8 *bytes = wapp_array(u8, 'W', 'A', 'P', 'P');
wapp_str8_from_bytes(&str, bytes);
result = str.size == bytes.count * bytes.item_size;
result = str.size == wapp_array_count(u8, bytes) * wapp_array_item_size(u8, bytes);
result = result && wapp_str8_equal(&str, &wapp_str8_lit_ro("WAPP"));
return wapp_tester_result(result);