Skip to content

sieve: Rewrite tests to use hspec with fail-fast. #295

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

Merged
merged 1 commit into from
Sep 15, 2016
Merged

sieve: Rewrite tests to use hspec with fail-fast. #295

merged 1 commit into from
Sep 15, 2016

Conversation

rbasso
Copy link
Contributor

@rbasso rbasso commented Sep 12, 2016

Related to #211.

@petertseng
Copy link
Member

👍

It makes me realize an interesting thing about the x-common data - "limit is prime" is already covered by 2 case!

, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997
] @=? primesUpTo 1000
, testCase "first thousand primes" $
1000 @=? length (primesUpTo 7919)
Copy link
Member

Choose a reason for hiding this comment

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

did you want to keep this as a track-specific test?

I'm happy regardless of what the answer is

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch!

I just copied the test from x-common and forgot about this one. If you think this adds anything to the exercise, I can put it back without problems. 😄

Copy link
Member

Choose a reason for hiding this comment

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

I think most other tracks do not have it, and I don't think it adds a whole lot for us (if they can go up to 1000, they surely can go up to 7919 without problems, right?), so I wouldn't have been sad to lose it. Unless there is a Haskell-specific consideration that I am not aware of :o

Copy link
Member

Choose a reason for hiding this comment

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

and in case you wanted to look through history, it's been here since the start at 2fa545b

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not the first exercise in the Haskell track that tests big numbers without an obvious reason.

If it is there to test performance, it should go in a benchmark suite (this is something that's easy to do now), if it isn't, the test should have a explicit goal.

Let's just drop it! 😄

@rbasso rbasso merged commit 998ea02 into exercism:master Sep 15, 2016
@rbasso rbasso deleted the hspec-sieve branch September 15, 2016 03:28
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