Sync anagram tests with problem specifications - #539
Conversation
|
Hello. Thanks for opening a PR on Exercism 🙂 We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in. You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch. If you're interested in learning more about this auto-responder, please read this blog post. Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it. |
|
Hello 👋 Thanks for your PR. This repo does not currently have dedicated maintainers. Our cross-track maintainers team will attempt to review and merge your PR, but it will likely take longer for your PR to be reviewed. If you enjoy contributing to Exercism and have a track-record of doing so successfully, you might like to become an Exercism maintainer for this track. Please feel free to ask any questions, or chat to us about anything to do with this PR or the reviewing process on the Exercism forum. (cc @exercism/cross-track-maintainers) |
|
This is an unmaintained repository. Cross-track maintainers - feel free to merge. |
|
This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested. If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos. For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping |
There was a problem hiding this comment.
I should have made this clearer, but part of the process is auditing the existing stuff in the tests.toml in regards to reimplemented tests. This test (https://github.com/exercism/problem-specifications/blob/03f83310ed0547b902d211a05d23b3d74661df02/exercises/anagram/canonical-data.json#L15) is actually a test that was reimplemented by another test (https://github.com/exercism/problem-specifications/blob/03f83310ed0547b902d211a05d23b3d74661df02/exercises/anagram/canonical-data.json#L25). So we need to remove the test here and add the other test since it's not already present.
In other words, a reimplemented test shouldn't appear in the test suite. The test that reimplements it should appear in the test suite unless of course it's also reimplemented by another test.
There was a problem hiding this comment.
I've updated the anagram test suite so that the reimplemented canonical case is used instead of the older case.
Specifically, DetectMultipleAnagrams now uses the replacement solemn test from the canonical data instead of the reimplemented master case.
I also removed the Skip from the replacement test.
Verified with:
- 16/16 tests passing
configlet syncreports the exercise is up to dategit diff --checkpasses cleanly
The fix has been committed and pushed to the existing PR.
There was a problem hiding this comment.
I see five missing tests that the tests.toml indicates are implemented but aren't present in the test suite. Those still need to be added for the test suite to be considered synced.
- 64cd4584-fc15-4781-b633-3d814c4941a4 - "detects anagram"
- 78487770-e258-4e1f-a646-8ece10950d90 - "detects multiple anagrams with different case"
- b248e49f-0905-48d2-9c8d-bd02d8c3e392 - "detects anagrams using case-insensitive subject"
- f367325c-78ec-411c-be76-e79047f4bd54 - "detects anagrams using case-insensitive possible matches"
- `9878a1c9-d6ea-4235-ae51-3ea2befd6842 - "anagrams must use all letters exactly once"
| End Sub | ||
|
|
||
| <Fact(Skip:="Remove this Skip property to run this test")> | ||
| <Fact> |
There was a problem hiding this comment.
| <Fact> | |
| <Fact(Skip:="Remove this Skip property to run this test")> |
Only the first test in the entire suite should be unskipped. Every subsequent test is skipped so the student ideally unskips them one at a time.
| Assert.Equal(expected, result) | ||
| End Sub | ||
|
|
||
| <Fact(Skip:="Remove this Skip property to run this test")> |
There was a problem hiding this comment.
This test isn't in the problem specifications so it should be removed.
| Assert.Equal(expected, result) | ||
| End Sub | ||
|
|
||
| <Fact(Skip:="Remove this Skip property to run this test")> |
There was a problem hiding this comment.
This test isn't in the problem specifications so it should be removed.
| Assert.Equal(expected, result) | ||
| End Sub | ||
|
|
||
| <Fact(Skip:="Remove this Skip property to run this test")> |
There was a problem hiding this comment.
This test isn't in the problem specifications and should be removed.
There was a problem hiding this comment.
I think the tests here need to be resorted so the order that's in the tests.toml. That'll make it easier to spot things that aren't canonical.
|
Thanks for the feedback! I've removed the three non-canonical tests, re-skipped Would you like me to add those missing canonical cases as well, or should I only reorder the existing tests to match I wanted to check with you before making any additional changes. |
|
Updated the anagram exercise test suite based on the canonical problem specifications and review feedback. Changes
Verification
I also noticed that there are five additional canonical cases that aren't currently represented in If you'd like me to add those five cases as well, please let me know! |
Description
Syncs the
anagramexercise with the latest canonical test cases from theproblem-specificationsrepository.Changes
LISTENanagram case..meta/tests.tomlwith the new canonical UUIDs andreimplementsrelationships.include = false.Verification
git diff --checkpasses.pwsh ./bin/test.ps1 anagrampasses with 16/16 tests.Closes #420