From 94d0bbb7be563748d624f1929f0fc1808caa41b7 Mon Sep 17 00:00:00 2001 From: rbasso Date: Tue, 7 Mar 2017 03:34:59 +0900 Subject: [PATCH 1/2] rna-transcription: Make canonical-data.json compliant --- exercises/rna-transcription/canonical-data.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/exercises/rna-transcription/canonical-data.json b/exercises/rna-transcription/canonical-data.json index cb415d14f8..87ebca852c 100644 --- a/exercises/rna-transcription/canonical-data.json +++ b/exercises/rna-transcription/canonical-data.json @@ -1,5 +1,7 @@ { - "#": [ + "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", @@ -14,41 +16,49 @@ "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 } From 0b20fff6797ab9be83e23fc282b75cd92cf39e0d Mon Sep 17 00:00:00 2001 From: rbasso Date: Tue, 7 Mar 2017 03:36:08 +0900 Subject: [PATCH 2/2] rna-transcription: Fix canonical-data.json formatting --- .../rna-transcription/canonical-data.json | 124 +++++++++--------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/exercises/rna-transcription/canonical-data.json b/exercises/rna-transcription/canonical-data.json index 87ebca852c..18e9d5d534 100644 --- a/exercises/rna-transcription/canonical-data.json +++ b/exercises/rna-transcription/canonical-data.json @@ -1,66 +1,66 @@ { "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 - } - ] + "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 + } + ] }