(t *testing.T, msg string, f bitFun, x, y *BigInt, exp string)
| 1838 | type bitFun func(z, x, y *BigInt) *BigInt |
| 1839 | |
| 1840 | func 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 | |
| 1850 | func testBitFunSelf(t *testing.T, msg string, f bitFun, x, y *BigInt, exp string) { |
| 1851 | self := new(BigInt) |
no test coverage detected
searching dependent graphs…