From dd34943dc4f10214e7c950fd6f8359758280a0ee Mon Sep 17 00:00:00 2001 From: Egor Seredin <4819888+agmt@users.noreply.github.com> Date: Tue, 13 Feb 2024 06:53:19 +0000 Subject: [PATCH] Test: NewFromInt: add MinInt case --- decimal_test.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/decimal_test.go b/decimal_test.go index 92e5348..21945e3 100644 --- a/decimal_test.go +++ b/decimal_test.go @@ -476,10 +476,11 @@ func TestNewFromFloatWithExponent(t *testing.T) { func TestNewFromInt(t *testing.T) { tests := map[int64]string{ - 0: "0", - 1: "1", - 323412345: "323412345", - 9223372036854775807: "9223372036854775807", + 0: "0", + 1: "1", + 323412345: "323412345", + 9223372036854775807: "9223372036854775807", + -9223372036854775808: "-9223372036854775808", } // add negatives @@ -501,10 +502,11 @@ func TestNewFromInt(t *testing.T) { func TestNewFromInt32(t *testing.T) { tests := map[int32]string{ - 0: "0", - 1: "1", - 323412345: "323412345", - 2147483647: "2147483647", + 0: "0", + 1: "1", + 323412345: "323412345", + 2147483647: "2147483647", + -2147483648: "-2147483648", } // add negatives