Skip to content

kindergarten-garden: add canonical data #770

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

Merged
Merged
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
124 changes: 124 additions & 0 deletions exercises/kindergarten-garden/canonical-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"exercise": "kindergarten-garden",
"version": "1.0.0",
"comments": [
"Garden can be created with just a diagram or a diagram and students."
],
"cases": [
{
"description": "partial garden",
"cases": [
{
"description": "garden with single student",
"property": "plants",
"diagram": "RC\nGG",
"student": "Alice",
"expected": ["radishes", "clover", "grass", "grass"]
},
{
"description": "different garden with single student",
"property": "plants",
"diagram": "VC\nRC",
"student": "Alice",
"expected": ["violets", "clover", "radishes", "clover"]
},
{
"description": "garden with two students",
"property": "plants",
"diagram": "VVCG\nVVRC",
"student": "Bob",
"expected": ["clover", "grass", "radishes", "clover"]
},
{
"description": "multiple students for the same garden with three students",
"cases": [
{
"description": "second student's garden",
"property": "plants",
"diagram": "VVCCGG\nVVCCGG",
"student": "Bob",
"expected": ["clover", "clover", "clover", "clover"]
},
{
"description": "third student's garden",
"property": "plants",
"diagram": "VVCCGG\nVVCCGG",
"student": "Charlie",
"expected": ["grass", "grass", "grass", "grass"]
}
]
}
]
},
{
"description": "full garden",
"cases": [
{
"description": "first student's garden",
"property": "plants",
"diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
"student": "Alice",
"expected": ["violets", "radishes", "violets", "radishes"]
},
{
"description": "second student's garden",
"property": "plants",
"diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
"student": "Bob",
"expected": ["clover", "grass", "clover", "clover"]
},
{
"description": "second to last student's garden",
"property": "plants",
"diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
"student": "Kincaid",
"expected": ["grass", "clover", "clover", "grass"]
},
{
"description": "last student's garden",
"property": "plants",
"diagram": "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV",
"student": "Larry",
"expected": ["grass", "violets", "clover", "violets"]
}
]
},
{
"description": "non-alphabetical student list",
"cases": [
{
"description": "first student's garden",
"property": "plants",
"students": ["Samantha", "Patricia", "Xander", "Roger"],
"diagram": "VCRRGVRG\nRVGCCGCV",
"student": "Patricia",
"expected": ["violets", "clover", "radishes", "violets"]
},
{
"description": "second student's garden",
"property": "plants",
"students": ["Samantha", "Patricia", "Xander", "Roger"],
"diagram": "VCRRGVRG\nRVGCCGCV",
"student": "Roger",
"expected": ["radishes", "radishes", "grass", "clover"]
},
{
"description": "third student's garden",
"property": "plants",
"students": ["Samantha", "Patricia", "Xander", "Roger"],
"diagram": "VCRRGVRG\nRVGCCGCV",
"student": "Samantha",
"expected": ["grass", "violets", "clover", "grass"]
},
{
"description": "fourth (last) student's garden",
"property": "plants",
"students": ["Samantha", "Patricia", "Xander", "Roger"],
"diagram": "VCRRGVRG\nRVGCCGCV",
"student": "Xander",
"expected": ["radishes", "grass", "clover", "violets"]
}
]
}
]
}