Project
Loading...
Searching...
No Matches
testFeeLinkId.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#define BOOST_TEST_MODULE Test MCHRaw FeeLinkId
13#define BOOST_TEST_MAIN
14#define BOOST_TEST_DYN_LINK
15
16#include <boost/test/unit_test.hpp>
17
19#include <fmt/format.h>
20
21using namespace o2::mch::raw;
22
23BOOST_AUTO_TEST_SUITE(o2_mch_raw)
24
25BOOST_AUTO_TEST_SUITE(feelinkid)
26
27BOOST_AUTO_TEST_CASE(FeeLinkIdEncodeDecode)
28{
29 uint16_t feeId{0};
30 uint8_t linkId{11};
31 FeeLinkId cl(feeId, linkId);
32 auto code = encode(cl);
33 auto x = decodeFeeLinkId(code);
35}
36
37BOOST_AUTO_TEST_CASE(FeeLinkIdCtorMustThrowIfLinkIdIsInvalid)
38{
39 uint16_t feeId{0};
40 BOOST_CHECK_THROW(FeeLinkId a(feeId, 24), std::logic_error);
43}
44BOOST_AUTO_TEST_SUITE_END()
45BOOST_AUTO_TEST_SUITE_END()
GLint GLenum GLint x
Definition glcorearb.h:403
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233
FeeLinkId decodeFeeLinkId(uint32_t code)
Definition FeeLinkId.cxx:30
uint32_t encode(const DsDetId &id)
Create an integer code for the given id.
Definition DsDetId.cxx:28
BOOST_AUTO_TEST_CASE(FlatHisto)
BOOST_CHECK_NO_THROW(algorithm::merge(target, other))
BOOST_CHECK_EQUAL(triggersD.size(), triggers.size())