From fd2e5e7e9d216c14d78258cd3420b6225fe91b37 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 15 Mar 2022 21:55:36 +0100 Subject: 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 --- tests/custom/03_stdlib/16_sort | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/custom/03_stdlib') 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) -- cgit v1.2.3