40 #include <boost/filesystem.hpp>
41 #include <boost/test/unit_test.hpp>
48 std::ostream&
operator<< (std::ostream& aStream,
const std::pair<const Node*, const Node*>& aNodes)
51 if (aNodes.first != NULL)
52 aStream <<
"'" << aNodes.first->getPath() <<
"'";
57 if (aNodes.second != NULL)
58 aStream <<
"'" << aNodes.second->getPath() <<
"'";
85 boost::unordered_map<std::string,std::string>
parameters;
86 boost::unordered_map<std::string,std::string>
fwInfo;
87 const std::type_info*
type;
139 id((aIdPath.rfind(
'.') == std::string::npos) ? aIdPath : aIdPath.substr(aIdPath.rfind(
'.') + 1)),
142 permission(aPermission),
146 descendantIds(aNrDescendants),
153 addrTableStr(
"<node>"
154 "<node id='regA' address='0x0' />"
155 "<node id='regB' address='0x1' />"
156 "<node id='ram1' address='0x100' mode='block' size='256' />"
157 "<node id='ram2' address='0x210' mode='block' size='16' />"
158 "<node id='aPort' address='0x300' mode='port' size='1024' />"
172 addrTableStr(
"<node>"
173 "<node id='reg1' address='0x0'/>"
174 "<node id='reg2' address='0x1'/>"
176 "<node id='reg3' address='0x2'>"
177 " <node id='A' mask='0x0000ffff'/>"
178 " <node id='B' mask='0xffff0000'/>"
180 "<node id='reg4' address='0x3'>"
181 " <node id='A' mask='0x000000ff'/>"
182 " <node id='B' mask='0x0000ff00'/>"
183 " <node id='C' mask='0x00ff0000'/>"
184 " <node id='D' mask='0xff000000'/>"
187 "<node id='port1' address='0x4' mode='port' size='256'/>"
188 "<node id='port2' address='0x5' mode='port' size='1024'/>"
189 "<node id='ram1' address='0x08' mode='block' size='8'/>"
190 "<node id='ram2' address='0x10' mode='block' size='16'/>"
192 "<node id='module1' address='0x40'>"
193 " <node id='reg1' address='0x0'/>"
194 " <node id='reg2' address='0x1'>"
195 " <node id='mask1' mask='0x00000fff'/>"
196 " <node id='mask2' mask='0x00fff000'/>"
197 " <node id='mask3' mask='0xff000000'/>"
199 " <node id='port' address='0x2' mode='port' size='256'/>"
200 " <node id='ram' address='0x10' mode='block' size='16'/>"
203 "<node id='module2' address='0x60'>"
204 " <node id='regA' address='0x0'/>"
205 " <node id='regB' address='0x1'>"
206 " <node id='A' mask='0x00000fff'/>"
207 " <node id='B' mask='0x00fff000'/>"
208 " <node id='C' mask='0xff000000'/>"
210 " <node id='fifo' address='0x2' mode='port' size='256'/>"
211 " <node id='block' address='0x10' mode='block' size='16'/>"
276 addrFileURI(getAddressFileURI()),
277 addrFileAbsPath(
boost::filesystem::absolute(
boost::filesystem::path(addrFileURI.substr(7))).native()),
278 addrFileLevel2AbsPath(addrFileAbsPath),
279 addrFileLevel3AbsPath(addrFileAbsPath)
305 nodeProperties.back().description =
"A block memory in an example XML file";
359 const uint32_t lDerivedModule1Addr = 0x600000 + (0x10 | 0x10010);
367 const uint32_t lDerivedModule2Addr = 0x600000 + (0x30 | 0x10010 | 0x10010);
379 const uint32_t lDerivedModule3Addr = 0x600000 + (0x50 | 0x10010 | 0x10010);
440 for (boost::unordered_map<std::string,std::string>::const_iterator lIt=aExpected.
parameters.begin(); lIt!=aExpected.
parameters.end(); lIt++) {
441 BOOST_CHECK_MESSAGE(aNode.
getParameters().count(lIt->first) ==
size_t(1),
"Parameter '" << lIt->first <<
"' was not found");
443 BOOST_CHECK_MESSAGE(aNode.
getParameters().find(lIt->first)->second == lIt->second,
"Parameter '" << lIt->first <<
"' has value '" << aNode.
getParameters().find(lIt->first)->second <<
"'; expected value '" << lIt->second <<
"'");
446 for (boost::unordered_map<std::string,std::string>::const_iterator lIt=aNode.
getParameters().begin(); lIt!=aNode.
getParameters().end(); lIt++) {
447 BOOST_CHECK_MESSAGE(aExpected.
parameters.count(lIt->first) ==
size_t(1),
"Node has unexpected parameter '" << lIt->first <<
"'" <<
" (value: '" << lIt->second <<
"')");
452 for (boost::unordered_map<std::string,std::string>::const_iterator lIt=aExpected.
fwInfo.begin(); lIt!=aExpected.
fwInfo.end(); lIt++) {
453 BOOST_CHECK_MESSAGE(aNode.
getFirmwareInfo().count(lIt->first) ==
size_t(1),
"FW info '" << lIt->first <<
"' was not found");
455 BOOST_CHECK_MESSAGE(aNode.
getFirmwareInfo().find(lIt->first)->second == lIt->second,
"FW info '" << lIt->first <<
"' has value '" << aNode.
getFirmwareInfo().find(lIt->first)->second <<
"'; expected value '" << lIt->second <<
"'");
458 for (boost::unordered_map<std::string,std::string>::const_iterator lIt=aNode.
getFirmwareInfo().begin(); lIt!=aNode.
getFirmwareInfo().end(); lIt++) {
459 BOOST_CHECK_MESSAGE(aExpected.
fwInfo.count(lIt->first) ==
size_t(1),
"Node has unexpected FW info '" << lIt->first <<
"'" <<
" (value: '" << lIt->second <<
"')");
471 if (aProperties.
mask != 0xFFFFFFFF)
477 for (
size_t n=0; n <= 0xF; n++) {
489 for (
size_t n=0; n <= aNode.
getSize(); n++) {
496 for (
size_t n=aNode.
getSize()+1; n <= aNode.
getSize() + 0x10; n++) {
503 switch (aProperties.
mode) {
505 for (
size_t i=0; i <= 0xF; i++) {
507 for (
size_t j=0;
j <= 0xF;
j++) {
515 for (
size_t i=0; i <= 0xF; i++) {
516 for (
size_t j=0;
j <= 0xF;
j++) {
524 for (
size_t lOffset=0; lOffset <= 0xF; lOffset++) {
525 for (
size_t n = aNode.
getSize() + 1 - lOffset; n <= aNode.
getSize() + 0xF - lOffset; n++) {
548 std::vector<std::string> lReturnedIds(aNode.
getNodes());
550 std::vector<std::string> lExpectedIds(aProperties.
descendantIds);
551 std::sort(lReturnedIds.begin(), lReturnedIds.end());
552 std::sort(lExpectedIds.begin(), lExpectedIds.end());
554 BOOST_CHECK_EQUAL_COLLECTIONS(lReturnedIds.begin(), lReturnedIds.end(), lExpectedIds.begin(), lExpectedIds.end());
556 for (std::vector<std::string>::const_iterator lIt=lReturnedIds.begin(); lIt != lReturnedIds.end(); lIt++) {
569 if (lType ==
typeid(
Node)) {
582 BOOST_CHECK_MESSAGE(
false,
"Unit tests have not been written to handle node class '" << aProperties.
type->name() <<
"'");
586 size_t lPositionOfDot(lIt->find(
"."));
587 while (lPositionOfDot != std::string::npos) {
588 std::string lPathPart1(lIt->substr(0, lPositionOfDot));
589 std::string lPathPart2(lIt->substr(lPositionOfDot+1));
593 lPositionOfDot = lIt->find(
".", lPositionOfDot + 1);
610 std::vector<const uhal::Node*> lExpectedNodes;
611 lExpectedNodes.push_back(&aNode);
612 for (std::vector<std::string>::const_iterator lIt = aProperties.
descendantIds.begin(); lIt != aProperties.
descendantIds.end(); lIt++)
613 lExpectedNodes.push_back(&aNode.
getNode(*lIt));
614 std::stable_sort(lExpectedNodes.begin(), lExpectedNodes.end(),
nodeAddrCompare);
618 if (lItCount < lExpectedNodes.size())
630 std::vector<const Node*> lExpected(1, &aTopNode);
631 const std::string lPath(aNode.
getPath());
633 size_t lDotIndex = aNode.
getPath().find(
'.');
634 while (lDotIndex != std::string::npos) {
635 lExpected.push_back(&aTopNode.
getNode(lPath.substr(0, lDotIndex)));
636 lDotIndex = aNode.
getPath().find(
'.', lDotIndex + 1);
639 const std::vector<const Node*> lReturned = aNode.
getLineage(aTopNode);
640 BOOST_CHECK_EQUAL_COLLECTIONS(lReturned.begin(), lReturned.end(), lExpected.begin(), lExpected.end());
643 for (
size_t i = 1; i < lExpected.size(); i++) {
644 const std::vector<const Node*> lExpected2(lExpected.begin()+i, lExpected.end());
645 const std::vector<const Node*> lReturned2(aNode.
getLineage(*lExpected.at(i)));
647 BOOST_CHECK_EQUAL_COLLECTIONS(lReturned2.begin(), lReturned2.end(), lExpected2.begin(), lExpected2.end());
654 for (std::vector<NodeProperties>::const_iterator lIt = aExpectedProperties.begin(); lIt != aExpectedProperties.end(); lIt++) {
655 BOOST_TEST_MESSAGE(
"Node '" << lIt->path <<
"'");
656 const uhal::Node& lNode = (lIt->path.empty() ? aNode : aNode.
getNode(lIt->path));
663 if (&lNode != &aNode)
674 for (
size_t i = 0; i < aIndex; i++)
686 BOOST_AUTO_TEST_SUITE( nodes )
751 BOOST_AUTO_TEST_SUITE( simple )
761 for (
size_t i = 0; i < nodeProperties.size(); i++) {
762 BOOST_TEST_MESSAGE(
"Removing 'id' attribute from node " << i);
765 lDoc.
load(addrTableStr.c_str());
774 std::vector<std::string> lBadValues;
775 lBadValues.push_back(
"");
776 lBadValues.push_back(
" ");
777 lBadValues.push_back(
" ");
778 lBadValues.push_back(
".");
779 lBadValues.push_back(
"bob.");
780 lBadValues.push_back(
".bob");
781 lBadValues.push_back(
"some.value");
783 for (std::vector<std::string>::const_iterator lIt = lBadValues.begin(); lIt != lBadValues.end(); lIt++)
785 for (
size_t i = 0; i < nodeProperties.size(); i++) {
786 BOOST_TEST_MESSAGE(
"Setting 'id' attribute of node " << i <<
" to '" << *lIt <<
"'");
789 lDoc.
load(addrTableStr.c_str());
799 std::vector<std::string> lBadValues;
800 lBadValues.push_back(
"");
801 lBadValues.push_back(
" ");
802 lBadValues.push_back(
" ");
803 lBadValues.push_back(
"-1");
804 lBadValues.push_back(
"-0x11");
805 lBadValues.push_back(
"0x");
806 lBadValues.push_back(
"x");
807 lBadValues.push_back(
"3.14");
808 lBadValues.push_back(
"bob");
809 lBadValues.push_back(
"0x1234bob5678");
814 for (std::vector<std::string>::const_iterator lIt = lBadValues.begin(); lIt != lBadValues.end(); lIt++)
816 for (
size_t i = 0; i < nodeProperties.size(); i++) {
817 BOOST_TEST_MESSAGE(
"Setting 'address' attribute of node " << i <<
" to '" << *lIt <<
"'");
820 lDoc.
load(addrTableStr.c_str());
830 std::vector<std::string> lBadValues;
831 lBadValues.push_back(
"");
832 lBadValues.push_back(
" ");
833 lBadValues.push_back(
" ");
834 lBadValues.push_back(
"-1");
835 lBadValues.push_back(
"42a");
836 lBadValues.push_back(
"-0x11");
837 lBadValues.push_back(
"0x");
838 lBadValues.push_back(
"x");
839 lBadValues.push_back(
"3.14");
840 lBadValues.push_back(
"bob");
841 lBadValues.push_back(
"0x1234bob5678");
846 for (std::vector<std::string>::const_iterator lIt = lBadValues.begin(); lIt != lBadValues.end(); lIt++)
848 for (
size_t i = 0; i < 2; i++) {
849 BOOST_TEST_MESSAGE(
"Setting 'mask' attribute of node " << i <<
" to '" << *lIt <<
"'");
852 lDoc.
load(addrTableStr.c_str());
862 std::vector<std::string> lBadValues;
863 lBadValues.push_back(
"");
864 lBadValues.push_back(
" ");
865 lBadValues.push_back(
" ");
866 lBadValues.push_back(
"-1");
867 lBadValues.push_back(
"42a");
868 lBadValues.push_back(
"-0x11");
869 lBadValues.push_back(
"0x");
870 lBadValues.push_back(
"x");
871 lBadValues.push_back(
"3.14");
872 lBadValues.push_back(
"bob");
873 lBadValues.push_back(
"0x1234bob5678");
878 for (std::vector<std::string>::const_iterator lIt = lBadValues.begin(); lIt != lBadValues.end(); lIt++)
880 for (
size_t i = 2; i < nodeProperties.size(); i++) {
881 BOOST_TEST_MESSAGE(
"Setting 'size' attribute of node " << i <<
" to '" << *lIt <<
"'");
884 lDoc.
load(addrTableStr.c_str());
894 std::vector<std::string> lBadValues;
895 lBadValues.push_back(
"bob");
896 lBadValues.push_back(
"some_invalid_string");
897 lBadValues.push_back(
"");
898 lBadValues.push_back(
"R");
899 lBadValues.push_back(
"W");
900 lBadValues.push_back(
"RW");
901 lBadValues.push_back(
"WR");
902 lBadValues.push_back(
"READ");
903 lBadValues.push_back(
"WRITE");
904 lBadValues.push_back(
"READWRITE");
905 lBadValues.push_back(
"WRITEREAD");
907 lBadValues.push_back(
"r ");
909 for (std::vector<std::string>::const_iterator lIt = lBadValues.begin(); lIt != lBadValues.end(); lIt++)
911 for (
size_t i = 0; i < nodeProperties.size(); i++) {
912 BOOST_TEST_MESSAGE(
"Setting 'permission' attribute of node " << i <<
" to '" << *lIt <<
"'");
915 lDoc.
load(addrTableStr.c_str());
925 std::vector<std::string> lBadValues;
926 lBadValues.push_back(
"bob");
927 lBadValues.push_back(
"some_invalid_string");
928 lBadValues.push_back(
"");
929 lBadValues.push_back(
"SINGLE");
930 lBadValues.push_back(
"BLOCK");
931 lBadValues.push_back(
"INCREMENTAL");
932 lBadValues.push_back(
"INC");
933 lBadValues.push_back(
"PORT");
934 lBadValues.push_back(
"NON-INCREMENTAL");
935 lBadValues.push_back(
"NON-INC");
937 lBadValues.push_back(
"single ");
939 for (std::vector<std::string>::const_iterator lIt = lBadValues.begin(); lIt != lBadValues.end(); lIt++)
941 for (
size_t i = 0; i < nodeProperties.size(); i++) {
942 BOOST_TEST_MESSAGE(
"Setting 'mode' attribute of node " << i <<
" to '" << *lIt <<
"'");
945 lDoc.
load(addrTableStr.c_str());
955 for (
size_t i = 0; i < 2; i++) {
956 BOOST_TEST_MESSAGE(
"Adding 'size' attribute to node " << i <<
", that doesn't have 'mode' attribute");
959 lDoc.
load(addrTableStr.c_str());
968 BOOST_AUTO_TEST_SUITE_END()
971 BOOST_AUTO_TEST_SUITE( overlapChecks )
988 lDoc.
load(addrTableStr.c_str());
993 std::vector<std::pair<const Node*, const Node*> > lExpected;
994 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg1"), &lNode->getNode(
"reg2")) );
998 BOOST_CHECK_EQUAL_COLLECTIONS(lResult.begin(), lResult.end(), lExpected.begin(), lExpected.end());
1006 lDoc.
load(addrTableStr.c_str());
1011 std::vector<std::pair<const Node*, const Node*> > lExpected;
1012 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg3"), &lNode->getNode(
"reg4")) );
1013 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg3"), &lNode->getNode(
"reg4.A")) );
1014 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg3"), &lNode->getNode(
"reg4.B")) );
1015 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg3"), &lNode->getNode(
"reg4.C")) );
1016 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg3"), &lNode->getNode(
"reg4.D")) );
1017 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg3.A"), &lNode->getNode(
"reg4")) );
1018 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg3.A"), &lNode->getNode(
"reg4.A")) );
1019 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg3.A"), &lNode->getNode(
"reg4.B")) );
1020 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg3.B"), &lNode->getNode(
"reg4")) );
1021 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg3.B"), &lNode->getNode(
"reg4.C")) );
1022 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg3.B"), &lNode->getNode(
"reg4.D")) );
1026 BOOST_CHECK_EQUAL_COLLECTIONS(lResult.begin(), lResult.end(), lExpected.begin(), lExpected.end());
1034 lDoc.
load(addrTableStr.c_str());
1039 std::vector<std::pair<const Node*, const Node*> > lExpected;
1040 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg4.A"), &lNode->getNode(
"reg4.C")) );
1041 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg4.A"), &lNode->getNode(
"reg4.D")) );
1045 BOOST_CHECK_EQUAL_COLLECTIONS(lResult.begin(), lResult.end(), lExpected.begin(), lExpected.end());
1053 lDoc.
load(addrTableStr.c_str());
1058 std::vector<std::pair<const Node*, const Node*> > lExpected;
1059 lExpected.push_back( std::make_pair(&lNode->getNode(
"port1"), &lNode->getNode(
"port2")) );
1063 BOOST_CHECK_EQUAL_COLLECTIONS(lResult.begin(), lResult.end(), lExpected.begin(), lExpected.end());
1071 lDoc.
load(addrTableStr.c_str());
1076 std::vector<std::pair<const Node*, const Node*> > lExpected;
1077 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg1"), &lNode->getNode(
"reg3")) );
1078 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg1"), &lNode->getNode(
"reg3.A")) );
1079 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg1"), &lNode->getNode(
"reg3.B")) );
1083 BOOST_CHECK_EQUAL_COLLECTIONS(lResult.begin(), lResult.end(), lExpected.begin(), lExpected.end());
1091 lDoc.
load(addrTableStr.c_str());
1096 std::vector<std::pair<const Node*, const Node*> > lExpected;
1097 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg1"), &lNode->getNode(
"port1")) );
1101 BOOST_CHECK_EQUAL_COLLECTIONS(lResult.begin(), lResult.end(), lExpected.begin(), lExpected.end());
1109 lDoc.
load(addrTableStr.c_str());
1114 std::vector<std::pair<const Node*, const Node*> > lExpected;
1115 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg3"), &lNode->getNode(
"port1")) );
1116 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg3.A"), &lNode->getNode(
"port1")) );
1117 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg3.B"), &lNode->getNode(
"port1")) );
1121 BOOST_CHECK_EQUAL_COLLECTIONS(lResult.begin(), lResult.end(), lExpected.begin(), lExpected.end());
1130 std::vector<std::pair<size_t, std::vector<std::string> > > lModifiedNodes(4);
1132 lModifiedNodes.at(0).first = 0;
1133 lModifiedNodes.at(0).second.push_back(
"reg1");
1135 lModifiedNodes.at(1).first = 2;
1136 lModifiedNodes.at(1).second.push_back(
"reg3");
1137 lModifiedNodes.at(1).second.push_back(
"reg3.A");
1138 lModifiedNodes.at(1).second.push_back(
"reg3.B");
1140 lModifiedNodes.at(2).first = 4;
1141 lModifiedNodes.at(2).second.push_back(
"port1");
1143 lModifiedNodes.at(3).first = 6;
1144 lModifiedNodes.at(3).second.push_back(
"ram1");
1147 std::vector<std::string> lAddresses;
1148 lAddresses.push_back(
"0x10");
1149 lAddresses.push_back(
"0x1a");
1150 lAddresses.push_back(
"0x1f");
1152 for (std::vector<std::pair<
size_t, std::vector<std::string> > >::const_iterator lNodeIt = lModifiedNodes.begin(); lNodeIt != lModifiedNodes.end(); lNodeIt++)
1154 for (std::vector<std::string>::const_iterator lAddrIt = lAddresses.begin(); lAddrIt != lAddresses.end(); lAddrIt++)
1156 BOOST_TEST_MESSAGE(
"Moving '" << lNodeIt->second.front() <<
"' to address " << *lAddrIt);
1160 lDoc.
load(addrTableStr.c_str());
1165 std::vector<std::pair<const Node*, const Node*> > lExpected;
1166 for (
size_t i = 0; i < lNodeIt->second.size(); i++)
1168 if (lAddrIt == lAddresses.begin())
1169 lExpected.push_back( std::make_pair(&lNode->getNode(lNodeIt->second.at(i)), &lNode->getNode(
"ram2")) );
1171 lExpected.push_back( std::make_pair(&lNode->getNode(
"ram2"), &lNode->getNode(lNodeIt->second.at(i))) );
1176 BOOST_CHECK_EQUAL_COLLECTIONS(lResult.begin(), lResult.end(), lExpected.begin(), lExpected.end());
1186 lDoc.
load(addrTableStr.c_str());
1191 std::vector<std::pair<const Node*, const Node*> > lExpected;
1192 lExpected.push_back( std::make_pair(&lNode->getNode(
"reg1"), &lNode->getNode(
"module1.reg1")) );
1193 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.reg2"), &lNode->getNode(
"reg2")) );
1194 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.reg2.mask1"), &lNode->getNode(
"reg2")) );
1195 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.reg2.mask2"), &lNode->getNode(
"reg2")) );
1196 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.reg2.mask3"), &lNode->getNode(
"reg2")) );
1197 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.port"), &lNode->getNode(
"reg3")) );
1198 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.port"), &lNode->getNode(
"reg3.A")) );
1199 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.port"), &lNode->getNode(
"reg3.B")) );
1200 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.ram"), &lNode->getNode(
"ram2")) );
1204 BOOST_CHECK_EQUAL_COLLECTIONS(lResult.begin(), lResult.end(), lExpected.begin(), lExpected.end());
1212 lDoc.
load(addrTableStr.c_str());
1217 std::vector<std::pair<const Node*, const Node*> > lExpected;
1218 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.reg1"), &lNode->getNode(
"module2.regA")) );
1219 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.reg2"), &lNode->getNode(
"module2.regB")) );
1220 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.reg2"), &lNode->getNode(
"module2.regB.A")) );
1221 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.reg2"), &lNode->getNode(
"module2.regB.B")) );
1222 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.reg2"), &lNode->getNode(
"module2.regB.C")) );
1223 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.reg2.mask1"), &lNode->getNode(
"module2.regB")) );
1224 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.reg2.mask1"), &lNode->getNode(
"module2.regB.A")) );
1225 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.reg2.mask2"), &lNode->getNode(
"module2.regB")) );
1226 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.reg2.mask2"), &lNode->getNode(
"module2.regB.B")) );
1227 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.reg2.mask3"), &lNode->getNode(
"module2.regB")) );
1228 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.reg2.mask3"), &lNode->getNode(
"module2.regB.C")) );
1229 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.port"), &lNode->getNode(
"module2.fifo")) );
1230 lExpected.push_back( std::make_pair(&lNode->getNode(
"module1.ram"), &lNode->getNode(
"module2.block")) );
1234 BOOST_CHECK_EQUAL_COLLECTIONS(lResult.begin(), lResult.end(), lExpected.begin(), lExpected.end());
1238 BOOST_AUTO_TEST_SUITE_END()
1241 BOOST_AUTO_TEST_SUITE_END()