-
Notifications
You must be signed in to change notification settings - Fork 531
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
Fixed inaccurate test/ignores. #362
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. I got a bit confused by say
, let's take a look
exercises/say/tests/say.rs
Outdated
assert_eq!(say::encode(-1), String::from("won't compile")); | ||
} | ||
|
||
#[test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is changing more lines than I expect it to change. A space got added before each line. That makes it hard to understand what changed, since now each line of this test is marked as a changed line. If this change (add space to each line) needs to be made for some reason, it would want to be a separate commit
exercises/say/tests/say.rs
Outdated
|
||
#[test] | ||
#[ignore] | ||
#[should_panic] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure should_panic
makes sense, since who can say whether the test should panic if it doesn't even compile? I would not add such a line.
I kind of wish Rust would have a #[should_not_compile]
or something, but that is something to bring up with the Rust project, I suppose
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of wish Rust would have a
#[should_not_compile]
That is https://github.com/laumann/compiletest-rs apparently. a project for another day (and probably not something we can make students download)
exercises/say/tests/say.rs
Outdated
@@ -15,8 +15,6 @@ fn test_zero() { | |||
/* | |||
|
|||
#[test] | |||
#[ignore] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the #[ignore]
should still be added, right? should not be removed
exercises/say/tests/say.rs
Outdated
@@ -15,6 +15,7 @@ fn test_zero() { | |||
/* | |||
|
|||
#[test] | |||
#[ignoe] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spelled wrong
Thanks! |
After creating a script to count tests/ignore amounts, this is a fix for the incorrect exercises.
#352