-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44018 from Dr15Jones/unittest_cleanup_Provenance
Moved Parentage unit test to catch2
- Loading branch information
Showing
5 changed files
with
36 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include "DataFormats/Provenance/interface/Parentage.h" | ||
#include "DataFormats/Provenance/interface/BranchID.h" | ||
#include "FWCore/Utilities/interface/Exception.h" | ||
#include <cassert> | ||
#include <iostream> | ||
|
||
#include "catch.hpp" | ||
|
||
TEST_CASE("test Parentage", "[Parentage]") { | ||
edm::Parentage ed1; | ||
CHECK(ed1 == ed1); | ||
edm::Parentage ed2; | ||
CHECK(ed1 == ed2); | ||
|
||
ed2.setParents(std::vector<edm::BranchID>(1)); | ||
edm::Parentage ed3; | ||
ed3.setParents(std::vector<edm::BranchID>(2)); | ||
|
||
edm::ParentageID id1 = ed1.id(); | ||
edm::ParentageID id2 = ed2.id(); | ||
edm::ParentageID id3 = ed3.id(); | ||
|
||
CHECK(id1 != id2); | ||
CHECK(ed1 != ed2); | ||
CHECK(id1 != id3); | ||
CHECK(ed1 != ed3); | ||
CHECK(id2 != id3); | ||
CHECK(ed2 != ed3); | ||
|
||
edm::Parentage ed4; | ||
ed4.setParents(std::vector<edm::BranchID>(1)); | ||
edm::ParentageID id4 = ed4.id(); | ||
CHECK(ed4 == ed2); | ||
CHECK(id4 == id2); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
176 changes: 0 additions & 176 deletions
176
DataFormats/Provenance/test/productResolverIndexHelperTest.cc
This file was deleted.
Oops, something went wrong.