Files
lneto/module_test.go
T
Patricio Whittingslow 53f3296e99 Initial commit
2024-12-23 18:37:48 -03:00

22 lines
460 B
Go

package gomoduletemplate_test
import (
"testing"
gomoduletemplate "github.com/YOURUSER/YOURREPONAME"
)
func TestWorkingGoInstall(t *testing.T) {
t.Log("Your go installation works!")
}
func TestFibonacci(t *testing.T) {
var sequence = []int{0, 1, 1, 2, 3, 5, 8, 13, 21, 34}
for nth, expected := range sequence {
got := gomoduletemplate.Fibonacci(nth)
if got != expected {
t.Errorf("Fibonacci(%d) = %d, expected %d", nth, got, expected)
}
}
}