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

Go to the source code of this file.

Typedefs

using res = std::pair< std::vector< unsigned int >, bool >
 
using vec = std::vector< unsigned int >
 

Functions

 TEST (ProductGenTester, noargs)
 
 TEST (ProductGenTester, empty)
 
 TEST (ProductGenTester, zeroend)
 
 TEST (ProductGenTester, ends12)
 

Variables

 ATLAS_NO_CHECK_FILE_THREAD_SAFETY
 

Typedef Documentation

◆ res

using res = std::pair<std::vector<unsigned int>, bool>

Definition at line 12 of file ProductGenTest.cxx.

◆ vec

using vec = std::vector<unsigned int>

Definition at line 13 of file ProductGenTest.cxx.

Function Documentation

◆ TEST() [1/4]

TEST ( ProductGenTester  ,
empty   
)

Definition at line 20 of file ProductGenTest.cxx.

20  {
21  std::vector<std::size_t> ends;
22  ProductGen gen(ends);
23  EXPECT_TRUE(gen.next().empty());
24 }

◆ TEST() [2/4]

TEST ( ProductGenTester  ,
ends12   
)

Definition at line 34 of file ProductGenTest.cxx.

34  {
35  ProductGen gen(std::vector<std::size_t>({2, 3}));
36 
37  std::vector<std::size_t> exp{0, 0};
38  EXPECT_EQ(gen.next(), exp);
39 
40  exp = std::vector<std::size_t>{1, 0};
41  EXPECT_EQ(gen.next(), exp);
42 
43  exp = std::vector<std::size_t>{0, 1};
44  EXPECT_EQ(gen.next(), exp);
45 
46  exp = std::vector<std::size_t>{1, 1};
47  EXPECT_EQ(gen.next(), exp);
48 
49  exp = std::vector<std::size_t>{0, 2};
50  EXPECT_EQ(gen.next(), exp);
51 
52  exp = std::vector<std::size_t>{1, 2};
53  EXPECT_EQ(gen.next(), exp);
54 
55  EXPECT_TRUE(gen.next().empty());
56 }

◆ TEST() [3/4]

TEST ( ProductGenTester  ,
noargs   
)

Definition at line 15 of file ProductGenTest.cxx.

15  {
17  EXPECT_TRUE(gen.next().empty());
18 }

◆ TEST() [4/4]

TEST ( ProductGenTester  ,
zeroend   
)

Definition at line 26 of file ProductGenTest.cxx.

26  {
27  ProductGen gen(std::vector<std::size_t>({0,2}));
28 
29  // no values due to and end value of 0.
30  EXPECT_TRUE(gen.next().empty());
31 }

Variable Documentation

◆ ATLAS_NO_CHECK_FILE_THREAD_SAFETY

ATLAS_NO_CHECK_FILE_THREAD_SAFETY

Definition at line 6 of file ProductGenTest.cxx.

drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
master.gen
gen
Definition: master.py:32
ProductGen
Definition: ProductGen.h:13