(t *testing.T)
| 527 | } |
| 528 | |
| 529 | func TestNewFromUint64(t *testing.T) { |
| 530 | tests := map[uint64]string{ |
| 531 | 0: "0", |
| 532 | 1: "1", |
| 533 | 323412345: "323412345", |
| 534 | 9223372036854775807: "9223372036854775807", |
| 535 | 18446744073709551615: "18446744073709551615", |
| 536 | } |
| 537 | |
| 538 | for input, s := range tests { |
| 539 | d := NewFromUint64(input) |
| 540 | if d.String() != s { |
| 541 | t.Errorf("expected %s, got %s (%s, %d)", |
| 542 | s, d.String(), |
| 543 | d.value.String(), d.exp) |
| 544 | } |
| 545 | } |
| 546 | } |
| 547 | |
| 548 | func TestNewFromBigIntWithExponent(t *testing.T) { |
| 549 | type Inp struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…