Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packet: tests ignore errors in set up #101

Open
kortschak opened this issue Aug 9, 2018 · 2 comments
Open

packet: tests ignore errors in set up #101

kortschak opened this issue Aug 9, 2018 · 2 comments

Comments

@kortschak
Copy link
Contributor

In #97 I found that the test was failing got go1.9 or lower, but not above. I tracked this down to a failure of the set up to provide an non-empty input string because hex.DecodeString was given an odd-length string. The call to hex.DecodeString in the tests in "io_test.go" ignore the "error" returned allowing this kind of test corruption.

@WillGunther
Copy link
Collaborator

I was wondering about that, but I didn't have time to track it down. Good catch!

@kortschak
Copy link
Contributor Author

In the big change to arrays I changed the string parse to panic on error on the basis that tests should fail very noisily if the hard-coded constants are wrong. In the PR I discovered this in, I have just fixed one of them to Fatalf if it's wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants