19 lines
603 B
C++
19 lines
603 B
C++
|
#include <gtest/gtest.h>
|
||
|
|
||
|
#include "../include/Sequence.hpp"
|
||
|
|
||
|
TEST(TranscriptionTest, BasicTranscription) {
|
||
|
std::string source = "ATG";
|
||
|
std::string target = "AUG";
|
||
|
std::string result = DNASequence(source).transcribe_to_rna().get_sequence();
|
||
|
EXPECT_EQ(target, result);
|
||
|
}
|
||
|
|
||
|
TEST(TranslationTest, BasicTranslation) {
|
||
|
GeneticCode::GetInstance("../resources/codons.txt");
|
||
|
std::string dna_source = "ATGATG";
|
||
|
std::string aa_target = "MM";
|
||
|
std::string result = DNASequence(dna_source).transcribe_to_rna().translate_to_protein().get_sequence();
|
||
|
EXPECT_EQ(aa_target, result);
|
||
|
}
|