Compare commits
No commits in common. "6eccce0b984296e7d05c20d83933cb31530e4fac" and "5ea4b7319146f29bb1aa9acf65982feaba9edc3d" have entirely different histories.
6eccce0b98
...
5ea4b73191
2 changed files with 4 additions and 7 deletions
|
@ -9,11 +9,9 @@ pub fn build(b: *std.Build) void {
|
||||||
});
|
});
|
||||||
|
|
||||||
const tests = b.addTest(.{
|
const tests = b.addTest(.{
|
||||||
.root_module = b.createModule(.{
|
.root_source_file = b.path("test/tests.zig"),
|
||||||
.root_source_file = b.path("test/tests.zig"),
|
.target = target,
|
||||||
.target = target,
|
.optimize = optimize,
|
||||||
.optimize = optimize,
|
|
||||||
}),
|
|
||||||
});
|
});
|
||||||
tests.root_module.addImport("cbor", cbor_mod);
|
tests.root_module.addImport("cbor", cbor_mod);
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ const cbor_mod = @import("cbor");
|
||||||
const expect = std.testing.expect;
|
const expect = std.testing.expect;
|
||||||
const expectEqual = std.testing.expectEqual;
|
const expectEqual = std.testing.expectEqual;
|
||||||
const expectEqualDeep = std.testing.expectEqualDeep;
|
const expectEqualDeep = std.testing.expectEqualDeep;
|
||||||
const expectEqualStrings = std.testing.expectEqualStrings;
|
|
||||||
const expectError = std.testing.expectError;
|
const expectError = std.testing.expectError;
|
||||||
|
|
||||||
const fmt = cbor_mod.fmt;
|
const fmt = cbor_mod.fmt;
|
||||||
|
@ -520,5 +519,5 @@ test "cbor.extract_cbor f64" {
|
||||||
const json2 = try toJsonAlloc(std.testing.allocator, sub);
|
const json2 = try toJsonAlloc(std.testing.allocator, sub);
|
||||||
defer std.testing.allocator.free(json2);
|
defer std.testing.allocator.free(json2);
|
||||||
|
|
||||||
try expectEqualStrings("[0.9689138531684875]", json2);
|
try expectEqualDeep("[9.689138531684875e-1]", json2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue