gomonkey
gomonkey copied to clipboard
go test build fail
执行go test ./... -gcflags=all=-l
报错,代码拉取的是v2.1.0版本
test/dsl_test/func_dsl_test.go:20:10: undefined: Belong
test/dsl_test/func_dsl_test.go:27:12: undefined: Belong
test/dsl_test/func_dsl_test.go:37:4: undefined: Belong
? github.com/agiledragon/gomonkey/v2 [no test files]
? github.com/agiledragon/gomonkey/v2/dsl [no test files]
ok github.com/agiledragon/gomonkey/v2/test (cached)
FAIL github.com/agiledragon/gomonkey/v2/test/dsl_test [build failed]
? github.com/agiledragon/gomonkey/v2/test/fake [no test files]
FAIL
zhangxiaolongdeMacBook-Pro:test zhangxiaolong$ pwd /Users/zhangxiaolong/Desktop/D/go-workspace/src/github.com/agiledragon/gomonkey/test zhangxiaolongdeMacBook-Pro:test zhangxiaolong$ go test -gcflags=all=-l ............... 15 total assertions
.......... 25 total assertions
............... 40 total assertions
... 43 total assertions
.. 45 total assertions
........ 53 total assertions
............... 68 total assertions
Slice: Add elem: 1 succ ..Slice: Remove elem: 1 succ ..Slice: Add elem: 2 succ ..Slice: Remove elem: 2 succ ..Slice: Add elem: 3 succ .....Slice: Remove elem: 3 succ Slice: Add elem: 4 succ ......Slice: Remove elem: 4 succ
87 total assertions
..... 92 total assertions
PASS ok github.com/agiledragon/gomonkey/v2/test 0.022s zhangxiaolongdeMacBook-Pro:test zhangxiaolong$