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

Test code which uses reflect doesn't handle incomplete code well #16

Closed
autarch opened this issue Jun 22, 2018 · 5 comments
Closed

Test code which uses reflect doesn't handle incomplete code well #16

autarch opened this issue Jun 22, 2018 · 5 comments

Comments

@autarch
Copy link
Owner

autarch commented Jun 22, 2018

If a student writes incomplete code that compiles and runs the tests, it's easy for the tests to panic. They probably need a lot more checks for nil all over the place.

@autarch
Copy link
Owner Author

autarch commented Jun 26, 2018

@ribasushi - do you remember what code did this, by any chance? I'm trying to come up with an example to help replicate this. I vaguely remember it was something to do with implementing a func that had the right signature but maybe just returned nil?

@autarch
Copy link
Owner Author

autarch commented Jun 26, 2018

Actually, I'm starting to wonder if this was just another instance of the bug fixed in stretchr/testify#622

@ribasushi
Copy link

@autarch almost certainly yes - the text of the panic() was nearly identical

@autarch
Copy link
Owner Author

autarch commented Jun 26, 2018

Thanks for confirming. Once that PR is merged I think the bulk of these issues will go away. It just turns out that it's fairly easy for the exercise tests to tickle that particular bug.

@autarch
Copy link
Owner Author

autarch commented Jan 4, 2019

Fixed by updating the deps for the class exercises.

@autarch autarch closed this as completed Jan 4, 2019
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