(t *testing.T)
| 62 | } |
| 63 | |
| 64 | func TestIsPowOfTwoUseLog(t *testing.T) { |
| 65 | tests := getTestsForPowerOfTwo() |
| 66 | for _, tv := range tests { |
| 67 | t.Run(tv.name, func(t *testing.T) { |
| 68 | result := math2.IsPowOfTwoUseLog(float64(tv.a)) |
| 69 | t.Log(tv.a, " ", result) |
| 70 | if result != tv.missing { |
| 71 | t.Errorf("Wrong result! Expected:%v, returned:%v ", tv.missing, result) |
| 72 | } |
| 73 | }) |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | func BenchmarkIsPowerOfTwoBinaryMethod(b *testing.B) { |
| 78 | for i := 0; i < b.N; i++ { |
nothing calls this directly
no test coverage detected