mirror of
https://github.com/centau/vide.git
synced 2026-10-23 14:21:38 +00:00
Fix actions not running in priority order (#107)
Some checks are pending
unit-test / unit-test (push) Waiting to run
Some checks are pending
unit-test / unit-test (push) Waiting to run
Co-authored-by: centau <83140718+centau@users.noreply.github.com>
This commit is contained in:
parent
dda5e0f2bb
commit
d99dbe1873
2 changed files with 30 additions and 4 deletions
|
|
@ -2469,6 +2469,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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue