| ... | @@ -11,15 +11,6 @@ fn testSaturatingOp(comptime op: Op, comptime T: type, test_data: [3]T) !void { | ... | @@ -11,15 +11,6 @@ fn testSaturatingOp(comptime op: Op, comptime T: type, test_data: [3]T) !void { |
| 11 | const a = test_data[0]; | 11 | const a = test_data[0]; |
| 12 | const b = test_data[1]; | 12 | const b = test_data[1]; |
| 13 | const expected = test_data[2]; | 13 | const expected = test_data[2]; |
| 14 | { | | |
| 15 | const actual = switch (op) { | | |
| 16 | .add => @addWithSaturation(a, b), | | |
| 17 | .sub => @subWithSaturation(a, b), | | |
| 18 | .mul => @mulWithSaturation(a, b), | | |
| 19 | .shl => @shlWithSaturation(a, b), | | |
| 20 | }; | | |
| 21 | try expectEqual(expected, actual); | | |
| 22 | } | | |
| 23 | { | 14 | { |
| 24 | const actual = switch (op) { | 15 | const actual = switch (op) { |
| 25 | .add => a +| b, | 16 | .add => a +| b, |