Restore array structs but with no codegen (#7)

Reviewed-on: #7
This commit was merged in pull request #7.
This commit is contained in:
2025-12-14 23:48:13 +00:00
parent 056dbbf3d7
commit efadbf5fc2
12 changed files with 379 additions and 434 deletions

View File

@@ -10,16 +10,16 @@ TestFuncResult test_str8_array(void) {
Str8 str1 = wapp_str8_lit("Hello");
Str8 str2 = wapp_str8_lit("Hi");
Str8 str3 = wapp_str8_lit("Bye");
Str8 *array = wapp_array(Str8, str1, str2, str3);
Str8Array array = wapp_array(Str8, Str8Array, str1, str2, str3);
result = wapp_array_count(array) == 3 && wapp_array_capacity(array) == 8;
result = array.count == 3 && array.capacity == 8;
Str8 *item;
u64 count = wapp_array_count(array);
u64 count = array.count;
u64 index = 0;
b8 running = true;
while (running) {
item = wapp_array_get(Str8, array, index);
item = wapp_array_get(Str8, &array, index);
result = result && item && (wapp_str8_equal(item, &expected[index]));
++index;