From fe1cda74156cd597cc84bb2a5391be2279d73d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio?= Date: Sun, 4 Oct 2020 12:02:46 -0300 Subject: [PATCH 1/2] test: add tests to fibonacci --- .idea/go-algorithms.iml | 9 +++ .idea/modules.xml | 8 +++ .idea/vcs.xml | 6 ++ .idea/workspace.xml | 110 ++++++++++++++++++++++++++++++++++++ numerical/fibonacci_test.go | 19 +++++++ 5 files changed, 152 insertions(+) create mode 100644 .idea/go-algorithms.iml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml create mode 100644 numerical/fibonacci_test.go 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") + } + +} From a13adc4b68dbfb01dba45f701064290d963984ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio?= Date: Sun, 4 Oct 2020 12:04:25 -0300 Subject: [PATCH 2/2] refactor: remove folder .idea --- .idea/go-algorithms.iml | 9 ---- .idea/modules.xml | 8 --- .idea/vcs.xml | 6 --- .idea/workspace.xml | 110 ---------------------------------------- 4 files changed, 133 deletions(-) delete mode 100644 .idea/go-algorithms.iml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml delete mode 100644 .idea/workspace.xml diff --git a/.idea/go-algorithms.iml b/.idea/go-algorithms.iml deleted file mode 100644 index 5e764c4..0000000 --- a/.idea/go-algorithms.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 390c9ce..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index ceceb16..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file