8 #include "gtest/gtest.h"
12 using res = std::pair<std::vector<unsigned int>,
bool>;
13 using vec = std::vector<unsigned int>;
15 TEST(ProductGenTester, noargs) {
17 EXPECT_TRUE(
gen.next().empty());
20 TEST(ProductGenTester, empty) {
21 std::vector<std::size_t> ends;
23 EXPECT_TRUE(
gen.next().empty());
26 TEST(ProductGenTester, zeroend) {
30 EXPECT_TRUE(
gen.next().empty());
34 TEST(ProductGenTester, ends12) {
37 std::vector<std::size_t>
exp{0, 0};
38 EXPECT_EQ(
gen.next(),
exp);
40 exp = std::vector<std::size_t>{1, 0};
41 EXPECT_EQ(
gen.next(),
exp);
43 exp = std::vector<std::size_t>{0, 1};
44 EXPECT_EQ(
gen.next(),
exp);
46 exp = std::vector<std::size_t>{1, 1};
47 EXPECT_EQ(
gen.next(),
exp);
49 exp = std::vector<std::size_t>{0, 2};
50 EXPECT_EQ(
gen.next(),
exp);
52 exp = std::vector<std::size_t>{1, 2};
53 EXPECT_EQ(
gen.next(),
exp);
55 EXPECT_TRUE(
gen.next().empty());