示例#1
0
TEST(CigarStringTest, ToStdString_SingleOp)
{
    const string singleCigar = "100=";

    Cigar cigar;
    cigar.push_back( CigarOperation(CigarOperationType::SEQUENCE_MATCH, 100) );

    EXPECT_EQ(singleCigar, cigar.ToStdString());
}
示例#2
0
TEST(CigarStringTest, ToStdString_MultipleOps)
{
    const string multiCigar = "100=2D34I6=6X6=";

    Cigar cigar;
    cigar.push_back(CigarOperation(CigarOperationType::SEQUENCE_MATCH,  100));
    cigar.push_back(CigarOperation(CigarOperationType::DELETION,          2));
    cigar.push_back(CigarOperation(CigarOperationType::INSERTION,        34));
    cigar.push_back(CigarOperation(CigarOperationType::SEQUENCE_MATCH,    6));
    cigar.push_back(CigarOperation(CigarOperationType::SEQUENCE_MISMATCH, 6));
    cigar.push_back(CigarOperation(CigarOperationType::SEQUENCE_MATCH,    6));

    EXPECT_EQ(multiCigar, cigar.ToStdString());
}
示例#3
0
TEST(CigarStringTest, ToStdString_Empty)
{
    const string empty;
    Cigar cigar;
    EXPECT_EQ(empty, cigar.ToStdString());
}