Skip to content

rna-transcription: Make exercism schema-compliant #638

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 2 commits into from
Mar 7, 2017
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
118 changes: 64 additions & 54 deletions exercises/rna-transcription/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,66 @@
{
"#": [
"Language implementations vary on the issue of invalid input data.",
"A language may elect to simplify this task by only presenting valid",
"test cases. For languages handling invalid input data as",
"error conditions, invalid test cases are included here and are",
"indicated with an expected value of null. Note however that null is",
"simply an indication here in the JSON. Actually returning null from",
"a rna-transcription function may or may not be idiomatic in a language.",
"Language idioms of errors or exceptions should be followed.",
"Alternative interpretations such as ignoring excess length at the end",
"are not represented here."
],
"cases": [
{
"description": "rna complement of cytosine is guanine",
"dna" : "C",
"expected": "G"
},
{
"description": "rna complement of guanine is cytosine",
"dna": "G",
"expected": "C"
},
{
"description": "rna complement of thymine is adenine",
"dna": "T",
"expected": "A"
},
{
"description": "rna complement of adenine is uracil",
"dna": "A",
"expected": "U"
},
{
"description": "rna complement",
"dna": "ACGTGGTCTTAA",
"expected": "UGCACCAGAAUU"
},
{
"description": "dna correctly handles invalid input",
"dna": "U",
"expected": null
},
{
"description": "dna correctly handles completely invalid input",
"dna": "XXX",
"expected": null
},
{
"description": "dna correctly handles partially invalid input",
"dna": "ACGTXXXCTTAA",
"expected": null
}
]
"exercise": "rna-transcription",
"version": "1.0.0",
"comments": [
"Language implementations vary on the issue of invalid input data.",
"A language may elect to simplify this task by only presenting valid",
"test cases. For languages handling invalid input data as",
"error conditions, invalid test cases are included here and are",
"indicated with an expected value of null. Note however that null is",
"simply an indication here in the JSON. Actually returning null from",
"a rna-transcription function may or may not be idiomatic in a language.",
"Language idioms of errors or exceptions should be followed.",
"Alternative interpretations such as ignoring excess length at the end",
"are not represented here."
],
"cases": [
{
"description": "rna complement of cytosine is guanine",
"property": "toRna",
"dna": "C",
"expected": "G"
},
{
"description": "rna complement of guanine is cytosine",
"property": "toRna",
"dna": "G",
"expected": "C"
},
{
"description": "rna complement of thymine is adenine",
"property": "toRna",
"dna": "T",
"expected": "A"
},
{
"description": "rna complement of adenine is uracil",
"property": "toRna",
"dna": "A",
"expected": "U"
},
{
"description": "rna complement",
"property": "toRna",
"dna": "ACGTGGTCTTAA",
"expected": "UGCACCAGAAUU"
},
{
"description": "dna correctly handles invalid input",
"property": "toRna",
"dna": "U",
"expected": null
},
{
"description": "dna correctly handles completely invalid input",
"property": "toRna",
"dna": "XXX",
"expected": null
},
{
"description": "dna correctly handles partially invalid input",
"property": "toRna",
"dna": "ACGTXXXCTTAA",
"expected": null
}
]
}