Skip to content

Commit

Permalink
fixes a bug in c-runtime-test.c
Browse files Browse the repository at this point in the history
  • Loading branch information
chibash committed Nov 13, 2024
1 parent fb90cc8 commit b02ee1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions microcontroller/core/test/c-runtime-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ static value_t gc_bytearray_set(value_t obj, value_t index, value_t new_value) {
}

void test_bytearray() {
value_t arr = gc_new_bytearray(3, 0);
value_t arr2 = gc_new_bytearray(7, 0);
value_t arr = gc_new_bytearray(true, 3, 0);
value_t arr2 = gc_new_bytearray(true, 7, 0);
for (int i = 0; i < 7; i++) {
value_t v = int_to_value(257 - i);
Assert_equals(gc_bytearray_set(arr2, int_to_value(i), v), v);
Expand Down Expand Up @@ -356,7 +356,7 @@ void test_gc_liveness() {
value_t obj, obj2, obj3;
root_set.values[0] = obj = gc_new_array2(4);
gc_new_array2(1);
gc_array_set(obj, 0, obj2 = gc_new_bytearray(8, 0));
gc_array_set(obj, 0, obj2 = gc_new_bytearray(true, 8, 0));
gc_bytearray_set(obj2, int_to_value(0), obj);
gc_new_array2(1);
gc_new_array2(1);
Expand Down Expand Up @@ -389,7 +389,7 @@ void test_gc_liveness2() {
value_t obj, obj2, obj3, obj4;
root_set.values[0] = obj = gc_new_vector2(4);
obj4 = gc_new_vector2(1);
gc_vector_setter(obj, int_to_value(0), obj2 = gc_new_bytearray(8, 0));
gc_vector_setter(obj, int_to_value(0), obj2 = gc_new_bytearray(true, 8, 0));
gc_bytearray_set_raw_word(obj2, 0, obj4);
gc_new_vector2(1);
gc_new_vector2(1);
Expand Down

0 comments on commit b02ee1e

Please sign in to comment.