Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:30

0001 #include "catch.hpp"
0002 #include "CondCore/CondHDF5ESSource/plugins/convertSyncValue.h"
0003 
0004 using namespace cond::hdf5;
0005 
0006 TEST_CASE("test cond::hdf5::convertSyncValue", "[convertSyncValue]") {
0007   SECTION("run_lumi") {
0008     edm::IOVSyncValue edmSync{edm::EventID{5, 8, 0}};
0009     auto condSync = convertSyncValue(edmSync, true);
0010     REQUIRE(condSync.high_ == 5);
0011     REQUIRE(condSync.low_ == 8);
0012 
0013     REQUIRE(edmSync == convertSyncValue(condSync, true));
0014   }
0015   SECTION("time") {
0016     edm::IOVSyncValue edmSync{edm::Timestamp{(static_cast<uint64_t>(5) << 32) + 8}};
0017     auto condSync = convertSyncValue(edmSync, false);
0018     REQUIRE(condSync.high_ == 5);
0019     REQUIRE(condSync.low_ == 8);
0020 
0021     REQUIRE(edmSync == convertSyncValue(condSync, false));
0022   }
0023 }