Update C++ API

This commit is contained in:
2025-12-14 23:46:28 +00:00
parent dcadacdf2b
commit a2f42c135f
4 changed files with 104 additions and 109 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");
u8 *bytes = wapp_array(u8, 'W', 'A', 'P', 'P');
wapp_str8_from_bytes(&str, bytes);
U8Array bytes = wapp_array(u8, U8Array, 'W', 'A', 'P', 'P');
wapp_str8_from_bytes(&str, &bytes);
result = str.size == wapp_array_count(bytes) * wapp_array_item_size(bytes);
result = str.size == bytes.count * bytes.item_size;
result = result && wapp_str8_equal(&str, &expected);
return wapp_tester_result(result);