| 50 | } |
| 51 | |
| 52 | static std::vector<std::vector<std::string>> generateCombinations( |
| 53 | const std::vector<std::vector<std::string>>& groups) |
| 54 | { |
| 55 | |
| 56 | std::vector<std::vector<std::string>> result; |
| 57 | std::vector<std::string> current(groups.size()); |
| 58 | |
| 59 | std::function<void(int)> recurse = [&](int index) |
| 60 | { |
| 61 | if (index == groups.size()) |
| 62 | result.push_back(current); |
| 63 | else |
| 64 | { |
| 65 | auto& group = groups.at(index); |
| 66 | for (auto& g : group) |
| 67 | { |
| 68 | current[index] = g; |
| 69 | recurse(index + 1); |
| 70 | } |
| 71 | } |
| 72 | }; |
| 73 | |
| 74 | if (!groups.empty()) |
| 75 | recurse(0); |
| 76 | |
| 77 | return result; |
| 78 | } |
| 79 | |
| 80 | static void validateConfigWithOptions(std::string baseConfigName, |
| 81 | const std::vector<std::string>& options, |
no test coverage detected