diff --git a/.idea/go-algorithms.iml b/.idea/go-algorithms.iml new file mode 100644 index 0000000..5e764c4 --- /dev/null +++ b/.idea/go-algorithms.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..390c9ce --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..ceceb16 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/numerical/fibonacci_test.go b/numerical/fibonacci_test.go new file mode 100644 index 0000000..b927022 --- /dev/null +++ b/numerical/fibonacci_test.go @@ -0,0 +1,19 @@ +package numerical + +import "testing" + +func TestFibonacci(t *testing.T) { + + if fibo(10) != 55 { + t.Error("[Error] Fibonacci(10) is wrong") + } + + if fibo(0) != 0 { + t.Error("[Error] Fibonacci(0) is wrong") + } + + if fibo(3) != 2 { + t.Error("[Error] Fibonacci(3) is wrong") + } + +}