ATLAS Offline Software
Typedefs | Functions | Variables
CombinationsGeneratorTest.cxx File Reference
#include "CxxUtils/checker_macros.h"
#include "gtest/gtest.h"
#include "TrigHLTJetHypo/../src/CombinationsGenerator.h"
#include <vector>
Include dependency graph for CombinationsGeneratorTest.cxx:

Go to the source code of this file.

Typedefs

using vec = std::vector< size_t >
 

Functions

 TEST (CombinationsGeneratorTester, n3k1)
 
 TEST (CombinationsGeneratorTester, n3k2)
 
 TEST (CombinationsGeneratorTester, n3k3)
 
 TEST (CombinationsGeneratorTester, n3k0)
 
 TEST (CombinationsGeneratorTester, n3k4)
 

Variables

 ATLAS_NO_CHECK_FILE_THREAD_SAFETY
 

Typedef Documentation

◆ vec

using vec = std::vector<size_t>

Definition at line 12 of file CombinationsGeneratorTest.cxx.

Function Documentation

◆ TEST() [1/5]

TEST ( CombinationsGeneratorTester  ,
n3k0   
)

Definition at line 45 of file CombinationsGeneratorTest.cxx.

45  {
47  vec v0 {};
48  EXPECT_EQ (v0, gen.get());
49  EXPECT_EQ (true, gen.bump());
50 }

◆ TEST() [2/5]

TEST ( CombinationsGeneratorTester  ,
n3k1   
)

Definition at line 14 of file CombinationsGeneratorTest.cxx.

14  {
16  // return value from bump() says whether the generator has cycled.
17  EXPECT_EQ (vec{0}, gen.get());
18  EXPECT_EQ (false, gen.bump());
19  EXPECT_EQ (vec{1}, gen.get());
20  EXPECT_EQ (false, gen.bump());
21  EXPECT_EQ (vec{2}, gen.get());
22  EXPECT_EQ (true, gen.bump());
23 }

◆ TEST() [3/5]

TEST ( CombinationsGeneratorTester  ,
n3k2   
)

Definition at line 25 of file CombinationsGeneratorTest.cxx.

25  {
27  vec v0 {0,1};
28  vec v1 {0,2};
29  vec v2 {1,2};
30  EXPECT_EQ (v0, gen.get());
31  EXPECT_EQ (false, gen.bump());
32  EXPECT_EQ (v1, gen.get());
33  EXPECT_EQ (false, gen.bump());
34  EXPECT_EQ (v2, gen.get());
35  EXPECT_EQ (true, gen.bump());
36 }

◆ TEST() [4/5]

TEST ( CombinationsGeneratorTester  ,
n3k3   
)

Definition at line 38 of file CombinationsGeneratorTest.cxx.

38  {
40  vec v0 {0,1,2};
41  EXPECT_EQ (v0, gen.get());
42  EXPECT_EQ (true, gen.bump());
43 }

◆ TEST() [5/5]

TEST ( CombinationsGeneratorTester  ,
n3k4   
)

Definition at line 52 of file CombinationsGeneratorTest.cxx.

52  {
54  vec v0 {};
55  EXPECT_EQ (v0, gen.get());
56  EXPECT_EQ (true, gen.bump());
57 }

Variable Documentation

◆ ATLAS_NO_CHECK_FILE_THREAD_SAFETY

ATLAS_NO_CHECK_FILE_THREAD_SAFETY

Definition at line 6 of file CombinationsGeneratorTest.cxx.

vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
CombinationsGenerator
Definition: CombinationsGenerator.h:24
master.gen
gen
Definition: master.py:32
parseMapping.v0
def v0
Definition: parseMapping.py:149
ReadCellNoiseFromCoolCompare.v2
v2
Definition: ReadCellNoiseFromCoolCompare.py:364