MCPcopy Create free account
hub / github.com/BirolLab/abyss / TEST

Function TEST

Unittest/DBG/LoadAlgorithmTest.cpp:14–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12using namespace std;
13
14TEST(LoadAlgorithmTest, base)
15{
16 typedef SequenceCollectionHash Graph;
17 Graph g;
18
19 opt::kmerSize = 5;
20 Kmer::setLength(5);
21
22 Sequence seq("TAATGCCA");
23
24 AssemblyAlgorithms::loadSequence(&g, seq);
25
26 unordered_set<Kmer> kmers, expectedKmers;
27
28 expectedKmers.insert(Kmer("TAATG"));
29 expectedKmers.insert(Kmer("AATGC"));
30 expectedKmers.insert(Kmer("ATGCC"));
31 expectedKmers.insert(Kmer("TGCCA"));
32
33 for (Graph::const_iterator it = g.begin();
34 it != g.end(); ++it) {
35 Kmer kmer(it->first);
36#if 0
37cerr << "visiting Kmer: " << kmer << "\n";
38#endif
39 ASSERT_TRUE(expectedKmers.find(kmer) != expectedKmers.end());
40 expectedKmers.erase(kmer);
41 }
42
43 ASSERT_TRUE(expectedKmers.empty());
44}

Callers

nothing calls this directly

Calls 8

loadSequenceFunction · 0.85
KmerClass · 0.85
eraseMethod · 0.80
insertMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected