Test code extraction for exercises with separate file for test cases #80
Labels
x:action/improve
Improve existing functionality/content
x:knowledge/intermediate
Quite a bit of Exercism knowledge required
x:module/test-runner
Work on Test Runners
x:rep/large
Large amount of reputation
x:size/medium
Medium amount of work
x:type/coding
Write code that is not student-facing content (e.g. test-runners, generators, but not exercises)
For practice exercises that have a generator, the list of test cases is written into a separate file
cases_test.go
currently because this is easier to do for the generator then to somehow insert it into an existing test file.The issue is that the test runner currently can't handle this separate file. The content of that file is ignored which leads to sub-optimal output on the website. The extracted code does not include the actual test case.
The current output e.g. for hamming looks like this:
What we would like to have instead is:
This be be doable by AST parsing the cases file and inserting the test cases AST part into the
Test
function so the result mimics the usual structure that the test runner can handle correctly, see https://github.com/exercism/go-test-runner#subtest-format-specification.Related: exercism/go#1872
The text was updated successfully, but these errors were encountered: