Project
Loading...
Searching...
No Matches
testMoveBuffer.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 ImplHelpers
13#define BOOST_TEST_MAIN
14#define BOOST_TEST_DYN_LINK
15
16#include <boost/test/unit_test.hpp>
17#include "MoveBuffer.h"
18
19using namespace o2::mch::raw;
20
21BOOST_AUTO_TEST_SUITE(o2_mch_raw)
22
23BOOST_AUTO_TEST_SUITE(movebuffer)
24
26{
27 std::vector<uint64_t> b64;
28 b64.emplace_back(0x0706050403020100);
29 b64.emplace_back(0x0F0E0D0C0B0A0908);
30 std::vector<std::byte> b8;
31 impl::moveBuffer(b64, b8);
32 std::vector<std::byte> expected;
33 for (uint8_t i = 0; i < 16; i++) {
34 expected.emplace_back(std::byte{i});
35 }
36 BOOST_CHECK_EQUAL(b8.size(), expected.size());
37 BOOST_CHECK(b8 == expected);
38}
39
40BOOST_AUTO_TEST_SUITE_END()
41BOOST_AUTO_TEST_SUITE_END()
int32_t i
BOOST_AUTO_TEST_CASE(FlatHisto)
std::map< std::string, ID > expected
BOOST_CHECK(tree)
BOOST_CHECK_EQUAL(triggersD.size(), triggers.size())