From 5bdc50bbb535e7044cab526afa33b50994269a61 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Thu, 7 Mar 2024 14:39:20 +0100 Subject: [PATCH] test: run JSRuntime test func directly Instead of calling the bultin test functions Indeed, it causes issue with type comparison. See https://github.com/lightpanda-io/browsercore/pull/184#issuecomment-1964369066 --- src/run_tests.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/run_tests.zig b/src/run_tests.zig index 9341b640..e2ca7f65 100644 --- a/src/run_tests.zig +++ b/src/run_tests.zig @@ -36,7 +36,6 @@ fn testExecFn( js_env: *jsruntime.Env, comptime execFn: jsruntime.ContextExecFn, ) anyerror!void { - // start JS env try js_env.start(alloc); defer js_env.stop(); @@ -89,6 +88,8 @@ fn testsAllExecFn( } pub fn main() !void { + try testJSRuntime(); + std.debug.print("\n", .{}); for (builtin.test_functions) |test_fn| { try test_fn.func(); @@ -104,7 +105,7 @@ test { std.testing.refAllDecls(DumpTest); } -test "jsruntime" { +fn testJSRuntime() !void { // generate tests try generate.tests();