Adding Decimals work!!

This commit is contained in:
Jared Ramirez 2021-06-24 11:15:52 -07:00
parent 4d6e5a1a4f
commit 0827123c88
8 changed files with 108 additions and 71 deletions

View file

@ -6,7 +6,8 @@ const testing = std.testing;
const dec = @import("dec.zig");
comptime {
// exportDecFn(dec.fromStrC, "from_str");
exportDecFn(dec.fromF64, "from_f64");
exportDecFn(dec.add, "add");
}
// List Module
@ -112,6 +113,11 @@ fn exportDecFn(comptime func: anytype, comptime func_name: []const u8) void {
exportBuiltinFn(func, "dec." ++ func_name);
}
pub fn panic(message: []const u8, stacktrace: ?*std.builtin.StackTrace) noreturn {
std.debug.print("{s}", .{message});
unreachable;
}
// Run all tests in imported modules
// https://github.com/ziglang/zig/blob/master/lib/std/std.zig#L94
test "" {