(t *testing.T, msg string, f bitFun, x, y *BigInt, exp string)
| 1848 | } |
| 1849 | |
| 1850 | func 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 | |
| 1862 | func altBit(x *BigInt, i int) uint { |
| 1863 | z := new(BigInt).Rsh(x, uint(i)) |
no test coverage detected
searching dependent graphs…