From b40fc01bbf02b17a81af09c6eb47557de47bc33f Mon Sep 17 00:00:00 2001 From: rbasso Date: Thu, 9 Mar 2017 18:09:01 +0900 Subject: [PATCH 1/2] nucleotide-count: Make canonical-data.json compliant --- exercises/nucleotide-count/canonical-data.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/exercises/nucleotide-count/canonical-data.json b/exercises/nucleotide-count/canonical-data.json index 6ec735e0e8..f9143764b8 100644 --- a/exercises/nucleotide-count/canonical-data.json +++ b/exercises/nucleotide-count/canonical-data.json @@ -1,9 +1,13 @@ { - "nucleotide_counts": { + "exercise": "nucleotide-count", + "version": "1.0.0", + "cases": [ + { "description": "count all nucleotides in a strand", "cases": [ { "description": "empty strand", + "property": "nucleotideCounts", "strand": "", "expected": { "A": 0, @@ -14,6 +18,7 @@ }, { "description": "strand with repeated nucleotide", + "property": "nucleotideCounts", "strand": "GGGGGGG", "expected": { "A": 0, @@ -24,6 +29,7 @@ }, { "description": "strand with multiple nucleotides", + "property": "nucleotideCounts", "strand": "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC", "expected": { "A": 20, @@ -34,6 +40,7 @@ }, { "description": "strand with invalid nucleotides", + "property": "nucleotideCounts", "strand": "AGXXACT", "expected": { "error": "Invalid nucleotide in strand" @@ -41,4 +48,5 @@ } ] } + ] } From bff95bb2b6e8b1b8b68cff16d52df275e2cfcad3 Mon Sep 17 00:00:00 2001 From: rbasso Date: Thu, 9 Mar 2017 18:10:29 +0900 Subject: [PATCH 2/2] nucleotide-count: Fix canonical-data.json formatting --- .../nucleotide-count/canonical-data.json | 90 +++++++++---------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/exercises/nucleotide-count/canonical-data.json b/exercises/nucleotide-count/canonical-data.json index f9143764b8..c2752992d5 100644 --- a/exercises/nucleotide-count/canonical-data.json +++ b/exercises/nucleotide-count/canonical-data.json @@ -2,51 +2,51 @@ "exercise": "nucleotide-count", "version": "1.0.0", "cases": [ - { - "description": "count all nucleotides in a strand", - "cases": [ - { - "description": "empty strand", - "property": "nucleotideCounts", - "strand": "", - "expected": { - "A": 0, - "C": 0, - "G": 0, - "T": 0 + { + "description": "count all nucleotides in a strand", + "cases": [ + { + "description": "empty strand", + "property": "nucleotideCounts", + "strand": "", + "expected": { + "A": 0, + "C": 0, + "G": 0, + "T": 0 + } + }, + { + "description": "strand with repeated nucleotide", + "property": "nucleotideCounts", + "strand": "GGGGGGG", + "expected": { + "A": 0, + "C": 0, + "G": 7, + "T": 0 + } + }, + { + "description": "strand with multiple nucleotides", + "property": "nucleotideCounts", + "strand": "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC", + "expected": { + "A": 20, + "C": 12, + "G": 17, + "T": 21 + } + }, + { + "description": "strand with invalid nucleotides", + "property": "nucleotideCounts", + "strand": "AGXXACT", + "expected": { + "error": "Invalid nucleotide in strand" + } } - }, - { - "description": "strand with repeated nucleotide", - "property": "nucleotideCounts", - "strand": "GGGGGGG", - "expected": { - "A": 0, - "C": 0, - "G": 7, - "T": 0 - } - }, - { - "description": "strand with multiple nucleotides", - "property": "nucleotideCounts", - "strand": "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC", - "expected": { - "A": 20, - "C": 12, - "G": 17, - "T": 21 - } - }, - { - "description": "strand with invalid nucleotides", - "property": "nucleotideCounts", - "strand": "AGXXACT", - "expected": { - "error": "Invalid nucleotide in strand" - } - } - ] - } + ] + } ] }