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

Function TestRecursive

math/fibonacci/fibonacci_test.go:67–78  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

65}
66
67func TestRecursive(t *testing.T) {
68 tests := getTests()
69 for _, test := range tests {
70 if test.n <= 10 {
71 t.Run(test.name, func(t *testing.T) {
72 if got := Recursive(test.n); got != test.want {
73 t.Errorf("Return value = %v, want %v", got, test.want)
74 }
75 })
76 }
77 }
78}
79
80func BenchmarkNthFibonacci(b *testing.B) {
81 for i := 0; i < b.N; i++ {

Callers

nothing calls this directly

Calls 2

getTestsFunction · 0.70
RecursiveFunction · 0.70

Tested by

no test coverage detected