mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Improve error reporting
This commit is contained in:
parent
14f8d38a35
commit
7bae2517cd
7 changed files with 50 additions and 119 deletions
|
|
@ -26,7 +26,6 @@ end
|
|||
|
||||
local N = 2^18 -- 262144
|
||||
|
||||
|
||||
TITLE "sources"
|
||||
|
||||
BENCH("create source", function()
|
||||
|
|
@ -449,27 +448,6 @@ end)
|
|||
|
||||
N *= 1024
|
||||
|
||||
TITLE "cleanup"
|
||||
|
||||
ROOT_BENCH("register new cleanup", function()
|
||||
local cleanup = cleanup
|
||||
|
||||
local cleaner = function() end
|
||||
|
||||
local callers = {}
|
||||
|
||||
for i = 1, N do
|
||||
callers[i] = function(fn, v)
|
||||
fn(v)
|
||||
return i -- return unique upvalue to ensure unique closure
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, START(N) do
|
||||
callers[i](cleanup, cleaner)
|
||||
end
|
||||
end)
|
||||
|
||||
TITLE "aggregate"
|
||||
|
||||
do
|
||||
|
|
|
|||
|
|
@ -218,8 +218,8 @@ TEST("graph", function()
|
|||
do
|
||||
local c = get_children(selected)
|
||||
CHECK(#c == 2)
|
||||
CHECK(table.find(c, bind1))
|
||||
CHECK(table.find(c, bind2))
|
||||
CHECK(table.find(c, bind1 :: any))
|
||||
CHECK(table.find(c, bind2 :: any))
|
||||
end
|
||||
|
||||
do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue