aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-03-02 14:42:15 +0800
committerGitHub <noreply@github.com>2023-03-02 14:42:15 +0800
commitfb1db80f5ab707e188be3c60539fa38eaf996f24 (patch)
tree973f911a6ef5c89315f88cf5ae0fbfff8ff716c4
parentbc15b075d14c85098d674a2466d2386e08b0005f (diff)
downloadrneovim-fb1db80f5ab707e188be3c60539fa38eaf996f24.tar.gz
rneovim-fb1db80f5ab707e188be3c60539fa38eaf996f24.tar.bz2
rneovim-fb1db80f5ab707e188be3c60539fa38eaf996f24.zip
test(treesitter/parser_spec): correct time unit (#22471)
-rw-r--r--test/functional/treesitter/parser_spec.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/treesitter/parser_spec.lua b/test/functional/treesitter/parser_spec.lua
index 67aad4d1b7..fd9822d1c0 100644
--- a/test/functional/treesitter/parser_spec.lua
+++ b/test/functional/treesitter/parser_spec.lua
@@ -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()