Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:48:02

0001 #include "catch.hpp"
0002 #include "FWCore/Utilities/interface/CRC32Calculator.h"
0003 
0004 TEST_CASE("test cms::CRC32Calculator", "[CRC32Calculator]") {
0005   SECTION("known") {
0006     cms::CRC32Calculator crc32("type_label_instance_process");
0007 
0008     // This known result was calculated using python as a cross check
0009     unsigned int knownResult = 1215348599;
0010     REQUIRE(crc32.checksum() == knownResult);
0011   }
0012   SECTION("empty") {
0013     cms::CRC32Calculator emptyString_crc32("");
0014     REQUIRE(emptyString_crc32.checksum() == 0);
0015   }
0016 }