forked from mcoquet642/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestDataPointTypes.cxx
More file actions
40 lines (35 loc) · 1.65 KB
/
testDataPointTypes.cxx
File metadata and controls
40 lines (35 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
#include <type_traits>
#define BOOST_TEST_MODULE Test DetectorsDCS DataPoints
#define BOOST_TEST_MAIN
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include "DetectorsDCS/DataPointCompositeObject.h"
#include "Framework/TypeTraits.h"
#include <vector>
#include <list>
#include <gsl/gsl>
#include <boost/mpl/list.hpp>
typedef boost::mpl::list<o2::dcs::DataPointIdentifier, o2::dcs::DataPointValue, o2::dcs::DataPointCompositeObject> testTypes;
BOOST_AUTO_TEST_CASE_TEMPLATE(DataPointCompositeObjectTypeTraits, T, testTypes)
{
BOOST_CHECK_EQUAL(std::is_trivially_copyable<T>::value, true);
BOOST_CHECK_EQUAL(std::is_polymorphic<T>::value, false);
BOOST_CHECK_EQUAL(std::is_pointer<T>::value, false);
BOOST_CHECK_EQUAL(o2::framework::is_forced_non_messageable<T>::value, false);
}
BOOST_AUTO_TEST_CASE(DataPointsAreMessageable)
{
BOOST_CHECK_EQUAL(o2::framework::is_messageable<o2::dcs::DataPointIdentifier>::value, true);
BOOST_CHECK_EQUAL(o2::framework::is_messageable<o2::dcs::DataPointValue>::value, true);
BOOST_CHECK_EQUAL(o2::framework::is_messageable<o2::dcs::DataPointCompositeObject>::value, true);
}