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

Function TestBigIntText

bigint_test.go:2343–2365  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2341}
2342
2343func TestBigIntText(t *testing.T) {
2344 z := new(BigInt)
2345 for _, test := range stringTests {
2346 if !test.ok {
2347 continue
2348 }
2349
2350 _, ok := z.SetString(test.in, test.base)
2351 if !ok {
2352 t.Errorf("%v: failed to parse", test)
2353 continue
2354 }
2355
2356 base := test.base
2357 if base == 0 {
2358 base = 10
2359 }
2360
2361 if got := z.Text(base); got != test.out {
2362 t.Errorf("%v: got %s; want %s", test, got, test.out)
2363 }
2364 }
2365}
2366
2367func TestBigIntAppendText(t *testing.T) {
2368 z := new(BigInt)

Callers

nothing calls this directly

Calls 2

SetStringMethod · 0.45
TextMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…