move roc_cli tests to use insta snapshots

This commit is contained in:
Luke Boswell 2024-10-09 09:45:07 +11:00
parent e3afeaa7ff
commit 81668e66bf
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
43 changed files with 464 additions and 394 deletions

View file

@ -110,18 +110,10 @@ comptime {
pub export fn main() u8 {
const stdout = std.io.getStdOut().writer();
var timer = std.time.Timer.start() catch unreachable;
const result = roc__mainForHost_1_exposed(10);
const nanos = timer.read();
const seconds = (@as(f64, @floatFromInt(nanos)) / 1_000_000_000.0);
stdout.print("{d}\n", .{result}) catch unreachable;
const stderr = std.io.getStdErr().writer();
stderr.print("runtime: {d:.3}ms\n", .{seconds * 1000}) catch unreachable;
return 0;
}