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

Function testBitFunSelf

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

Source from the content-addressed store, hash-verified

1848}
1849
1850func testBitFunSelf(t *testing.T, msg string, f bitFun, x, y *BigInt, exp string) {
1851 self := new(BigInt)
1852 self.Set(x)
1853 expected := new(BigInt)
1854 expected.SetString(exp, 0)
1855
1856 self = f(self, self, y)
1857 if self.Cmp(expected) != 0 {
1858 t.Errorf("%s: got %s want %s", msg, self, expected)
1859 }
1860}
1861
1862func altBit(x *BigInt, i int) uint {
1863 z := new(BigInt).Rsh(x, uint(i))

Callers 1

TestBigIntBitwiseFunction · 0.85

Calls 3

SetMethod · 0.45
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…