Skip to content

Generate tests for 55 exercises - #381

Merged
keiravillekode merged 2 commits into
exercism:mainfrom
keiravillekode:generators-generate-32
Sep 29, 2026
Merged

keiravillekode merged 2 commits into
exercism:mainfrom
keiravillekode:generators-generate-32

Conversation

@keiravillekode

@keiravillekode keiravillekode commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Generator changes:

  • d_lines() for lyrics string literals, joined using ~
  • d_grouped_int() for numeric literals with grouped digits, e.g. 10_000
  • describe() can be defined to override the default description generation
  • gen_case() can return a list of strings
  • allTestsEnabled can be omitted (hello-world only has one test)
  • D equal, if used, is imported from std.algorithm.comparison
  • D isClose, if used, is imported from std.math

Tests have comment or whitespace changes, or are unchanged.

Remove unit tests from example solutions

  • affine-cipher
  • state-of-tic-tac-toe

[no important files changed]

Generator changes:
- `d_lines()` for lyrics string literals, joined using `~`
- `d_grouped_int()` for numeric literals with grouped digits, e.g. 10_000
- `describe()` can be defined to override the default description generation
- `gen_case()` can return a list of strings
- `allTestsEnabled` can be omitted (hello-world only has one test)
- D `equal`, if used, is imported from `std.algorithm.comparison`

Tests have comment or whitespace changes, or are unchanged.

[no important files changed]
@github-actions

Copy link
Copy Markdown
Contributor

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.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@github-actions

Copy link
Copy Markdown
Contributor

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)

Generator change:
- D `isClose`, if used, is imported from `std.math`

Tests have comment or whitespace changes, or are unchanged.

Remove unit tests from example solutions
- affine-cipher
- state-of-tic-tac-toe

[no important files changed]
@keiravillekode keiravillekode changed the title Generate tests for 32 exercises Generate tests for 55 exercises Sep 29, 2026
Comment thread generators/lib.py


def assert_equal(first: str, second: str, wrap: bool = False) -> str:
"""Assert that two ranges are equal, optionally one argument per line."""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Two ranges? Two values?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We call D's std.algorithm.comparison.equal

Compares two or more ranges for equality. The ranges may have different element types, as long as all are comparable

The way I read this: We could pass in a doubly linked list of longs, and an array of byes. The template expands to code that checks the range lengths are equal and the corresponding elements are equal.

@keiravillekode
keiravillekode merged commit 5d2fccf into exercism:main Sep 29, 2026
10 checks passed
@keiravillekode
keiravillekode deleted the generators-generate-32 branch September 29, 2026 09:34
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