rna_transcription: initial commit

This commit is contained in:
Dmitry Kokorin 2016-03-02 00:06:21 +03:00
parent 94adf21f78
commit 9dca4fc779
3 changed files with 137 additions and 0 deletions

View file

@ -0,0 +1,30 @@
#include "rna_transcription.h"
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_CASE(transcribes_cytidine_to_guanosine)
{
BOOST_REQUIRE_EQUAL('G', transcription::to_rna('C'));
}
#if defined(EXERCISM_RUN_ALL_TESTS)
BOOST_AUTO_TEST_CASE(transcribes_guanosine_to_cytidine)
{
BOOST_REQUIRE_EQUAL('C', transcription::to_rna('G'));
}
BOOST_AUTO_TEST_CASE(transcribes_adenosine_to_uracil)
{
BOOST_REQUIRE_EQUAL('U', transcription::to_rna('A'));
}
BOOST_AUTO_TEST_CASE(transcribes_thymidine_to_adenosine)
{
BOOST_REQUIRE_EQUAL('A', transcription::to_rna('T'));
}
BOOST_AUTO_TEST_CASE(transcribes_all_dna_nucleotides_to_their_rna_complements)
{
BOOST_REQUIRE_EQUAL("UGCACCAGAAUU", transcription::to_rna("ACGTGGTCTTAA"));
}
#endif