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