From 210705ac7940e5a959ccd6c9ab7fdbd72809e8d0 Mon Sep 17 00:00:00 2001 From: yuyi Date: Thu, 31 Oct 2024 09:45:24 +0800 Subject: [PATCH] improve fixed_array_sort_test.v --- vlib/builtin/fixed_array_sort_test.v | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vlib/builtin/fixed_array_sort_test.v b/vlib/builtin/fixed_array_sort_test.v index 994db9f3b9da36..c5a1052250740e 100644 --- a/vlib/builtin/fixed_array_sort_test.v +++ b/vlib/builtin/fixed_array_sort_test.v @@ -95,6 +95,7 @@ fn test_sorted_with_compare_1() { } return 0 }) + assert a == ['hi', '1', '5', '3']! assert b == ['1', '3', '5', 'hi']! } @@ -149,6 +150,13 @@ fn test_sorted_with_compare_2() { return compare_strings(a.s, b.s) } b := arr.sorted_with_compare(cmp) + assert arr[0].s == 'bbb' + assert arr[0].i == 100 + assert arr[1].s == 'aaa' + assert arr[1].i == 101 + assert arr[2].s == 'ccc' + assert arr[2].i == 102 + assert b[0].s == 'aaa' assert b[0].i == 101 assert b[1].s == 'bbb'