authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-07-25 23:33:15-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-07-25 23:33:15-07:00
logc95091e5a50f0bfa120a83292ee546b8c3e11910
treed47186ce1cd669c08fdfa1ab74afa616a2b241e5
parent09b0ad494bd9e3531ababb25e2531c18861b2148

run zig fmt on std.testing


1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/testing.zig+2-2
...@@ -175,7 +175,7 @@ test "expectEqual.union(enum)" {...@@ -175,7 +175,7 @@ test "expectEqual.union(enum)" {
175/// within the margin of the expected value,175/// within the margin of the expected value,
176/// prints diagnostics to stderr to show exactly how they are not equal, then aborts.176/// prints diagnostics to stderr to show exactly how they are not equal, then aborts.
177/// The types must be floating point177/// The types must be floating point
178pub fn expectWithinMargin(expected: var, actual: @TypeOf(expected), margin: @TypeOf(expected)) void {178pub fn expectWithinMargin(expected: anytype, actual: @TypeOf(expected), margin: @TypeOf(expected)) void {
179 std.debug.assert(margin >= 0.0);179 std.debug.assert(margin >= 0.0);
180180
181 switch (@typeInfo(@TypeOf(actual))) {181 switch (@typeInfo(@TypeOf(actual))) {
...@@ -201,7 +201,7 @@ test "expectWithinMargin.f32" {...@@ -201,7 +201,7 @@ test "expectWithinMargin.f32" {
201/// within the epsilon of the expected value,201/// within the epsilon of the expected value,
202/// prints diagnostics to stderr to show exactly how they are not equal, then aborts.202/// prints diagnostics to stderr to show exactly how they are not equal, then aborts.
203/// The types must be floating point203/// The types must be floating point
204pub fn expectWithinEpsilon(expected: var, actual: @TypeOf(expected), epsilon: @TypeOf(expected)) void {204pub fn expectWithinEpsilon(expected: anytype, actual: @TypeOf(expected), epsilon: @TypeOf(expected)) void {
205 std.debug.assert(epsilon >= 0.0 and epsilon <= 1.0);205 std.debug.assert(epsilon >= 0.0 and epsilon <= 1.0);
206206
207 const margin = epsilon * expected;207 const margin = epsilon * expected;