| author | |
| committer | |
| log | 3b2ab7f68a85fadcb5c1b8c1048c461034dc3e29 |
| tree | 78e2fa3611ec45166fbd6c8207f3042f0e744fac |
| parent | f62caddf9f04c739245423ea068f40ce335514e9 |
3 files changed, 4 insertions(+), 14 deletions(-)
licenses.txt+1| ... | @@ -1,3 +1,4 @@ | ... | @@ -1,3 +1,4 @@ |
| 1 | MIT: | 1 | MIT: |
| 2 | = https://spdx.org/licenses/MIT | 2 | = https://spdx.org/licenses/MIT |
| 3 | - This | 3 | - This |
| 4 | - git https://github.com/nektro/zig-expect |
test.zig+1-14| ... | @@ -1,19 +1,6 @@ | ... | @@ -1,19 +1,6 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const color = @import("color"); | 2 | const color = @import("color"); |
| 3 | 3 | const expect = @import("expect").expect; | |
| 4 | fn expect(actual: anytype) Expect(@TypeOf(actual)) { | ||
| 5 | return .{ .actual = actual }; | ||
| 6 | } | ||
| 7 | |||
| 8 | fn Expect(T: type) type { | ||
| 9 | return struct { | ||
| 10 | actual: T, | ||
| 11 | |||
| 12 | fn toEqual(self: *const @This(), expected: T) !void { | ||
| 13 | try std.testing.expectEqual(expected, self.actual); | ||
| 14 | } | ||
| 15 | }; | ||
| 16 | } | ||
| 17 | 4 | ||
| 18 | test { | 5 | test { |
| 19 | // https://www.colorhexa.com/4fc3f7 | 6 | // https://www.colorhexa.com/4fc3f7 |
zigmod.yml+2| ... | @@ -4,3 +4,5 @@ main: mod.zig | ... | @@ -4,3 +4,5 @@ main: mod.zig |
| 4 | license: MIT | 4 | license: MIT |
| 5 | description: Color init and transformation library for Zig | 5 | description: Color init and transformation library for Zig |
| 6 | dependencies: | 6 | dependencies: |
| 7 | root_dependencies: | ||
| 8 | - src: git https://github.com/nektro/zig-expect |