(t *testing.T)
| 38 | } |
| 39 | |
| 40 | func TestRecursivePower1(t *testing.T) { |
| 41 | for _, tc := range testCases { |
| 42 | t.Run(tc.name, func(t *testing.T) { |
| 43 | actual := RecursivePower1(tc.base, tc.power) |
| 44 | if actual != tc.expected { |
| 45 | t.Errorf("Expected %d to the power of %d to be: %d, but got: %d", tc.base, tc.power, tc.expected, actual) |
| 46 | } |
| 47 | }) |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | func BenchmarkIterativePower(b *testing.B) { |
| 52 | for i := 0; i < b.N; i++ { |
nothing calls this directly
no test coverage detected