anagram: Make the test suite as flexible as possible #393
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For a while, we are doings things that seem to increase the number of solutions accepted by the test suites:
crypto-square
to stop testing for intermediary functions, and test only for the essential properties of the solution.anagramsFor
, because the order is not an essential part of the problem.All of those things where based on the same idea: To allow more diverse solutions.
This seems to be aligned to what was discussed in exercism/discussions#41 and exercism/discussions#44.
Taking this process to the next level, if the essence of the
anagram
problem is to find anagrams, there is no reason to restrict the solutions to work only on Strings and Lists. The following signatures seem equally reasonable:This PR is an experiment on trying to write the most general possible test suite, allowing users to create beautiful solutions using important libraries that are usually not allowed in most of the exercises.
Closes #392.