[Go] "go test" does not pass
See original GitHub issueThis seems to be a problem with some code that wasn’t updated with ATN serialization/deserialization.
Unfortunately, I don’t think the tests are performed in CI builds. cd runtime/Go/antlr4; go test
. Honestly, these Go-specific tests probably should not even go here, but it is what it is, and I’m continuing the tradition.
ken@DESKTOP-DL44R7B:/mnt/c/msys64/home/Kenne/current/antlr4/runtime/Go/antlr$ go test
panic: Could not deserialize ATN with version 3 (expected 4).
goroutine 1 [running]:
github.com/antlr/antlr4/runtime/Go/antlr.(*ATNDeserializer).checkVersion(0x678980)
/mnt/c/msys64/home/Kenne/current/antlr4/runtime/Go/antlr/atn_deserializer.go:87 +0xdd
github.com/antlr/antlr4/runtime/Go/antlr.(*ATNDeserializer).DeserializeFromUInt16(0xc00011a2a0, {0x678980, 0x7fffffff, 0x10})
/mnt/c/msys64/home/Kenne/current/antlr4/runtime/Go/antlr/atn_deserializer.go:52 +0x7d
github.com/antlr/antlr4/runtime/Go/antlr.init()
/mnt/c/msys64/home/Kenne/current/antlr4/runtime/Go/antlr/testing_lexer_b_test.go:44 +0x672
exit status 2
FAIL github.com/antlr/antlr4/runtime/Go/antlr 0.005s
I’ll fix the code. Blocked on another Go PR because of this.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Go: Test cannot pass? - Stack Overflow
I'm having a problem making this test pass. The problem is, the Write() method in my struct needs to write to a property,...
Read more >Testing in Go: Failing Tests - Ilija Eftimov
Golang's testing package promotes two types of failures. The first failure type immediately stops the tests from running. And the second failure ...
Read more >Testing - Go by Example
Unit testing is an important part of writing principled Go programs. The testing package provides the tools we need to write unit tests...
Read more >Go Test | GoLand Documentation - JetBrains
With the Go Test configuration, you can run and debug Go applications. For more information about running tests, see the following topics:.
Read more >testing - Go Packages
Tests or benchmarks may be skipped at run time with a call to the Skip method of *T or *B: func TestTimeConsuming(t *testing.T)...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The go.mod file is updated and go.sum is now included in the repo, as it should be.
I think that the pure go runtime tests will be useful, but they are not very substantial as they stand. they do not have to reside in the main package, they can be in a test package.
@parrt This can be closed now. The go test does pass, even if the tests don’t really do that much and probably should be expanded greatly.
Go pretty much requires that _test versions of a source reside along side the source they are testing. We could make external tests work, but that would not be the go ‘way’.