mirror of
https://github.com/shopspring/decimal.git
synced 2024-11-22 12:30:49 +01:00
Test: NewFromInt: add MinInt case
This commit is contained in:
parent
19b27aafdc
commit
dd34943dc4
1 changed files with 10 additions and 8 deletions
|
@ -476,10 +476,11 @@ func TestNewFromFloatWithExponent(t *testing.T) {
|
||||||
|
|
||||||
func TestNewFromInt(t *testing.T) {
|
func TestNewFromInt(t *testing.T) {
|
||||||
tests := map[int64]string{
|
tests := map[int64]string{
|
||||||
0: "0",
|
0: "0",
|
||||||
1: "1",
|
1: "1",
|
||||||
323412345: "323412345",
|
323412345: "323412345",
|
||||||
9223372036854775807: "9223372036854775807",
|
9223372036854775807: "9223372036854775807",
|
||||||
|
-9223372036854775808: "-9223372036854775808",
|
||||||
}
|
}
|
||||||
|
|
||||||
// add negatives
|
// add negatives
|
||||||
|
@ -501,10 +502,11 @@ func TestNewFromInt(t *testing.T) {
|
||||||
|
|
||||||
func TestNewFromInt32(t *testing.T) {
|
func TestNewFromInt32(t *testing.T) {
|
||||||
tests := map[int32]string{
|
tests := map[int32]string{
|
||||||
0: "0",
|
0: "0",
|
||||||
1: "1",
|
1: "1",
|
||||||
323412345: "323412345",
|
323412345: "323412345",
|
||||||
2147483647: "2147483647",
|
2147483647: "2147483647",
|
||||||
|
-2147483648: "-2147483648",
|
||||||
}
|
}
|
||||||
|
|
||||||
// add negatives
|
// add negatives
|
||||||
|
|
Loading…
Reference in a new issue