From 3480b1990e2033bb35bff8272280b85f1ee4b199 Mon Sep 17 00:00:00 2001 From: Rob Keim Date: Mon, 30 Oct 2017 21:07:04 +0700 Subject: [PATCH 1/2] Update house to use recite --- exercises/house/canonical-data.json | 70 +++++++++++++++++------------ exercises/house/description.md | 2 +- 2 files changed, 42 insertions(+), 30 deletions(-) diff --git a/exercises/house/canonical-data.json b/exercises/house/canonical-data.json index 615add8618..cbb0d81d2e 100644 --- a/exercises/house/canonical-data.json +++ b/exercises/house/canonical-data.json @@ -1,6 +1,6 @@ { "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 ", @@ -8,8 +8,8 @@ "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 start verse ", + "and end verse fields." ], "cases": [ { @@ -17,16 +17,18 @@ "cases": [ { "description": "verse one - the house that jack built", - "property": "verse", - "verse": 1, + "property": "recite", + "start verse": 1, + "end verse": 1, "expected": [ "This is the house that Jack built." ] }, { "description": "verse two - the malt that lay", - "property": "verse", - "verse": 2, + "property": "recite", + "start verse": 2, + "end verse": 2, "expected": [ "This is the malt", "that lay in the house that Jack built." @@ -34,8 +36,9 @@ }, { "description": "verse three - the rat that ate", - "property": "verse", - "verse": 3, + "property": "recite", + "start verse": 3, + "end verse": 3, "expected": [ "This is the rat", "that ate the malt", @@ -44,8 +47,9 @@ }, { "description": "verse four - the cat that killed", - "property": "verse", - "verse": 4, + "property": "recite", + "start verse": 4, + "end verse": 4, "expected": [ "This is the cat", "that killed the rat", @@ -55,8 +59,9 @@ }, { "description": "verse five - the dog that worried", - "property": "verse", - "verse": 5, + "property": "recite", + "start verse": 5, + "end verse": 5, "expected": [ "This is the dog", "that worried the cat", @@ -67,8 +72,9 @@ }, { "description": "verse six - the cow with the crumpled horn", - "property": "verse", - "verse": 6, + "property": "recite", + "start verse": 6, + "end verse": 6, "expected": [ "This is the cow with the crumpled horn", "that tossed the dog", @@ -80,8 +86,9 @@ }, { "description": "verse seven - the maiden all forlorn", - "property": "verse", - "verse": 7, + "property": "recite", + "start verse": 7, + "end verse": 7, "expected": [ "This is the maiden all forlorn", "that milked the cow with the crumpled horn", @@ -94,8 +101,9 @@ }, { "description": "verse eight - the man all tattered and torn", - "property": "verse", - "verse": 8, + "property": "recite", + "start verse": 8, + "end verse": 8, "expected": [ "This is the man all tattered and torn", "that kissed the maiden all forlorn", @@ -109,8 +117,9 @@ }, { "description": "verse nine - the priest all shaven and shorn", - "property": "verse", - "verse": 9, + "property": "recite", + "start verse": 9, + "end verse": 9, "expected": [ "This is the priest all shaven and shorn", "that married the man all tattered and torn", @@ -125,8 +134,9 @@ }, { "description": "verse 10 - the rooster that crowed in the morn", - "property": "verse", - "verse": 10, + "property": "recite", + "start verse": 10, + "end verse": 10, "expected": [ "This is the rooster that crowed in the morn", "that woke the priest all shaven and shorn", @@ -142,8 +152,9 @@ }, { "description": "verse 11 - the farmer sowing his corn", - "property": "verse", - "verse": 11, + "property": "recite", + "start verse": 11, + "end verse": 11, "expected": [ "This is the farmer sowing his corn", "that kept the rooster that crowed in the morn", @@ -160,8 +171,9 @@ }, { "description": "verse 12 - the horse and the hound and the horn", - "property": "verse", - "verse": 12, + "property": "recite", + "start verse": 12, + "end verse": 12, "expected": [ "This is the horse and the hound and the horn", "that belonged to the farmer sowing his corn", @@ -179,7 +191,7 @@ }, { "description": "multiple verses", - "property": "verses", + "property": "recite", "start verse": 4, "end verse": 8, "expected": [ @@ -221,7 +233,7 @@ }, { "description": "full rhyme", - "property": "verses", + "property": "recite", "start verse": 1, "end verse": 12, "expected": [ diff --git a/exercises/house/description.md b/exercises/house/description.md index 9430aca233..0897f27111 100644 --- a/exercises/house/description.md +++ b/exercises/house/description.md @@ -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 From 3b3aef4e43c4357414d83be33b300a7e40d91097 Mon Sep 17 00:00:00 2001 From: Rob Keim Date: Mon, 30 Oct 2017 22:23:22 +0700 Subject: [PATCH 2/2] Update properties to lowerCamelCase --- exercises/house/canonical-data.json | 60 ++++++++++++++--------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/exercises/house/canonical-data.json b/exercises/house/canonical-data.json index cbb0d81d2e..2b8c751623 100644 --- a/exercises/house/canonical-data.json +++ b/exercises/house/canonical-data.json @@ -8,8 +8,8 @@ "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 ", - "and end verse fields." + "implement the full song test and leave the rest alone, ignoring the startVerse ", + "and endVerse fields." ], "cases": [ { @@ -18,8 +18,8 @@ { "description": "verse one - the house that jack built", "property": "recite", - "start verse": 1, - "end verse": 1, + "startVerse": 1, + "endVerse": 1, "expected": [ "This is the house that Jack built." ] @@ -27,8 +27,8 @@ { "description": "verse two - the malt that lay", "property": "recite", - "start verse": 2, - "end verse": 2, + "startVerse": 2, + "endVerse": 2, "expected": [ "This is the malt", "that lay in the house that Jack built." @@ -37,8 +37,8 @@ { "description": "verse three - the rat that ate", "property": "recite", - "start verse": 3, - "end verse": 3, + "startVerse": 3, + "endVerse": 3, "expected": [ "This is the rat", "that ate the malt", @@ -48,8 +48,8 @@ { "description": "verse four - the cat that killed", "property": "recite", - "start verse": 4, - "end verse": 4, + "startVerse": 4, + "endVerse": 4, "expected": [ "This is the cat", "that killed the rat", @@ -60,8 +60,8 @@ { "description": "verse five - the dog that worried", "property": "recite", - "start verse": 5, - "end verse": 5, + "startVerse": 5, + "endVerse": 5, "expected": [ "This is the dog", "that worried the cat", @@ -73,8 +73,8 @@ { "description": "verse six - the cow with the crumpled horn", "property": "recite", - "start verse": 6, - "end verse": 6, + "startVerse": 6, + "endVerse": 6, "expected": [ "This is the cow with the crumpled horn", "that tossed the dog", @@ -87,8 +87,8 @@ { "description": "verse seven - the maiden all forlorn", "property": "recite", - "start verse": 7, - "end verse": 7, + "startVerse": 7, + "endVerse": 7, "expected": [ "This is the maiden all forlorn", "that milked the cow with the crumpled horn", @@ -102,8 +102,8 @@ { "description": "verse eight - the man all tattered and torn", "property": "recite", - "start verse": 8, - "end verse": 8, + "startVerse": 8, + "endVerse": 8, "expected": [ "This is the man all tattered and torn", "that kissed the maiden all forlorn", @@ -118,8 +118,8 @@ { "description": "verse nine - the priest all shaven and shorn", "property": "recite", - "start verse": 9, - "end verse": 9, + "startVerse": 9, + "endVerse": 9, "expected": [ "This is the priest all shaven and shorn", "that married the man all tattered and torn", @@ -135,8 +135,8 @@ { "description": "verse 10 - the rooster that crowed in the morn", "property": "recite", - "start verse": 10, - "end verse": 10, + "startVerse": 10, + "endVerse": 10, "expected": [ "This is the rooster that crowed in the morn", "that woke the priest all shaven and shorn", @@ -153,8 +153,8 @@ { "description": "verse 11 - the farmer sowing his corn", "property": "recite", - "start verse": 11, - "end verse": 11, + "startVerse": 11, + "endVerse": 11, "expected": [ "This is the farmer sowing his corn", "that kept the rooster that crowed in the morn", @@ -172,8 +172,8 @@ { "description": "verse 12 - the horse and the hound and the horn", "property": "recite", - "start verse": 12, - "end verse": 12, + "startVerse": 12, + "endVerse": 12, "expected": [ "This is the horse and the hound and the horn", "that belonged to the farmer sowing his corn", @@ -192,8 +192,8 @@ { "description": "multiple verses", "property": "recite", - "start verse": 4, - "end verse": 8, + "startVerse": 4, + "endVerse": 8, "expected": [ "This is the cat", "that killed the rat", @@ -234,8 +234,8 @@ { "description": "full rhyme", "property": "recite", - "start verse": 1, - "end verse": 12, + "startVerse": 1, + "endVerse": 12, "expected": [ "This is the house that Jack built.", "",