Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Typedefs | Functions
CombinationsGeneratorTest.cxx File Reference
#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)
 

Typedef Documentation

◆ vec

using vec = std::vector<size_t>

Definition at line 9 of file CombinationsGeneratorTest.cxx.

Function Documentation

◆ TEST() [1/5]

TEST ( CombinationsGeneratorTester  ,
n3k0   
)

Definition at line 42 of file CombinationsGeneratorTest.cxx.

42  {
44  vec v0 {};
45  EXPECT_EQ (v0, gen.get());
46  EXPECT_EQ (true, gen.bump());
47 }

◆ TEST() [2/5]

TEST ( CombinationsGeneratorTester  ,
n3k1   
)

Definition at line 11 of file CombinationsGeneratorTest.cxx.

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

◆ TEST() [3/5]

TEST ( CombinationsGeneratorTester  ,
n3k2   
)

Definition at line 22 of file CombinationsGeneratorTest.cxx.

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

◆ TEST() [4/5]

TEST ( CombinationsGeneratorTester  ,
n3k3   
)

Definition at line 35 of file CombinationsGeneratorTest.cxx.

35  {
37  vec v0 {0,1,2};
38  EXPECT_EQ (v0, gen.get());
39  EXPECT_EQ (true, gen.bump());
40 }

◆ TEST() [5/5]

TEST ( CombinationsGeneratorTester  ,
n3k4   
)

Definition at line 49 of file CombinationsGeneratorTest.cxx.

49  {
51  vec v0 {};
52  EXPECT_EQ (v0, gen.get());
53  EXPECT_EQ (true, gen.bump());
54 }
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:9
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