(t *testing.T)
| 65 | } |
| 66 | |
| 67 | func 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 | |
| 80 | func BenchmarkNthFibonacci(b *testing.B) { |
| 81 | for i := 0; i < b.N; i++ { |