From a3d8fdcb419e34e87b1f369b739c0c0d3f98d7d7 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Sat, 4 Dec 2021 14:34:06 -0600 Subject: [PATCH] fixed test cases --- tests/aoc-2021/day04.onyx | 2 +- tests/implicit_initialize_locals | 39 ++++++++------------------- tests/implicit_initialize_locals.onyx | 2 +- 3 files changed, 13 insertions(+), 30 deletions(-) diff --git a/tests/aoc-2021/day04.onyx b/tests/aoc-2021/day04.onyx index 273ce47a..ed12c761 100644 --- a/tests/aoc-2021/day04.onyx +++ b/tests/aoc-2021/day04.onyx @@ -27,7 +27,7 @@ main :: (args) => { numbers := memory.make_slice(Cell, numbers_str.count); for numbers_str.count do numbers[it] = ~~ conv.str_to_i64(numbers_str[it]); - boards := array.make(Board); + boards: [..] Board; while !io.reader_empty(^reader) { array.insert_empty(^boards, boards.count); board := ^boards[boards.count - 1]; diff --git a/tests/implicit_initialize_locals b/tests/implicit_initialize_locals index d7800aa3..93ac0daa 100644 --- a/tests/implicit_initialize_locals +++ b/tests/implicit_initialize_locals @@ -9,32 +9,15 @@ Untyped_Array { func = func[0] } } -Map([] u8, i32) { - allocator = Allocator { - data = 0xB750, - func = func[38] +[ + Map.Entry([] u8, i32) { + next = -1, + key = "Joe", + value = 12 }, - hashes = [ - -1, - -1, - -1, - 1, - -1, - -1, - -1, - -1 - ], - entries = [ - Map.Entry([] u8, i32) { - next = -1, - key = "Joe", - value = 12 - }, - Map.Entry([] u8, i32) { - next = 0, - key = "Jane", - value = 34 - } - ], - default_value = 0 -} + Map.Entry([] u8, i32) { + next = 0, + key = "Jane", + value = 34 + } +] diff --git a/tests/implicit_initialize_locals.onyx b/tests/implicit_initialize_locals.onyx index 75b6987c..60e9943b 100644 --- a/tests/implicit_initialize_locals.onyx +++ b/tests/implicit_initialize_locals.onyx @@ -18,6 +18,6 @@ main :: (args) => { people: Map(str, i32); people["Joe"] = 12; people["Jane"] = 34; - printf("{*p}\n", ^people); + printf("{*p}\n", ^people.entries); } } \ No newline at end of file -- 2.25.1