Update codegen
This commit is contained in:
@@ -438,14 +438,14 @@ TestFuncResult test_str8_split(void) {
|
||||
u64 count2 = ARRLEN(splits2);
|
||||
bool running2 = true;
|
||||
|
||||
result = list1->node_count == count1 && list1->total_size == str.size - 3;
|
||||
result = result && list2->node_count == count2 && list2->total_size == str.size - 4;
|
||||
result = list1->node_count == count1 && wapp_str8_list_total_size(list1) == str.size - 3;
|
||||
result = result && list2->node_count == count2 && wapp_str8_list_total_size(list2) == str.size - 4;
|
||||
|
||||
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
||||
// MSVC Spectre mitigation warnings
|
||||
while (running1) {
|
||||
Str8Node *node = wapp_str8_list_get(list1, index1);
|
||||
result = result && wapp_str8_equal(node->string, &(splits1[index1]));
|
||||
result = result && wapp_str8_equal(node->item, &(splits1[index1]));
|
||||
|
||||
++index1;
|
||||
running1 = index1 < count1;
|
||||
@@ -455,7 +455,7 @@ TestFuncResult test_str8_split(void) {
|
||||
// MSVC Spectre mitigation warnings
|
||||
while (running2) {
|
||||
Str8Node *node = wapp_str8_list_get(list2, index2);
|
||||
result = result && wapp_str8_equal(node->string, &(splits2[index2]));
|
||||
result = result && wapp_str8_equal(node->item, &(splits2[index2]));
|
||||
|
||||
++index2;
|
||||
running2 = index2 < count2;
|
||||
@@ -484,13 +484,13 @@ TestFuncResult test_str8_split_with_max(void) {
|
||||
u64 count = ARRLEN(splits);
|
||||
bool running = true;
|
||||
|
||||
result = list->node_count == count && list->total_size == str.size - 2;
|
||||
result = list->node_count == count && wapp_str8_list_total_size(list) == str.size - 2;
|
||||
|
||||
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
||||
// MSVC Spectre mitigation warnings
|
||||
while (running) {
|
||||
Str8Node *node = wapp_str8_list_get(list, index);
|
||||
result = result && wapp_str8_equal(node->string, &(splits[index]));
|
||||
result = result && wapp_str8_equal(node->item, &(splits[index]));
|
||||
|
||||
++index;
|
||||
running = index < count;
|
||||
@@ -530,14 +530,14 @@ TestFuncResult test_str8_rsplit(void) {
|
||||
u64 count2 = ARRLEN(splits2);
|
||||
bool running2 = true;
|
||||
|
||||
result = list1->node_count == count1 && list1->total_size == str.size - 3;
|
||||
result = result && list2->node_count == count2 && list2->total_size == str.size - 4;
|
||||
result = list1->node_count == count1 && wapp_str8_list_total_size(list1) == str.size - 3;
|
||||
result = result && list2->node_count == count2 && wapp_str8_list_total_size(list2) == str.size - 4;
|
||||
|
||||
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
||||
// MSVC Spectre mitigation warnings
|
||||
while (running1) {
|
||||
Str8Node *node = wapp_str8_list_get(list1, index1);
|
||||
result = result && wapp_str8_equal(node->string, &(splits1[index1]));
|
||||
result = result && wapp_str8_equal(node->item, &(splits1[index1]));
|
||||
|
||||
++index1;
|
||||
running1 = index1 < count1;
|
||||
@@ -547,7 +547,7 @@ TestFuncResult test_str8_rsplit(void) {
|
||||
// MSVC Spectre mitigation warnings
|
||||
while (running2) {
|
||||
Str8Node *node = wapp_str8_list_get(list2, index2);
|
||||
result = result && wapp_str8_equal(node->string, &(splits2[index2]));
|
||||
result = result && wapp_str8_equal(node->item, &(splits2[index2]));
|
||||
|
||||
++index2;
|
||||
running2 = index2 < count2;
|
||||
@@ -576,13 +576,13 @@ TestFuncResult test_str8_rsplit_with_max(void) {
|
||||
u64 count = ARRLEN(splits);
|
||||
bool running = true;
|
||||
|
||||
result = list->node_count == count && list->total_size == str.size - 2;
|
||||
result = list->node_count == count && wapp_str8_list_total_size(list) == str.size - 2;
|
||||
|
||||
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
||||
// MSVC Spectre mitigation warnings
|
||||
while (running) {
|
||||
Str8Node *node = wapp_str8_list_get(list, index);
|
||||
result = result && wapp_str8_equal(node->string, &(splits[index]));
|
||||
result = result && wapp_str8_equal(node->item, &(splits[index]));
|
||||
|
||||
++index;
|
||||
running = index < count;
|
||||
|
Reference in New Issue
Block a user