aboutsummaryrefslogtreecommitdiff
path: root/tests/units/sort.lua
diff options
context:
space:
mode:
authorame <[email protected]>2026-05-27 17:13:31 -0500
committerame <[email protected]>2026-05-27 17:13:31 -0500
commit4cbf47f295fc65e4a470d93194259d80c942b32b (patch)
tree0b3507f3a566e37fc1be6f227ac8b8230e6aab80 /tests/units/sort.lua
parent6f176096b8f3a2088c01d67a36e4b67750ec179e (diff)
actual sort test, and fix docs
Diffstat (limited to 'tests/units/sort.lua')
-rw-r--r--tests/units/sort.lua16
1 files changed, 5 insertions, 11 deletions
diff --git a/tests/units/sort.lua b/tests/units/sort.lua
index 343f65e..8a109c9 100644
--- a/tests/units/sort.lua
+++ b/tests/units/sort.lua
@@ -6,17 +6,11 @@ for i=1,len do
table.insert(input, math.random(-max, max))
end
-local a = llby.table.dup(input)
-local b = llby.table.dup(input)
-local c = llby.table.dup(input)
-local d = llby.table.dup(input)
-local e = llby.table.dup(input)
-
-llby.table.quicksort(a)
-llby.table.bubblesort(b)
-llby.table.heapsort(c)
-llby.table.shellsort(d)
-llby.table.mergesort(e)
+local a = llby.table.quicksort(input)
+local b = llby.table.bubblesort(input)
+local c = llby.table.heapsort(input)
+local d = llby.table.shellsort(input)
+local e = llby.table.mergesort(input)
return llby.table.equal(a, b) and llby.table.equal(b, c) and
llby.table.equal(c, d) and llby.table.equal(d, e)