diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-03-15 21:55:36 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-03-15 23:15:12 +0100 |
commit | fd2e5e7e9d216c14d78258cd3420b6225fe91b37 (patch) | |
tree | f2f2fb04e1a645a8aece5e223ebd3fdbdc637c4f /tests/custom | |
parent | 2c71bf25950eef39fdc07794acf7d121b1c9230e (diff) |
tests: 16_sort: fix logic flaw exposed on OS X
A typo in the custom order function of the test case caused the test case
to yield differently sorted results on OS X, triggered by differences in
the libc's `qsort()` implementation.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/custom')
-rw-r--r-- | tests/custom/03_stdlib/16_sort | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/custom/03_stdlib/16_sort b/tests/custom/03_stdlib/16_sort index ccc235f..ac4a0e1 100644 --- a/tests/custom/03_stdlib/16_sort +++ b/tests/custom/03_stdlib/16_sort @@ -31,7 +31,7 @@ Returns `null` if the given input array value is not an array. let t1 = type(a), t2 = type(b); if (t1 < t2) return -1; - else if (t2 > t2) + else if (t1 > t2) return 1; if (a < b) |