I've made simple application in go and trying to run tests with GUI tools of GoLand.
In myfile_test.go file near test func I press green button that should start test. But I get error message: "Compilation failed" and message in console:
# command-line-arguments [command-line-arguments.test]
./myfile_test.go:21:11: undefined: MyStruct
./myfile_test.go:22:12: undefined: MyFuncName
./myfile_test.go:33:12: undefined: AnotherStruct
Compilation finished with exit code 2
Other variants (Run test with Coverage/CPU Profile) don't work either. GoLand 2020.1 EAP. The same problem occurred in older versions of GoLand.
But test from console starts normally:
go test -v
=== RUN TestMyStruct_MyMethod
--- PASS: TestMyStruct_MyMethod (0.00s)
PASS
ok _/home/username/projects/my_project_name 0.002s