From c24069bcfa55ca46b1e7af3b86ebf115690e22a8 Mon Sep 17 00:00:00 2001 From: Phodal HUANG Date: Fri, 25 Oct 2019 22:40:43 +0800 Subject: [PATCH] fix: fix test --- README.md | 7 +++++++ learn_go_suite_test.go | 13 +++++++++++++ imp/imp_test.go => learn_go_test.go | 6 +++--- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 learn_go_suite_test.go rename imp/imp_test.go => learn_go_test.go (70%) diff --git a/README.md b/README.md index 72c2804..1ffad23 100644 --- a/README.md +++ b/README.md @@ -21,3 +21,10 @@ brew install dep ``` TBD. + +## Test + +``` +go get github.com/onsi/ginkgo +go get github.com/onsi/gomega +``` \ No newline at end of file diff --git a/learn_go_suite_test.go b/learn_go_suite_test.go new file mode 100644 index 0000000..67e8b2e --- /dev/null +++ b/learn_go_suite_test.go @@ -0,0 +1,13 @@ +package main_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestLearnGo(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "LearnGo Suite") +} diff --git a/imp/imp_test.go b/learn_go_test.go similarity index 70% rename from imp/imp_test.go rename to learn_go_test.go index 8ebb485..4fca29d 100644 --- a/imp/imp_test.go +++ b/learn_go_test.go @@ -1,7 +1,7 @@ -package imp_test +package main_test import ( - . "./" + . "./imp" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -9,7 +9,7 @@ import ( var _ = Describe("Add", func() { Context("Basic", func() { It("should return correct result", func() { - Expect(Add(1, 2)).Should(Equal(3)) + Expect(Add(1, 2)).Should(Equal(uint64(3))) }) }) }) \ No newline at end of file -- GitLab