ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/test/utils/NextCombinationTestCase.cpp
(Generate patch)

Comparing trunk/OOPSE-2.0/test/utils/NextCombinationTestCase.cpp (file contents):
Revision 1678 by tim, Thu Oct 28 20:41:18 2004 UTC vs.
Revision 1679 by tim, Thu Oct 28 21:28:04 2004 UTC

# Line 43 | Line 43 | void NextCombinationTestCase::testNextCombination() {
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;
46        resultStrings.push_back(resultString);  
47      }
48 +
49 +    CPPUNIT_ASSERT(resultStrings.size() == 7);
50 +    CPPUNIT_ASSERT(resultStrings[0][0] == "H"  && resultStrings[0][1] == "X" && resultStrings[0][2] == "X" && resultStrings[0].size() == 3);
51 +    CPPUNIT_ASSERT(resultStrings[1][0] == "X"  && resultStrings[1][1] == "C" && resultStrings[1][2] == "X" && resultStrings[1].size() == 3);
52 +    CPPUNIT_ASSERT(resultStrings[2][0] == "X"  && resultStrings[2][1] == "X" && resultStrings[2][2] == "N" && resultStrings[2].size() == 3);
53 +    CPPUNIT_ASSERT(resultStrings[3][0] == "H"  && resultStrings[3][1] == "C" && resultStrings[3][2] == "X" && resultStrings[3].size() == 3);
54 +    CPPUNIT_ASSERT(resultStrings[4][0] == "H"  && resultStrings[4][1] == "X" && resultStrings[4][2] == "N" && resultStrings[4].size() == 3);
55 +    CPPUNIT_ASSERT(resultStrings[5][0] == "X"  && resultStrings[5][1] == "C" && resultStrings[5][2] == "N" && resultStrings[5].size() == 3);
56 +    CPPUNIT_ASSERT(resultStrings[6][0] == "H"  && resultStrings[6][1] == "C" && resultStrings[6][2] == "N" && resultStrings[6].size() == 3);
57 +    
58   }
59  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines