Migrate C++ array API
This commit is contained in:
@@ -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");
|
||||
Str8Array array = wapp_str8_array(str1, str2, str3);
|
||||
Str8 *array = wapp_array(Str8, str1, str2, str3);
|
||||
|
||||
result = array.count == 3 && array.capacity == 8;
|
||||
result = wapp_array_count(Str8, array) == 3 && wapp_array_capacity(Str8, array) == 8;
|
||||
|
||||
Str8 *item;
|
||||
u64 count = array.count;
|
||||
u64 count = wapp_array_count(Str8, array);
|
||||
u64 index = 0;
|
||||
b8 running = true;
|
||||
while (running) {
|
||||
item = wapp_str8_array_get(&array, index);
|
||||
item = wapp_array_get(Str8, array, index);
|
||||
result = result && item && (wapp_str8_equal(item, &expected[index]));
|
||||
|
||||
++index;
|
||||
|
||||
Reference in New Issue
Block a user