Migrate C++ array API

This commit is contained in:
2025-12-14 00:36:59 +00:00
parent d0b332dcdf
commit 217382b3cb
5 changed files with 143 additions and 130 deletions

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(u8, bytes) * wapp_array_item_size(u8, bytes);
result = result && wapp_str8_equal(&str, &expected);
return wapp_tester_result(result);