19 lines
277 B
Go
19 lines
277 B
Go
package main
|
|
|
|
import "testing"
|
|
|
|
func TestGetVal(t *testing.T) {
|
|
for i := 0; i < 1000; i++ {
|
|
if Fib2(30) != 832040 {
|
|
t.Error("Incorrect!")
|
|
}
|
|
}
|
|
}
|
|
|
|
func TestGetValOpt(t *testing.T) {
|
|
for i := 0; i < 1000; i++ {
|
|
if Fib(30) != 832040 {
|
|
t.Error("Incorrect!")
|
|
}
|
|
}
|
|
}
|