(t *testing.T)
| 35 | } |
| 36 | |
| 37 | func TestIsPowOfTwoUseLog(t *testing.T) { |
| 38 | tests := getTestsForPowerOfTwo() |
| 39 | for _, tv := range tests { |
| 40 | t.Run(tv.name, func(t *testing.T) { |
| 41 | result := IsPowOfTwoUseLog(float64(tv.a)) |
| 42 | t.Log(tv.a, " ", result) |
| 43 | if result != tv.missing { |
| 44 | t.Errorf("Wrong result! Expected:%v, returned:%v ", tv.missing, result) |
| 45 | } |
| 46 | }) |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | func BenchmarkIsPowerOfTwoUseLog(b *testing.B) { |
| 51 | for i := 0; i < b.N; i++ { |
nothing calls this directly
no test coverage detected