TEST(QualityValueVectorTest, Copy){
    EXPECT_EQ(qvstr.size(), data.size());

    QualityValueVector<QualityValue> qual;
    EXPECT_TRUE(qual.Empty());

    // Copy qvs from a string
    qual.Copy(qvstr);
    EXPECT_FALSE(qual.Empty());
    for(size_t i = 0; i < qvstr.size(); i++) {
        EXPECT_EQ(static_cast<uint8_t>(qual.data[i]), data[i]);
    }
}
Ejemplo n.º 2
0
void QualityValueVector<T_QV>::Copy(const QualityValueVector<T_QV> &rhs, const DNALength length) {
    Free();
    if (rhs.Empty()) { 
        return;
    }
    Allocate(length);
    std::memcpy(data, rhs.data, length * sizeof(T_QV));
}