MCPcopy Create free account
hub / github.com/cockroachdb/apd / TestErrDecimal

Function TestErrDecimal

error_test.go:21–33  ·  view source on GitHub ↗

Appease the unused test. TODO(mjibson): actually test all the ErrDecimal methods.

(t *testing.T)

Source from the content-addressed store, hash-verified

19// Appease the unused test.
20// TODO(mjibson): actually test all the ErrDecimal methods.
21func TestErrDecimal(t *testing.T) {
22 ed := MakeErrDecimal(testCtx)
23 a := New(1, 0)
24 ed.Abs(a, a)
25 ed.Exp(a, a)
26 ed.Ln(a, a)
27 ed.Log10(a, a)
28 ed.Neg(a, a)
29 ed.Pow(a, a, a)
30 ed.QuoInteger(a, a, a)
31 ed.Rem(a, a, a)
32 ed.Round(a, a)
33}
34
35// TestMakeErrDecimalWithPrecision tests that WithPrecision generates a copy
36// and not a reference.

Callers

nothing calls this directly

Calls 11

MakeErrDecimalFunction · 0.85
NewFunction · 0.85
AbsMethod · 0.45
ExpMethod · 0.45
LnMethod · 0.45
Log10Method · 0.45
NegMethod · 0.45
PowMethod · 0.45
QuoIntegerMethod · 0.45
RemMethod · 0.45
RoundMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…