CbmRoot
Loading...
Searching...
No Matches
_GTestStructLooper.cxx File Reference

A test for the cbm::util::StructLooper class. More...

#include "CbmStructLooper.h"
#include "gtest/gtest.h"
#include <unordered_map>
#include <unordered_set>
#include <vector>
Include dependency graph for _GTestStructLooper.cxx:

Go to the source code of this file.

Classes

class  A
 Some class A. More...
 
class  B
 Some class B. More...
 
class  C
 Some class C. More...
 
struct  Composite
 A composite of optional A, B and C. More...
 
struct  Hits
 A class, which emulates hit containers for different components. More...
 
struct  CompositeApplication
 An application for a Composite object. More...
 

Functions

 TEST (_GTestStructLooper, StructLooper_FullyDefinedComposite_LoopOverVariables)
 
 TEST (_GTestStructLooper, StructLooper_FullyDefinedComposite_LoopOverValues_1)
 
 TEST (_GTestStructLooper, StructLooper_FullyDefinedComposite_LoopOverValues_2)
 
 TEST (_GTestStructLooper, StructLooper_PartiallyDefinedComposite_LoopOverVariables)
 
 TEST (_GTestStructLooper, StructLooper_PartiallyDefinedComposite_LoopOverValues_1)
 
 TEST (_GTestStructLooper, StructLooper_PartiallyDefinedComposite_LoopOverValues_2)
 

Variables

static auto hits
 
static auto compFull
 
static auto compPart
 

Detailed Description

A test for the cbm::util::StructLooper class.

Since
24.10.2025
Author
Sergei Zharko s.zha.nosp@m.rko@.nosp@m.gsi.d.nosp@m.e

Definition in file _GTestStructLooper.cxx.

Function Documentation

◆ TEST() [1/6]

TEST ( _GTestStructLooper ,
StructLooper_FullyDefinedComposite_LoopOverValues_1  )

◆ TEST() [2/6]

TEST ( _GTestStructLooper ,
StructLooper_FullyDefinedComposite_LoopOverValues_2  )

◆ TEST() [3/6]

TEST ( _GTestStructLooper ,
StructLooper_FullyDefinedComposite_LoopOverVariables  )

Definition at line 207 of file _GTestStructLooper.cxx.

References compFull, and CompositeApplication::GetNofNonNullopt().

◆ TEST() [4/6]

TEST ( _GTestStructLooper ,
StructLooper_PartiallyDefinedComposite_LoopOverValues_1  )

◆ TEST() [5/6]

TEST ( _GTestStructLooper ,
StructLooper_PartiallyDefinedComposite_LoopOverValues_2  )

◆ TEST() [6/6]

TEST ( _GTestStructLooper ,
StructLooper_PartiallyDefinedComposite_LoopOverVariables  )

Definition at line 229 of file _GTestStructLooper.cxx.

References compPart, and CompositeApplication::GetNofNonNullopt().

Variable Documentation

◆ compFull

auto compFull
static
Initial value:
=
Composite{.fA = std::move(A()),
.fB = std::move(B(std::move(std::vector<int>({1, 1, 1, 1, 3, 3, 3, 3, 2, 2, 0, 0, 0, 0, 2, 2})))),
.fC = std::move(C(std::move(std::unordered_map<uint16_t, int>({{0x12, 0}, {0x22, 0}, {0x32, 1}}))))}
A composite of optional A, B and C.

Definition at line 197 of file _GTestStructLooper.cxx.

Referenced by TEST(), TEST(), and TEST().

◆ compPart

auto compPart
static
Initial value:
=
Composite{.fA = std::move(A()),
.fB = std::nullopt,
.fC = std::move(C(std::move(std::unordered_map<uint16_t, int>({{0x12, 0}, {0x22, 0}, {0x32, 1}}))))}

Definition at line 202 of file _GTestStructLooper.cxx.

Referenced by TEST(), TEST(), and TEST().

◆ hits

auto hits
static
Initial value:
= Hits{
.a = std::move(std::vector<uint16_t>{0x100, 0x200, 0x320, 0x110, 0x200, 0x300, 0x130, 0x220, 0x320}),
.b = std::move(std::vector<uint16_t>{0x051, 0x141, 0x491, 0x241, 0x551, 0x821, 0x131, 0x951, 0x241}),
.c = std::move(std::vector<uint16_t>{0x012, 0x022, 0x032, 0x032, 0x012, 0x012, 0x022, 0x012, 0x022})
}
A class, which emulates hit containers for different components.

Definition at line 191 of file _GTestStructLooper.cxx.

Referenced by CompositeApplication::GetNumberOfStationsWithHits().