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

Function TestDecimal_Abs1

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

Source from the content-addressed store, hash-verified

2501}
2502
2503func TestDecimal_Abs1(t *testing.T) {
2504 a := New(-1234, -4)
2505 b := New(1234, -4)
2506
2507 c := a.Abs()
2508 if c.Cmp(b) != 0 {
2509 t.Errorf("error")
2510 }
2511}
2512
2513func TestDecimal_Abs2(t *testing.T) {
2514 a := New(-1234, -4)

Callers

nothing calls this directly

Calls 3

NewFunction · 0.85
AbsMethod · 0.80
CmpMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…