Fix actions not running in priority order

This commit is contained in:
Kaan 2026-10-19 18:39:47 +03:00
parent a4151bd41e
commit 1970d150e0
2 changed files with 30 additions and 4 deletions

View file

@ -2330,6 +2330,20 @@ TEST("actions", function()
CHECK(testkit.seq(queue, { 1, 2 }))
end
do CASE "non-consecutive priorities"
local queue = {}
create "Frame" {
action(function() table.insert(queue, 100) end, 100),
action(function() table.insert(queue, 2.5) end, 2.5),
action(function() table.insert(queue, -1) end, -1),
action(function() table.insert(queue, 0) end, 0),
action(function() table.insert(queue, 10) end, 10)
}
CHECK(testkit.seq(queue, { -1, 0, 2.5, 10, 100 }))
end
end)
TEST("changed()", wrap_root(function()