mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
simplified test case and remove error
This commit is contained in:
parent
d341eff5c8
commit
a44fa339d5
3 changed files with 8 additions and 23 deletions
|
|
@ -1924,36 +1924,25 @@ TEST("batch()", wrap_root(function()
|
|||
do CASE "recursive queue flush"
|
||||
|
||||
local a0 = source(0)
|
||||
local a1 = source(1)
|
||||
local a2 = source(0)
|
||||
local a1 = source(0)
|
||||
local updates = 0
|
||||
|
||||
derive(function()
|
||||
a0(a1() + 1)
|
||||
derive(function() -- depends on a1
|
||||
a0(a1())
|
||||
end)
|
||||
|
||||
derive(function()
|
||||
derive(function() -- batch updates a2
|
||||
updates += 1
|
||||
a0()
|
||||
|
||||
batch(function()
|
||||
a2(a0())
|
||||
|
||||
end)
|
||||
|
||||
return 1
|
||||
end)
|
||||
|
||||
derive(function()
|
||||
a2()
|
||||
|
||||
batch(function()
|
||||
|
||||
end)
|
||||
|
||||
return 1
|
||||
end)
|
||||
|
||||
a1(2)
|
||||
a1(1)
|
||||
CHECK(updates == 2)
|
||||
end
|
||||
end))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue