Skip to content

word-count: Generalize test suite.#403

Merged
petertseng merged 1 commit intoexercism:masterfrom
rbasso:word-count-generalize
Oct 21, 2016
Merged

word-count: Generalize test suite.#403
petertseng merged 1 commit intoexercism:masterfrom
rbasso:word-count-generalize

Conversation

@rbasso
Copy link
Copy Markdown
Contributor

@rbasso rbasso commented Oct 19, 2016

  • Generalize the test suite to accept multiple signatures.
  • Change the test suite to be case insensitive.
  • Add HINTS.md explaining that the test suite is flexible.
  • Add two example solutions: one very simple; the other with a custom type.
  • Add the simplest type signature to the stub solution.
  • Remove unneeded dependencies from package.yaml.
  • Remove old example solution.

These changes tries to make this exercise, at the same time, more accessible and deeper. Beginners will probably be able to solve it easily, while more advanced students will be able the craft more elaborated solutions.

Also, we used shouldMatchList to improve error reporting and we normalize case before comparing, because the output's case is not an essential part of the problem.

This PR is very similar to #393, that changed anagram to be more flexible, and it is also compatible with previously working solutions.

- Generalize the test suite to accept multiple signatures.
- Change the test suite to be case insensitive.
- Add `HINTS.md` explaining that the test suite is flexible.
- Add two example solutions: one very simple; the other with a custom type.
- Add the simplest type signature to the stub solution.
- Remove unneeded dependencies from `package.yaml`.
- Remove old example solution.
@petertseng
Copy link
Copy Markdown
Member

Everything seems good - the only reason I'm not merging myself immediately is to ask this question - do you think we need to address the caching with multiple examples before merging this? This only affects the build time in a limited way - the exercises with multiple examples are always going to be recompiled, right? Or is it more?

@rbasso
Copy link
Copy Markdown
Contributor Author

rbasso commented Oct 21, 2016

I think it is safe to merge and enjoy the new functionality, and then we'll see how critical is to fix the caching. 😄

@petertseng
Copy link
Copy Markdown
Member

OK We'll just take both of the multi-example changes and see what happen.

@petertseng petertseng merged commit f044855 into exercism:master Oct 21, 2016
@rbasso rbasso deleted the word-count-generalize branch October 21, 2016 07:01
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