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

Function testBitFun

bigint_test.go:1840–1848  ·  view source on GitHub ↗
(t *testing.T, msg string, f bitFun, x, y *BigInt, exp string)

Source from the content-addressed store, hash-verified

1838type bitFun func(z, x, y *BigInt) *BigInt
1839
1840func testBitFun(t *testing.T, msg string, f bitFun, x, y *BigInt, exp string) {
1841 expected := new(BigInt)
1842 expected.SetString(exp, 0)
1843
1844 out := f(new(BigInt), x, y)
1845 if out.Cmp(expected) != 0 {
1846 t.Errorf("%s: got %s want %s", msg, out, expected)
1847 }
1848}
1849
1850func testBitFunSelf(t *testing.T, msg string, f bitFun, x, y *BigInt, exp string) {
1851 self := new(BigInt)

Callers 1

TestBigIntBitwiseFunction · 0.85

Calls 2

SetStringMethod · 0.45
CmpMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…