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

Fixed inaccurate test/ignores. #362

Merged
merged 6 commits into from
Oct 10, 2017
Merged

Fixed inaccurate test/ignores. #362

merged 6 commits into from
Oct 10, 2017

Conversation

f3rn0s
Copy link
Contributor

@f3rn0s f3rn0s commented Oct 10, 2017

After creating a script to count tests/ignore amounts, this is a fix for the incorrect exercises.

#352

Copy link
Member

@petertseng petertseng left a 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

assert_eq!(say::encode(-1), String::from("won't compile"));
}

#[test]
Copy link
Member

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


#[test]
#[ignore]
#[should_panic]
Copy link
Member

@petertseng petertseng Oct 10, 2017

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

Copy link
Member

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)

@@ -15,8 +15,6 @@ fn test_zero() {
/*

#[test]
#[ignore]
Copy link
Member

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

@@ -15,6 +15,7 @@ fn test_zero() {
/*

#[test]
#[ignoe]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spelled wrong

@petertseng petertseng merged commit 56db57b into exercism:master Oct 10, 2017
@petertseng
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants