mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Cleanup scope functions
This commit is contained in:
parent
4b4db9602e
commit
ce24f8ade9
4 changed files with 134 additions and 105 deletions
|
|
@ -2004,6 +2004,26 @@ TEST("values()", wrap_root(function()
|
|||
CHECK(cleaned_counts[3] == nil)
|
||||
end
|
||||
end
|
||||
|
||||
do CASE "delayed destruction deferred"
|
||||
local input = source {}
|
||||
local output = values(input, function()
|
||||
return {}, 1
|
||||
end)
|
||||
|
||||
local count = 0
|
||||
effect(function() output(); count += 1 end)
|
||||
|
||||
input { 1, 2, 3 }
|
||||
CHECK(count == 2)
|
||||
|
||||
input {}
|
||||
CHECK(count == 2)
|
||||
|
||||
step(1 + 0.01)
|
||||
--CHECK(count == 3)
|
||||
CHECK(count == 5)
|
||||
end
|
||||
end))
|
||||
|
||||
TEST("spring()", wrap_root(function()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue