Repository navigation
Generate pangram's test suite from the canonical data - #913
Conversation
Add `.meta/template.j2` so `bin/generate-tests` renders the suite, in the braceless Scala 3 style `.scalafmt.conf` asks for. `tests.toml` is re-synced with configlet. The new canonical case, "a-m and A-M are 26 different characters but not a pangram", reimplements "case insensitive", so the generated suite has the new case instead of the old one. Test names now follow the canonical descriptions, and the stale `@version 1.4.0` header is gone. The example drops the deprecated `toStream` and checks that the alphabet is a subset of the sentence's lower-cased characters. The stub moves to optional braces, with the same signature. The blurb is synced with problem-specifications. Part of #488 and #843. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 |
|
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) |
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
This PR has been translated 🚀 |
Brings
pangramin line with problem-specifications and moves it onto the test generator. Part of #488 and #843.Tests
.meta/tests.tomlre-synced withbin/configlet sync --tests include -e pangram. One canonical case was missing: "a-m and A-M are 26 different characters but not a pangram" (abcdefghijklm ABCDEFGHIJKLM→false). Itreimplements"case insensitive", so the generator emits the new case instead of the old one: still 10 cases..meta/template.j2, written in the braceless style likerelative-distance's, so the rendered suite already matches.scalafmt.conf."empty sentence"instead of"sentence empty", …), and the stale/** @version 1.4.0 */header is gone.Example and stub
toStream, deprecated since 2.13, for a set check:('a' to 'z').toSet.subsetOf(input.toLowerCase.toSet).Pangrams.isPangram(input: String): Booleanis unchanged..meta/config.json: blurb synced with problem-specifications (configlet sync --metadata), and added to contributors.The suite gains a case that existing solutions may not pass (one that counts upper and lower case separately), so this is an important-files change on purpose.
Verification
bin/test pangram: 10 of 10 pass.bin/generate-tests --check: 6 generated suites up to date.scalafmt --listwith the track config: no changes for the example, stub and suite.bin/verify-exercises-in-docker pangramagainstexercism/scala-test-runner:latest: passes.configlet sync --tests --metadata -e pangram: up to date;configlet lintpasses.🤖 Generated with Claude Code