<分区>
当我尝试在 golang 中运行我的测试时,出现以下错误
testing: warning: no tests to run
我还尝试创建一个测试项目,看看它在其他项目中的行为是否相同,这是我的 2 个文件。
package test
func test() string {
return "test"
}
这是我的测试。
package test
import (
"testing"
"github.com/stretchr/testify/assert"
)
func testTest(t *testing.T) {
assert.Equal(t, "test", test(), "String was not test")
}
我尝试运行它:
go test
go test -v
我还测试了 git bash 和 cmd 中的行为。 我在 Windows 10 中使用 Go 1.7.1。
我希望有人能帮助我。