# | Line 4 | Line 4 | CPPUNIT_TEST_SUITE_REGISTRATION( NextCombinationTestCa | |
---|---|---|
4 | ||
5 | // Registers the fixture into the 'registry' | |
6 | CPPUNIT_TEST_SUITE_REGISTRATION( NextCombinationTestCase); | |
7 | + | |
8 | + | |
9 | void NextCombinationTestCase::testNextCombination() { | |
10 | std::vector<int> iv; | |
11 | std::vector<std::vector<int>::iterator> ic; | |
# | Line 30 | Line 32 | void NextCombinationTestCase::testNextCombination() { | |
32 | CPPUNIT_ASSERT(results[4][0] == 0 && results[4][1] == 4 && results[4].size() == 2); | |
33 | CPPUNIT_ASSERT(results[5][0] == 1 && results[5][1] == 4 && results[5].size() == 2); | |
34 | CPPUNIT_ASSERT(results[6][0] == 0 && results[6][1] == 1 && results[6][2] == 4 && results[6].size() == 3); | |
35 | < | |
35 | > | |
36 | > | std::vector<std::string> sv; |
37 | > | std::vector<std::vector<std::string>::iterator> sic; |
38 | > | std::vector<std::vector<std::string>::iterator>::iterator j; |
39 | > | std::vector<std::vector<std::string> > resultStrings; |
40 | > | std::vector<std::string> resultString; |
41 | > | sv.push_back("H"); |
42 | > | sv.push_back("C"); |
43 | > | sv.push_back("N"); |
44 | > | |
45 | > | while (replaceWildCard(sic, sv, resultString)) { |
46 | > | for(std::vector<std::string>::iterator k = resultString.begin(); k != resultString.end(); ++k) { |
47 | > | std::cout << *k << "\t"; |
48 | > | } |
49 | > | std::cout << std::endl; |
50 | > | resultStrings.push_back(resultString); |
51 | > | } |
52 | } | |
53 | + |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |