Skip to content

[space-age] Add a Jinja test template#320

Open
IsaacG wants to merge 3 commits into
exercism:mainfrom
IsaacG:test_gen.space-age
Open

[space-age] Add a Jinja test template#320
IsaacG wants to merge 3 commits into
exercism:mainfrom
IsaacG:test_gen.space-age

Conversation

@IsaacG

@IsaacG IsaacG commented Jul 5, 2026

Copy link
Copy Markdown
Member

No description provided.

@IsaacG IsaacG added x:module/generator Work on Exercise generators x:module/practice-exercise Work on Practice Exercises x:size/medium Medium amount of work x:rep/medium Medium amount of reputation labels Jul 5, 2026
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

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!

@IsaacG IsaacG marked this pull request as draft July 5, 2026 02:17
@colinleach

colinleach commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Fixing the compiler error just needs a d0 added to the expected value, but now we have a precision issue. The old test file specifies expected to 17 decimal places, `problem-specifications rounds to 2 decimal places.

  • The ultra-precise calculation is kind of in the spirit of Fortran.
  • Canonical data for this exercise is pretty stable, so we don't need to keep re-syncing.

I'm tempted to leave it as-is, but I'd welcome your opinion.

@IsaacG

IsaacG commented Jul 5, 2026

Copy link
Copy Markdown
Member Author

If the precision is idiomatic Fortran, we could totally keep it in. I'm not remotely familiar with what is and isn't idiomatic here. We could probably re-implement the solution in the Jinja template file and have three template spit out expected value to 17 decimal places. Feel free to take a crack at that or I can try to circle back to this later.

@IsaacG IsaacG marked this pull request as ready for review July 5, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

x:module/generator Work on Exercise generators x:module/practice-exercise Work on Practice Exercises x:rep/medium Medium amount of reputation x:size/medium Medium amount of work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants