MCPcopy
hub / github.com/shopspring/decimal / TestNewFromUint64

Function TestNewFromUint64

decimal_test.go:529–546  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

527}
528
529func 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
548func TestNewFromBigIntWithExponent(t *testing.T) {
549 type Inp struct {

Callers

nothing calls this directly

Calls 2

NewFromUint64Function · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…