fix(mathutil): format TruncRound integer inputs as floats (#365)

This commit is contained in:
Yusuf Efe authored and GitHub committed 2026-10-23 20:54:59 +08:00
1 parent f220ea4c3f
commit a296281408
2 files changed
+7 -1

No files matched your search

+6
View File
@@ -17,6 +17,12 @@ func TestExponent(t *testing.T) {
assert.Equal(int64(100), Exponent(10, 2))
}
func TestTruncRoundInteger(t *testing.T) {
assert := internal.NewAssert(t, "TestTruncRoundInteger")
assert.Equal(42, TruncRound(42, 0))
assert.Equal(int8(-42), TruncRound(int8(-42), 2))
}
func TestLCMIntermediateOverflow(t *testing.T) {
assert := internal.NewAssert(t, "TestLCMIntermediateOverflow")
assert.Equal(uint8(32), LCM(uint8(32)))