未验证 提交 65f600e3 编写于 作者: P Phodal HUANG

feat: add first test

上级 1609c04a
# learn-go
## 安装 Go
```bash
brew install go
```
配置环境
```bash
export GOROOT=/usr/local/opt/go/libexec
export GOPATH=$HOME/.go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
```
### 安装 Go 依赖管理工具:godep
```
brew install dep
```
TBD.
package imp
import "fmt"
func Count(x uint64) int {
fmt.Println("count")
return int(1)
func Add(x uint64, y uint64) uint64 {
return x + y
}
package imp_test
import (
. "./"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Add", func() {
Context("Basic", func() {
It("should return correct result", func() {
Expect(Add(1, 2)).Should(Equal(3))
})
})
})
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册