1 |
tim |
1660 |
#include "utils/ReplaceWildCardTestCase.hpp" |
2 |
|
|
#include <iostream> |
3 |
|
|
#include <algorithm> |
4 |
|
|
#include "utils/ReplaceWildCard.hpp" |
5 |
|
|
// Registers the fixture into the 'registry' |
6 |
|
|
CPPUNIT_TEST_SUITE_REGISTRATION( ReplaceWildCardTestCase ); |
7 |
|
|
|
8 |
|
|
void ReplaceWildCardTestCase::testReplaceWildCard(){ |
9 |
|
|
std::vector<std::vector<int> > sequences; |
10 |
|
|
|
11 |
tim |
1674 |
sequences = ReplaceAll(3); |
12 |
tim |
1662 |
std::cout << std::endl; |
13 |
|
|
std::cout << "size of sequence: " << sequences.size() << std::endl; |
14 |
tim |
1674 |
|
15 |
tim |
1662 |
CPPUNIT_ASSERT(sequences.size() == 8); |
16 |
|
|
|
17 |
|
|
CPPUNIT_ASSERT(sequences[0][0] == 0 && sequences[0][1] == 1 && sequences[0][2] == 2); |
18 |
|
|
CPPUNIT_ASSERT(sequences[1][0] == -1 && sequences[1][1] == 1 && sequences[1][2] == 2); |
19 |
|
|
CPPUNIT_ASSERT(sequences[2][0] == 0 && sequences[2][1] == -1 && sequences[2][2] == 2); |
20 |
|
|
CPPUNIT_ASSERT(sequences[3][0] == 0 && sequences[3][1] == 1 && sequences[3][2] == -1); |
21 |
|
|
CPPUNIT_ASSERT(sequences[4][0] == -1 && sequences[4][1] == -1 && sequences[4][2] == 2); |
22 |
|
|
CPPUNIT_ASSERT(sequences[5][0] == -1 && sequences[5][1] == 1 && sequences[5][2] == -1); |
23 |
|
|
CPPUNIT_ASSERT(sequences[6][0] == 0 && sequences[6][1] == -1 && sequences[6][2] == -1); |
24 |
|
|
CPPUNIT_ASSERT(sequences[7][0] == -1 && sequences[7][1] == -1 && sequences[7][2] == -1); |
25 |
|
|
|
26 |
tim |
1660 |
} |