Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

house: Update to test property recite #985

Merged
merged 2 commits into from
Nov 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 45 additions & 33 deletions exercises/house/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
{
"exercise": "house",
"version": "1.0.0",
"version": "2.0.0",
"comments": [
"JSON doesn't allow for multi-line strings, so all verses are presented ",
"here as arrays of strings. It's up to the test generator to join the ",
"lines together with line breaks.",
"Some languages test for the verse() method, which takes a start verse ",
"and optional end verse, but other languages have only tested for the full poem.",
"For those languages in the latter category, you may wish to only ",
"implement the full song test and leave the rest alone, ignoring the start verse, ",
"end verse, and verse fields."
"implement the full song test and leave the rest alone, ignoring the startVerse ",
"and endVerse fields."
],
"cases": [
{
"description": "Return specified verse or series of verses",
"cases": [
{
"description": "verse one - the house that jack built",
"property": "verse",
"verse": 1,
"property": "recite",
"startVerse": 1,
"endVerse": 1,
"expected": [
"This is the house that Jack built."
]
},
{
"description": "verse two - the malt that lay",
"property": "verse",
"verse": 2,
"property": "recite",
"startVerse": 2,
"endVerse": 2,
"expected": [
"This is the malt",
"that lay in the house that Jack built."
]
},
{
"description": "verse three - the rat that ate",
"property": "verse",
"verse": 3,
"property": "recite",
"startVerse": 3,
"endVerse": 3,
"expected": [
"This is the rat",
"that ate the malt",
Expand All @@ -44,8 +47,9 @@
},
{
"description": "verse four - the cat that killed",
"property": "verse",
"verse": 4,
"property": "recite",
"startVerse": 4,
"endVerse": 4,
"expected": [
"This is the cat",
"that killed the rat",
Expand All @@ -55,8 +59,9 @@
},
{
"description": "verse five - the dog that worried",
"property": "verse",
"verse": 5,
"property": "recite",
"startVerse": 5,
"endVerse": 5,
"expected": [
"This is the dog",
"that worried the cat",
Expand All @@ -67,8 +72,9 @@
},
{
"description": "verse six - the cow with the crumpled horn",
"property": "verse",
"verse": 6,
"property": "recite",
"startVerse": 6,
"endVerse": 6,
"expected": [
"This is the cow with the crumpled horn",
"that tossed the dog",
Expand All @@ -80,8 +86,9 @@
},
{
"description": "verse seven - the maiden all forlorn",
"property": "verse",
"verse": 7,
"property": "recite",
"startVerse": 7,
"endVerse": 7,
"expected": [
"This is the maiden all forlorn",
"that milked the cow with the crumpled horn",
Expand All @@ -94,8 +101,9 @@
},
{
"description": "verse eight - the man all tattered and torn",
"property": "verse",
"verse": 8,
"property": "recite",
"startVerse": 8,
"endVerse": 8,
"expected": [
"This is the man all tattered and torn",
"that kissed the maiden all forlorn",
Expand All @@ -109,8 +117,9 @@
},
{
"description": "verse nine - the priest all shaven and shorn",
"property": "verse",
"verse": 9,
"property": "recite",
"startVerse": 9,
"endVerse": 9,
"expected": [
"This is the priest all shaven and shorn",
"that married the man all tattered and torn",
Expand All @@ -125,8 +134,9 @@
},
{
"description": "verse 10 - the rooster that crowed in the morn",
"property": "verse",
"verse": 10,
"property": "recite",
"startVerse": 10,
"endVerse": 10,
"expected": [
"This is the rooster that crowed in the morn",
"that woke the priest all shaven and shorn",
Expand All @@ -142,8 +152,9 @@
},
{
"description": "verse 11 - the farmer sowing his corn",
"property": "verse",
"verse": 11,
"property": "recite",
"startVerse": 11,
"endVerse": 11,
"expected": [
"This is the farmer sowing his corn",
"that kept the rooster that crowed in the morn",
Expand All @@ -160,8 +171,9 @@
},
{
"description": "verse 12 - the horse and the hound and the horn",
"property": "verse",
"verse": 12,
"property": "recite",
"startVerse": 12,
"endVerse": 12,
"expected": [
"This is the horse and the hound and the horn",
"that belonged to the farmer sowing his corn",
Expand All @@ -179,9 +191,9 @@
},
{
"description": "multiple verses",
"property": "verses",
"start verse": 4,
"end verse": 8,
"property": "recite",
"startVerse": 4,
"endVerse": 8,
"expected": [
"This is the cat",
"that killed the rat",
Expand Down Expand Up @@ -221,9 +233,9 @@
},
{
"description": "full rhyme",
"property": "verses",
"start verse": 1,
"end verse": 12,
"property": "recite",
"startVerse": 1,
"endVerse": 12,
"expected": [
"This is the house that Jack built.",
"",
Expand Down
2 changes: 1 addition & 1 deletion exercises/house/description.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Output the nursery rhyme 'This is the House that Jack Built'.
Recite the nursery rhyme 'This is the House that Jack Built'.

> [The] process of placing a phrase of clause within another phrase of
> clause is called embedding. It is through the processes of recursion
Expand Down