(t *testing.T)
| 1358 | } |
| 1359 | |
| 1360 | func TestBigIntBitLen(t *testing.T) { |
| 1361 | for i, test := range bitLenTests { |
| 1362 | x, ok := new(BigInt).SetString(test.in, 0) |
| 1363 | if !ok { |
| 1364 | t.Errorf("#%d test input invalid: %s", i, test.in) |
| 1365 | continue |
| 1366 | } |
| 1367 | |
| 1368 | if n := x.BitLen(); n != test.out { |
| 1369 | t.Errorf("#%d got %d want %d", i, n, test.out) |
| 1370 | } |
| 1371 | } |
| 1372 | } |
| 1373 | |
| 1374 | var expTests = []struct { |
| 1375 | x, y, m string |