ATLAS Offline Software
Loading...
Searching...
No Matches
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}
std::vector< size_t > vec
generate all possible combinations of objects

◆ 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}