Skip to content

Commit

Permalink
update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ianna committed Oct 23, 2020
1 parent 2e8f078 commit cef79dd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions DetectorDescription/DDCMS/test/DDFilteredView.find.cppunit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void testDDFilteredViewFind::checkFilteredView() {
fview.goTo({0, 0, 8});
printMe(fview);

CPPUNIT_ASSERT(fview.name() == "MUON");
CPPUNIT_ASSERT(fview.name() == "muonBase:MUON");

// Go to the first daughter
fview.next(0);
Expand Down Expand Up @@ -129,7 +129,7 @@ void testDDFilteredViewFind::checkFilteredView() {
std::cout << "\n==== Let's do it again, go to Muon\n";
fview.goTo({0, 0, 8});
printMe(fview);
CPPUNIT_ASSERT(fview.name() == "MUON");
CPPUNIT_ASSERT(fview.name() == "muonBase:MUON");

// Go to the first daughter
fview.next(0);
Expand Down
4 changes: 2 additions & 2 deletions DetectorDescription/DDCMS/test/DDFilteredView.get.cppunit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void testDDFilteredViewGet::checkFilteredView() {
fview.goTo({0, 0, 8});
printMe(fview);

CPPUNIT_ASSERT(fview.name() == "MUON");
CPPUNIT_ASSERT(fview.name() == "muonBase:MUON");

// Go to the first daughter
fview.next(0);
Expand Down Expand Up @@ -132,7 +132,7 @@ void testDDFilteredViewGet::checkFilteredView() {
std::cout << "\n==== Let's do it again, go to Muon\n";
fview.goTo({0, 0, 8});
printMe(fview);
CPPUNIT_ASSERT(fview.name() == "MUON");
CPPUNIT_ASSERT(fview.name() == "muonBase:MUON");

// Go to the first daughter
fview.next(0);
Expand Down
4 changes: 2 additions & 2 deletions DetectorDescription/DDCMS/test/DDFilteredView.goto.cppunit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void testDDFilteredViewGoTo::checkFilteredView() {
// Start with Tracker
std::cout << "\n==== Let's go to Tracker\n";
fview.goTo({0, 0, 6});
CPPUNIT_ASSERT(fview.name() == "Tracker");
CPPUNIT_ASSERT(fview.name() == "tracker:Tracker");
printMe(fview);

// Go to the first daughter
Expand Down Expand Up @@ -123,7 +123,7 @@ void testDDFilteredViewGoTo::checkFilteredView() {

std::cout << "\n==== Let's do it again, go to Tracker\n";
fview.goTo({0, 0, 6});
CPPUNIT_ASSERT(fview.name() == "Tracker");
CPPUNIT_ASSERT(fview.name() == "tracker:Tracker");
printMe(fview);

// Go to the first daughter
Expand Down
8 changes: 4 additions & 4 deletions Geometry/MTDCommonData/test/DD4hep_TestMTDIdealGeometry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ void DD4hep_TestMTDIdealGeometry::analyze(const edm::Event& iEvent, const edm::E
uint32_t level(0);

do {
if (fv.name() == "BarrelTimingLayer") {
if (dd4hep::dd::noNamespace(fv.name()) == "BarrelTimingLayer") {
isBarrel = true;
edm::LogInfo("DD4hep_TestMTDIdealGeometry") << "isBarrel = " << isBarrel;
} else if (fv.name() == "EndcapTimingLayer") {
} else if (dd4hep::dd::noNamespace(fv.name()) == "EndcapTimingLayer") {
isBarrel = false;
edm::LogInfo("DD4hep_TestMTDIdealGeometry") << "isBarrel = " << isBarrel;
}
Expand All @@ -168,7 +168,7 @@ void DD4hep_TestMTDIdealGeometry::analyze(const edm::Event& iEvent, const edm::E
write = false;
exitLoop = true;
}
if (fv.name() == ddTopNodeName_) {
if (dd4hep::dd::noNamespace(fv.name()) == ddTopNodeName_) {
write = true;
level = fv.navPos().size();
}
Expand All @@ -194,7 +194,7 @@ void DD4hep_TestMTDIdealGeometry::analyze(const edm::Event& iEvent, const edm::E

for (auto const& t : specs) {
for (auto const& it : t.second->paths) {
if (dd4hep::dd::compareEqual(fv.name(), dd4hep::dd::realTopName(it))) {
if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(fv.name()), dd4hep::dd::realTopName(it))) {
isSens = true;
break;
}
Expand Down

0 comments on commit cef79dd

Please sign in to comment.