(t *testing.T)
| 2234 | } |
| 2235 | |
| 2236 | func TestDecimal_Overflow(t *testing.T) { |
| 2237 | if !didPanic(func() { New(1, math.MinInt32).Mul(New(1, math.MinInt32)) }) { |
| 2238 | t.Fatalf("should have gotten an overflow panic") |
| 2239 | } |
| 2240 | if !didPanic(func() { New(1, math.MaxInt32).Mul(New(1, math.MaxInt32)) }) { |
| 2241 | t.Fatalf("should have gotten an overflow panic") |
| 2242 | } |
| 2243 | } |
| 2244 | |
| 2245 | func TestDecimal_ExtremeValues(t *testing.T) { |
| 2246 | // NOTE(vadim): this test takes pretty much forever |