authorgravatar for shawn@git.icuShawn Landden <shawn@git.icu> 2019-03-29 06:46:30-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-03-29 12:17:48-04:00
logd494a5f4cf6435314bf29b662cd4cdafa35f615c
tree3bbc6b8f2b648f3525ff80710fc6a55d166c7280
parent66f13ba80787b652ee4f26669f4f2af99e1f1ea0

fix tests for math.mulWide


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

std/math.zig+4-4
...@@ -812,8 +812,8 @@ pub fn mulWide(comptime T: type, a: T, b: T) @IntType(T.is_signed, T.bit_count *...@@ -812,8 +812,8 @@ pub fn mulWide(comptime T: type, a: T, b: T) @IntType(T.is_signed, T.bit_count *
812 return ResultInt(a) * ResultInt(b);812 return ResultInt(a) * ResultInt(b);
813}813}
814814
815test "math.wideMul" {815test "math.mulWide" {
816 testing.expect(wideMul(u8, 5, 5) == 25);816 testing.expect(mulWide(u8, 5, 5) == 25);
817 testing.expect(wideMul(i8, 5, -5) == -25);817 testing.expect(mulWide(i8, 5, -5) == -25);
818 testing.expect(wideMul(u8, 100, 100) == 10000);818 testing.expect(mulWide(u8, 100, 100) == 10000);
819}819}