mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
simplify test case
This commit is contained in:
parent
2959b5c3ad
commit
4a831d029b
1 changed files with 2 additions and 4 deletions
|
|
@ -1927,23 +1927,21 @@ TEST("batch()", wrap_root(function()
|
||||||
local a = source(0)
|
local a = source(0)
|
||||||
local b = source(0)
|
local b = source(0)
|
||||||
local c = source(0)
|
local c = source(0)
|
||||||
local d = source(0)
|
|
||||||
local d_n = 0
|
local d_n = 0
|
||||||
|
|
||||||
effect(function()
|
effect(function()
|
||||||
|
b()
|
||||||
c()
|
c()
|
||||||
d()
|
|
||||||
d_n += 1
|
d_n += 1
|
||||||
end)
|
end)
|
||||||
|
|
||||||
effect(function()
|
effect(function()
|
||||||
|
b(a())
|
||||||
c(a())
|
c(a())
|
||||||
d(b())
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
batch(function()
|
batch(function()
|
||||||
a(1)
|
a(1)
|
||||||
b(1)
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
CHECK(d_n == 3)
|
CHECK(d_n == 3)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue