MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / TestRecursivePower

Function TestRecursivePower

math/power/fastexponent_test.go:29–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

27}
28
29func TestRecursivePower(t *testing.T) {
30 for _, tc := range testCases {
31 t.Run(tc.name, func(t *testing.T) {
32 actual := RecursivePower(tc.base, tc.power)
33 if actual != tc.expected {
34 t.Errorf("Expected %d to the power of %d to be: %d, but got: %d", tc.base, tc.power, tc.expected, actual)
35 }
36 })
37 }
38}
39
40func TestRecursivePower1(t *testing.T) {
41 for _, tc := range testCases {

Callers

nothing calls this directly

Calls 1

RecursivePowerFunction · 0.85

Tested by

no test coverage detected