From 6fbae842769ade6fbb6f77e53049ee06411e2d1a Mon Sep 17 00:00:00 2001 From: Navid Samanghoon Date: Mon, 13 Oct 2025 12:34:44 +0200 Subject: fix(test): the test used an unstable sorting algorithm, which caused insertion sort to fail on duplicates. This has been fixed now. --- src/insertion_sort.s | 2 +- test/test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/insertion_sort.s b/src/insertion_sort.s index 359e39f..ed4ade2 100644 --- a/src/insertion_sort.s +++ b/src/insertion_sort.s @@ -69,4 +69,4 @@ done: pop %r10 pop %r9 pop %r8 - ret \ No newline at end of file + ret diff --git a/test/test.sh b/test/test.sh index ec9d65c..855d6cf 100755 --- a/test/test.sh +++ b/test/test.sh @@ -3,7 +3,7 @@ TEST_INPUT="numbers.txt" SORTER="./sorter" -REF="sort -n -k 2" +REF="sort -s -n -k 2" SORTER_OUT="sorter_out.txt" REF_OUT="ref_output.txt" -- cgit v1.2.3-70-g09d2