test(treesitter/parser_spec): correct time unit (#22471)

This commit is contained in:
zeertzjq 2023-03-02 14:42:15 +08:00 committed by GitHub
parent bc15b075d1
commit fb1db80f5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -182,9 +182,9 @@ void ui_refresh(void)
local firstrun = q(1)
local manyruns = q(100)
local factor = is_os('win') and 3 or 4
-- First run should be at least 4x slower.
assert(factor * 100 * manyruns < firstrun, ('firstrun: %d ms, manyruns: %d ms'):format(firstrun / 1000, manyruns / 1000))
-- First run should be at least 400x slower than an 100 subsequent runs.
local factor = is_os('win') and 300 or 400
assert(factor * manyruns < firstrun, ('firstrun: %f ms, manyruns: %f ms'):format(firstrun / 1e6, manyruns / 1e6))
end)
it('support query and iter by capture', function()