Arrays without code generation (#6)

Co-authored-by: Abdelrahman Said <said.abdelrahman@flawlessai.com>
Reviewed-on: #6
Co-authored-by: Abdelrahman <said.abdelrahman89@gmail.com>
Co-committed-by: Abdelrahman <said.abdelrahman89@gmail.com>
This commit is contained in:
2025-12-14 01:47:43 +00:00
committed by Abdelrahman Said
parent 331f7e5e4e
commit de9ce5791a
40 changed files with 581 additions and 4796 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(bytes) * wapp_array_item_size(bytes);
result = result && wapp_str8_equal(&str, &wapp_str8_lit_ro("WAPP"));
return wapp_tester_result(result);

View File

@@ -617,10 +617,10 @@ TestFuncResult test_str8_from_bytes(void) {
Str8 str = wapp_str8_buf(1024);
Str8 expected = wapp_str8_lit_ro("WAPP");
U8Array bytes = wapp_u8_array('W', 'A', 'P', 'P');
wapp_str8_from_bytes(&str, &bytes);
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(bytes) * wapp_array_item_size(bytes);
result = result && wapp_str8_equal(&str, &expected);
return wapp_tester_result(result);