summaryrefslogtreecommitdiff
path: root/server/test/full/example.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/test/full/example.lua')
-rw-r--r--server/test/full/example.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/server/test/full/example.lua b/server/test/full/example.lua
new file mode 100644
index 00000000..321f3bc7
--- /dev/null
+++ b/server/test/full/example.lua
@@ -0,0 +1,16 @@
+local fs = require 'bee.filesystem'
+
+TEST(io.load(ROOT / 'src' / 'vm' / 'vm.lua'))
+
+-- 临时
+local function testIfExit(path)
+ local buf = io.load(fs.path(path))
+ if buf then
+ local clock = os.clock()
+ for _ = 1, 10 do
+ TEST(buf)
+ end
+ print('基准测试耗时:', os.clock() - clock)
+ end
+end
+--testIfExit(ROOT / 'test' / 'example' / 'vm.lua')