From e2dfb88cec8e7f97cd590cf9a816d9d2588790b4 Mon Sep 17 00:00:00 2001 From: Simon Jakobi Date: Sun, 17 Aug 2014 13:11:29 +0200 Subject: [PATCH] nucleotide-count: Remove special treatment of uracil For the related discussion see https://github.com/exercism/xpython/pull/98. --- nucleotide-count/example.cpp | 3 --- nucleotide-count/nucleotide_count_test.cpp | 7 ------- 2 files changed, 10 deletions(-) diff --git a/nucleotide-count/example.cpp b/nucleotide-count/example.cpp index 27a8fc9d..0f354d4c 100644 --- a/nucleotide-count/example.cpp +++ b/nucleotide-count/example.cpp @@ -14,9 +14,6 @@ counter::counter(std::string const& sequence) int counter::count(char nucleotide) const { - if (nucleotide == 'U') { - return 0; - } const auto it = counts_.find(nucleotide); if (it == counts_.end()) { throw std::invalid_argument("Unknown nucleotide"); diff --git a/nucleotide-count/nucleotide_count_test.cpp b/nucleotide-count/nucleotide_count_test.cpp index ef406367..73f07303 100644 --- a/nucleotide-count/nucleotide_count_test.cpp +++ b/nucleotide-count/nucleotide_count_test.cpp @@ -67,13 +67,6 @@ BOOST_AUTO_TEST_CASE(counts_a_nucleotide_only_once) BOOST_REQUIRE_EQUAL(2, dna.count('T')); } -BOOST_AUTO_TEST_CASE(has_no_uracil) -{ - const dna::counter dna("GGTTGG"); - - BOOST_REQUIRE_EQUAL(0, dna.count('U')); -} - BOOST_AUTO_TEST_CASE(validates_nucleotides) { const dna::counter dna("GGTTGG");