mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
Fix test call to jsruntime.loadEnv
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
This commit is contained in:
@@ -58,8 +58,6 @@ pub fn main() !void {
|
|||||||
defer doc.deinit();
|
defer doc.deinit();
|
||||||
try doc.parse(html);
|
try doc.parse(html);
|
||||||
|
|
||||||
std.debug.print("ok\n", .{});
|
|
||||||
|
|
||||||
// remove socket file of internal server
|
// remove socket file of internal server
|
||||||
// reuse_address (SO_REUSEADDR flag) does not seems to work on unix socket
|
// reuse_address (SO_REUSEADDR flag) does not seems to work on unix socket
|
||||||
// see: https://gavv.net/articles/unix-socket-reuse/
|
// see: https://gavv.net/articles/unix-socket-reuse/
|
||||||
@@ -72,7 +70,7 @@ pub fn main() !void {
|
|||||||
|
|
||||||
// alloc
|
// alloc
|
||||||
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
|
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
|
||||||
defer _ = arena.deinit();
|
defer arena.deinit();
|
||||||
|
|
||||||
// server
|
// server
|
||||||
var addr = try std.net.Address.initUnix(socket_path);
|
var addr = try std.net.Address.initUnix(socket_path);
|
||||||
|
|||||||
@@ -40,7 +40,9 @@ test {
|
|||||||
const vm = jsruntime.VM.init();
|
const vm = jsruntime.VM.init();
|
||||||
defer vm.deinit();
|
defer vm.deinit();
|
||||||
|
|
||||||
var alloc = jsruntime.bench_allocator(std.testing.allocator);
|
var bench_alloc = jsruntime.bench_allocator(std.testing.allocator);
|
||||||
|
var arena_alloc = std.heap.ArenaAllocator.init(bench_alloc.allocator());
|
||||||
|
defer arena_alloc.deinit();
|
||||||
|
|
||||||
try jsruntime.loadEnv(alloc.allocator(), false, testsExecFn, apis);
|
try jsruntime.loadEnv(&arena_alloc, testsExecFn, apis);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user