mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 16:28:58 +00:00
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
This commit is contained in:
@@ -36,7 +36,6 @@ fn testExecFn(
|
|||||||
js_env: *jsruntime.Env,
|
js_env: *jsruntime.Env,
|
||||||
comptime execFn: jsruntime.ContextExecFn,
|
comptime execFn: jsruntime.ContextExecFn,
|
||||||
) anyerror!void {
|
) anyerror!void {
|
||||||
|
|
||||||
// start JS env
|
// start JS env
|
||||||
try js_env.start(alloc);
|
try js_env.start(alloc);
|
||||||
defer js_env.stop();
|
defer js_env.stop();
|
||||||
@@ -89,6 +88,8 @@ fn testsAllExecFn(
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
try testJSRuntime();
|
||||||
|
|
||||||
std.debug.print("\n", .{});
|
std.debug.print("\n", .{});
|
||||||
for (builtin.test_functions) |test_fn| {
|
for (builtin.test_functions) |test_fn| {
|
||||||
try test_fn.func();
|
try test_fn.func();
|
||||||
@@ -104,7 +105,7 @@ test {
|
|||||||
std.testing.refAllDecls(DumpTest);
|
std.testing.refAllDecls(DumpTest);
|
||||||
}
|
}
|
||||||
|
|
||||||
test "jsruntime" {
|
fn testJSRuntime() !void {
|
||||||
// generate tests
|
// generate tests
|
||||||
try generate.tests();
|
try generate.tests();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user