summaryrefslogtreecommitdiff
path: root/tests/modules/table/test.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-04-07 23:07:41 +0800
committerruki <[email protected]>2024-04-07 23:07:41 +0800
commit62194c3e5dff8141813f9f63993516de98dd367f (patch)
treef39d4fda02efbbd1c5e5cdb7cf5fbe5d335ac51c /tests/modules/table/test.lua
parent7e0f8751549ed166fefa13afb300527b76bb190a (diff)
improve dlist
Diffstat (limited to 'tests/modules/table/test.lua')
-rw-r--r--tests/modules/table/test.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/modules/table/test.lua b/tests/modules/table/test.lua
index 2b586e7a4..306d07eac 100644
--- a/tests/modules/table/test.lua
+++ b/tests/modules/table/test.lua
@@ -31,7 +31,7 @@ function test_unwrap(t)
end
function test_orderkeys(t)
- -- sort by modulo 2 then from the smallest to largest
+ -- sort by modulo 2 then from the smallest to largest
local f = function(a, b)
if a % 2 == 0 and b % 2 ~= 0 then
return true
@@ -40,7 +40,7 @@ function test_orderkeys(t)
end
return a < b
end
-
+
t:are_equal(table.orderkeys({[2] = 2, [1] = 1, [4] = 4, [3] = 3}, f), {2, 4, 1, 3})
t:are_equal(table.orderkeys({[1] = 1, [2] = 2, [3] = 3, [4] = 4}), {1, 2 , 3, 4})
end