8 #include "gtest/gtest.h"
13 using vec = std::vector<std::size_t>;
15 TEST(make_jetstreamTester, SimpleSimpleSimpleChain) {
17 std::vector<std::vector<std::size_t>>
v;
18 v.push_back(std::vector<std::size_t>{1,2});
19 v.push_back(std::vector<std::size_t>{3,4, 5});
20 v.push_back(std::vector<std::size_t>{6,7});
22 std::vector<std::size_t> repeats{1,1,1};
44 EXPECT_EQ (
v0, streamer.
next());
45 EXPECT_EQ (v1, streamer.
next());
46 EXPECT_EQ (
v2, streamer.
next());
47 EXPECT_EQ (v3, streamer.
next());
48 EXPECT_EQ (v4, streamer.
next());
49 EXPECT_EQ (v5, streamer.
next());
50 EXPECT_EQ (v6, streamer.
next());
51 EXPECT_EQ (v7, streamer.
next());
52 EXPECT_EQ (v8, streamer.
next());
53 EXPECT_EQ (v9, streamer.
next());
54 EXPECT_EQ (v10, streamer.
next());
55 EXPECT_EQ (v11, streamer.
next());
57 EXPECT_EQ (
vec{}, streamer.
next());
61 TEST(make_jetstreamTester, SimpleCompoundSimpleChain) {
62 std::vector<std::vector<std::size_t>>
v;
63 v.push_back(std::vector<std::size_t>{1,2});
64 v.push_back(std::vector<std::size_t>{3,4, 5});
65 v.push_back(std::vector<std::size_t>{6,7});
67 std::vector<std::size_t> repeats{1,2,1};
88 EXPECT_EQ (
v0, streamer.
next());
89 EXPECT_EQ (v1, streamer.
next());
90 EXPECT_EQ (
v2, streamer.
next());
91 EXPECT_EQ (v3, streamer.
next());
92 EXPECT_EQ (v4, streamer.
next());
93 EXPECT_EQ (v5, streamer.
next());
94 EXPECT_EQ (v6, streamer.
next());
95 EXPECT_EQ (v7, streamer.
next());
96 EXPECT_EQ (v8, streamer.
next());
97 EXPECT_EQ (v9, streamer.
next());
98 EXPECT_EQ (v10, streamer.
next());
99 EXPECT_EQ (v11, streamer.
next());
101 EXPECT_EQ (
vec{}, streamer.
next());
104 TEST(make_jetstreamTester, reallife) {
105 std::vector<std::vector<std::size_t>>
v;
106 v.push_back(std::vector<std::size_t>{0, 1, 2});
107 v.push_back(std::vector<std::size_t>{
108 0, 1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 13,
109 14, 15, 17, 19, 21, 25, 26, 29, 33});
113 std::vector<std::size_t> repeats{1,3};
121 std::size_t ipass{0};
130 EXPECT_EQ (ipass, 3990
u);