| 56 | } |
| 57 | |
| 58 | static void GetTargetServicesHelper( |
| 59 | const String& filter, const Dictionary::Ptr& constants, bool targeted, const std::vector<std::pair<String, String>>& services = {} |
| 60 | ) |
| 61 | { |
| 62 | auto compiled (ConfigCompiler::CompileText("<test>", filter)); |
| 63 | auto expr (RequireActualExpression(compiled)); |
| 64 | std::vector<std::pair<const String*, const String*>> actualServices; |
| 65 | |
| 66 | BOOST_CHECK_EQUAL(ApplyRule::GetTargetServices(expr, actualServices, constants), targeted); |
| 67 | |
| 68 | if (targeted) { |
| 69 | std::vector<std::pair<String, String>> actualServiceNames; |
| 70 | |
| 71 | actualServiceNames.reserve(actualServices.size()); |
| 72 | |
| 73 | for (auto s : actualServices) { |
| 74 | actualServiceNames.emplace_back(*s.first, *s.second); |
| 75 | } |
| 76 | |
| 77 | BOOST_CHECK_EQUAL_COLLECTIONS(actualServiceNames.begin(), actualServiceNames.end(), services.begin(), services.end()); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | BOOST_AUTO_TEST_SUITE(config_apply) |
| 82 |
no test coverage detected