(t *testing.T)
| 16 | } |
| 17 | |
| 18 | func TestIterativePower(t *testing.T) { |
| 19 | for _, tc := range testCases { |
| 20 | t.Run(tc.name, func(t *testing.T) { |
| 21 | actual := IterativePower(tc.base, tc.power) |
| 22 | if actual != tc.expected { |
| 23 | t.Errorf("Expected %d to the power of %d to be: %d, but got: %d", tc.base, tc.power, tc.expected, actual) |
| 24 | } |
| 25 | }) |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | func TestRecursivePower(t *testing.T) { |
| 30 | for _, tc := range testCases { |
nothing calls this directly
no test coverage detected