Project
Loading...
Searching...
No Matches
test_InputSpec.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
#include "
Framework/InputSpec.h
"
13
#include "
Framework/DataSpecUtils.h
"
14
#include "
Headers/DataHeader.h
"
15
#include <catch_amalgamated.hpp>
16
#include <algorithm>
17
#include <vector>
18
#include <fmt/format.h>
19
#include "
Framework/Formatters.h
"
20
#include <fmt/ostream.h>
21
22
using namespace
o2::framework
;
23
using namespace
o2::framework::data_matcher
;
24
25
TEST_CASE
(
"TestSorting"
)
26
{
27
// At some point
28
std::vector<InputSpec> inputs{
29
InputSpec
{
"foo"
, {
"TST"
,
"B"
}},
30
InputSpec
{
"bar"
, {
"TST"
,
"A"
}}};
31
std::swap(inputs[0], inputs[1]);
32
auto
sorter = [](
InputSpec
const
&
a
,
InputSpec
const
&
b
) {
33
return
a
.binding <
b
.binding;
34
};
35
std::stable_sort(inputs.begin(), inputs.end(), sorter);
36
}
37
38
TEST_CASE
(
"TestInputSpecCreation"
)
39
{
40
// At some point
41
std::vector<InputSpec> inputs{
42
InputSpec
{
"everything"
,
"TST"
,
"B"
, 0},
43
InputSpec
{
"0-subspec"
,
"TST"
,
"B"
},
44
InputSpec
{
"wildcard-subspec"
, {
"TST"
,
"A"
}},
45
InputSpec
{
"wildcard-desc-and-subspec"
,
o2::header::DataOrigin
{
"TST"
}},
46
InputSpec
{
"everything-again"
, {
"TST"
,
"B"
, 0}}};
47
std::swap(inputs[0], inputs[1]);
48
auto
sorter = [](
InputSpec
const
&
a
,
InputSpec
const
&
b
) {
49
return
a
.binding <
b
.binding;
50
};
51
std::stable_sort(inputs.begin(), inputs.end(), sorter);
52
}
53
54
TEST_CASE
(
"TestFormattersLifetime"
)
55
{
56
CHECK
(fmt::format(
"{}"
, Lifetime::Timeframe) ==
"timeframe"
);
57
}
DataHeader.h
DataSpecUtils.h
Formatters.h
InputSpec.h
CHECK
#define CHECK
Definition
clusterProcessing.cxx:25
b
GLboolean GLboolean GLboolean b
Definition
glcorearb.h:1233
a
GLboolean GLboolean GLboolean GLboolean a
Definition
glcorearb.h:1233
o2::framework::data_matcher
Definition
DataDescriptorMatcher.h:34
o2::framework
Defining PrimaryVertex explicitly as messageable.
Definition
TFIDInfo.h:20
o2::framework::TEST_CASE
TEST_CASE("test_prepareArguments")
Definition
test_DeviceSpecHelpers.cxx:103
o2::framework::InputSpec
Definition
InputSpec.h:31
o2::header::Descriptor< gSizeDataOriginString >
Framework
Core
test
test_InputSpec.cxx
Generated on Tue Feb 25 2025 23:16:40 for Project by
1.9.8