2525#include < TH1F.h>
2626#include < Configuration/ConfigurationFactory.h>
2727#include < Configuration/ConfigurationInterface.h>
28-
29- #define BOOST_TEST_MODULE Check test
30- #define BOOST_TEST_MAIN
31- #define BOOST_TEST_DYN_LINK
32-
33- #include < boost/test/unit_test.hpp>
28+ #include < catch_amalgamated.hpp>
3429
3530using namespace o2 ::quality_control::checker;
3631using namespace o2 ::quality_control::core;
@@ -57,28 +52,28 @@ CheckConfig getCheckConfig(const std::string& configFilePath, const std::string&
5752 }
5853}
5954
60- BOOST_AUTO_TEST_CASE ( test_check_specs)
55+ TEST_CASE ( " test_check_specs" )
6156{
6257 std::string configFilePath = std::string (" json://" ) + getTestDataDirectory () + " testSharedConfig.json" ;
6358
6459 Check check (getCheckConfig (configFilePath, " singleCheck" ));
6560
66- BOOST_REQUIRE_EQUAL (check.getInputs ().size (), 1 );
67- BOOST_CHECK_EQUAL (check.getInputs ()[0 ], (InputSpec{ { " mo" }, " QTST" , " skeletonTask" , 0 , Lifetime::Sporadic }));
61+ REQUIRE (check.getInputs ().size () == 1 );
62+ CHECK (check.getInputs ()[0 ] == (InputSpec{ { " mo" }, " QTST" , " skeletonTask" , 0 , Lifetime::Sporadic }));
6863
69- BOOST_CHECK_EQUAL (check.getOutputSpec (), (OutputSpec{ " CTST" , " singleCheck" , 0 , Lifetime::Sporadic }));
64+ CHECK (check.getOutputSpec () == (OutputSpec{ " CTST" , " singleCheck" , 0 , Lifetime::Sporadic }));
7065}
7166
72- BOOST_AUTO_TEST_CASE ( test_check_long_description)
67+ TEST_CASE ( " test_check_long_description" )
7368{
7469 std::string configFilePath = std::string (" json://" ) + getTestDataDirectory () + " testSharedConfig.json" ;
7570
7671 Check check (getCheckConfig (configFilePath, " singleCheckLongDescription" ));
7772
78- BOOST_REQUIRE_EQUAL (check.getInputs ().size (), 1 );
79- BOOST_CHECK_EQUAL (check.getInputs ()[0 ], (InputSpec{ { " mo" }, " QTST" , " skeletonTask" , 0 , Lifetime::Sporadic }));
73+ REQUIRE (check.getInputs ().size () == 1 );
74+ CHECK (check.getInputs ()[0 ] == (InputSpec{ { " mo" }, " QTST" , " skeletonTask" , 0 , Lifetime::Sporadic }));
8075
81- BOOST_CHECK_EQUAL (check.getOutputSpec (), (OutputSpec{ " CTST" , " singleCheckL9fdb" , 0 , Lifetime::Sporadic }));
76+ CHECK (check.getOutputSpec () == (OutputSpec{ " CTST" , " singleCheckL9fdb" , 0 , Lifetime::Sporadic }));
8277}
8378
8479std::shared_ptr<MonitorObject> dummyMO (const std::string& objName)
@@ -88,7 +83,7 @@ std::shared_ptr<MonitorObject> dummyMO(const std::string& objName)
8883 return obj;
8984}
9085
91- BOOST_AUTO_TEST_CASE ( test_check_empty_mo)
86+ TEST_CASE ( " test_check_empty_mo" )
9287{
9388 std::string configFilePath = std::string (" json://" ) + getTestDataDirectory () + " testSharedConfig.json" ;
9489
@@ -102,7 +97,7 @@ BOOST_AUTO_TEST_CASE(test_check_empty_mo)
10297 };
10398
10499 auto qos = check.check (moMap);
105- BOOST_CHECK_EQUAL (qos.size (), 0 );
100+ CHECK (qos.size () == 0 );
106101 }
107102
108103 {
@@ -111,11 +106,11 @@ BOOST_AUTO_TEST_CASE(test_check_empty_mo)
111106 };
112107
113108 auto qos = check.check (moMap);
114- BOOST_CHECK_EQUAL (qos.size (), 0 );
109+ CHECK (qos.size () == 0 );
115110 }
116111}
117112
118- BOOST_AUTO_TEST_CASE ( test_check_invoke_check)
113+ TEST_CASE ( " test_check_invoke_check" )
119114{
120115 std::string configFilePath = std::string (" json://" ) + getTestDataDirectory () + " testSharedConfig.json" ;
121116
@@ -128,10 +123,10 @@ BOOST_AUTO_TEST_CASE(test_check_invoke_check)
128123 };
129124
130125 auto qos = check.check (moMap);
131- BOOST_CHECK_EQUAL (qos.size (), 1 );
126+ CHECK (qos.size () == 1 );
132127}
133128
134- BOOST_AUTO_TEST_CASE ( test_check_postprocessing)
129+ TEST_CASE ( " test_check_postprocessing" )
135130{
136131 std::string configFilePath = std::string (" json://" ) + getTestDataDirectory () + " testSharedConfig.json" ;
137132
@@ -144,10 +139,10 @@ BOOST_AUTO_TEST_CASE(test_check_postprocessing)
144139 };
145140
146141 auto qos = check.check (moMap);
147- BOOST_CHECK_EQUAL (qos.size (), 1 );
142+ CHECK (qos.size () == 1 );
148143}
149144
150- BOOST_AUTO_TEST_CASE ( test_check_activity)
145+ TEST_CASE ( " test_check_activity" )
151146{
152147 Check check ({ " test" ,
153148 " QcSkeleton" ,
@@ -170,7 +165,7 @@ BOOST_AUTO_TEST_CASE(test_check_activity)
170165 check.startOfActivity (Activity ());
171166 auto qos = check.check (moMap);
172167
173- BOOST_REQUIRE_EQUAL (qos.size (), 1 );
168+ REQUIRE (qos.size () == 1 );
174169 ValidityInterval correctValidity{ 1 , 15 };
175- BOOST_CHECK (qos[0 ]->getActivity ().mValidity == correctValidity);
176- }
170+ CHECK (qos[0 ]->getActivity ().mValidity == correctValidity);
171+ }
0 commit comments