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

Function TestNthFibonacci

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

Source from the content-addressed store, hash-verified

43}
44
45func TestNthFibonacci(t *testing.T) {
46 tests := getTests()
47 for _, test := range tests {
48 t.Run(test.name, func(t *testing.T) {
49 if got := dynamic.NthFibonacci(test.n); got != test.want {
50 t.Errorf("Return value = %v, want %v", got, test.want)
51 }
52 })
53 }
54}
55
56func TestFormula(t *testing.T) {
57 tests := getTests()

Callers

nothing calls this directly

Calls 2

NthFibonacciFunction · 0.92
getTestsFunction · 0.70

Tested by

no test coverage detected