Closed agosto-calvinbehling closed 4 years ago
@agosto-calvinbehling - Apparently, runtime.CallerFrames
returned errant blank entries in Go 1.11. This isn't a problem from Go 1.12 and higher:
$ go version && go test -v
go version go1.13.9 darwin/amd64
=== RUN TestExampleFixture
=== PAUSE TestExampleFixture
=== CONT TestExampleFixture
=== RUN TestExampleFixture/TestWithAssertions
=== PAUSE TestExampleFixture/TestWithAssertions
=== CONT TestExampleFixture/TestWithAssertions
TestExampleFixture/TestWithAssertions: test_case.go:67: Test definition:
/Users/mike/Desktop/gunit_runtime_error/example_test.go:18
TestExampleFixture/TestWithAssertions: fixture.go:102:
(0): this.So(1, should.Equal, 2) // example_test.go:19
Expected: '2'
Actual: '1'
(Should be equal)
--- FAIL: TestExampleFixture (0.00s)
--- FAIL: TestExampleFixture/TestWithAssertions (0.00s)
FAIL
exit status 1
FAIL gunit_runtime_error 0.293s
I've supplied a fix for this (version v1.1.4
), but in the future, please refer to the Go module files of your dependencies to see if your version of go is supported. This project defines Go 1.13 as the minimum supported version of go.
Huh. Kind of assumed go modules would tell me about that. Good to know. Thanks.
Yeah, it only warns on compilation failures.
Go version
go version go1.11.6 linux/amd64
What I did Created a test which fails
What I expected A relevant error message and a more concise stack trace.
What happened panic.
index out of range
is not relevant to the assertion.Example code
Modules
Output