From 5352ff3895ea932b03599ccb4ca8ab0968cff221 Mon Sep 17 00:00:00 2001 From: Bryan Mulvihill Date: Sat, 22 Oct 2016 15:18:54 -0400 Subject: [PATCH 1/2] Update README with Exercise Generators --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 3f1bae9676..e1d3ac809c 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,16 @@ then additional inputs/outputs should be submitted to the x-common repository. Changes to the test suite (style, boilerplate, etc) will probably have to be made to `example.tt`. +### Exercise Generators + +If you wish to create a new generator, or edit an existing one, the generators currently live in the lib directory and are named `$PROBLEM_cases.rb`. For example, the hamming generator is `lib/hamming_cases.rb`. + +All generators currently adhere to a common public interface, and must define the following three methods: + +- `test_name` - Output the name of the test +- `workload` - Output the body of the test +- `skipped` - Output skip syntax + ## Pull Requests We welcome pull requests that provide fixes to existing test suites (missing From 06fd3780f1604de9c75dba5fa5d26f8a2fba35bf Mon Sep 17 00:00:00 2001 From: Bryan Mulvihill Date: Mon, 28 Nov 2016 09:09:47 -0500 Subject: [PATCH 2/2] Update definitions --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e1d3ac809c..89b14e6d04 100644 --- a/README.md +++ b/README.md @@ -114,9 +114,9 @@ If you wish to create a new generator, or edit an existing one, the generators c All generators currently adhere to a common public interface, and must define the following three methods: -- `test_name` - Output the name of the test -- `workload` - Output the body of the test -- `skipped` - Output skip syntax +- `test_name` - Returns the name of the test (i.e `test_one_equals_one`) +- `workload` - Returns the main syntax for the test. This will vary depending on the test generator and its underlying implementation +- `skipped` - Returns skip syntax (i.e. `skip` or `# skip`) ## Pull Requests