Go to the source code of this file.
#define BOOST_TEST_MODULE (GroupSelector_t) |
BOOST_AUTO_TEST_CASE |
( |
Test_default_parameters |
| ) |
|
BOOST_AUTO_TEST_CASE |
( |
Keep_all_branches_with_instance_name_i2 |
| ) |
|
Definition at line 166 of file GroupSelector_t.cc.
168 auto expected = {
true,
false,
false,
false,
false,
true};
172 std::vector<std::string>
cmds;
173 cmds.push_back(keep_i2_rule);
174 keep_i2.
put(
"outputCommands", cmds);
176 doTest(keep_i2,
"keep i2 parameters", pTables,
expected);
void put(std::string const &key)
BOOST_AUTO_TEST_CASE |
( |
Drop_all_branches_with_instance_name_i2 |
| ) |
|
Definition at line 179 of file GroupSelector_t.cc.
181 auto expected = {
false,
true,
true,
true,
true,
false};
186 std::vector<std::string>
cmds;
187 cmds.push_back(drop_i2_rule1);
188 cmds.push_back(drop_i2_rule2);
189 drop_i2.
put(
"outputCommands", cmds);
191 doTest(drop_i2,
"drop i2 parameters", pTables,
expected);
void put(std::string const &key)
BOOST_AUTO_TEST_CASE |
( |
Drop_all_branches_with_product_type_foo |
| ) |
|
Definition at line 194 of file GroupSelector_t.cc.
196 auto expected = {
true,
true,
true,
true,
true,
true};
200 std::string const drop_foo_rule2 =
"drop foo_*_*_*";
201 std::vector<std::string>
cmds;
202 cmds.push_back(drop_foo_rule1);
203 cmds.push_back(drop_foo_rule2);
204 drop_foo.
put(
"outputCommands", cmds);
206 doTest(drop_foo,
"drop_foo parameters", pTables,
expected);
void put(std::string const &key)
BOOST_AUTO_TEST_CASE |
( |
Drop_all_branches_with_product_type_ProdTypeA |
| ) |
|
Definition at line 209 of file GroupSelector_t.cc.
211 auto expected = {
false,
false,
false,
true,
true,
false};
215 std::string const drop_ProdTypeA_rule2 =
"drop *ProdTypeA_*_*_*";
216 std::vector<std::string>
cmds;
217 cmds.push_back(drop_ProdTypeA_rule1);
218 cmds.push_back(drop_ProdTypeA_rule2);
219 drop_ProdTypeA.
put(
"outputCommands", cmds);
221 doTest(drop_ProdTypeA,
"drop_ProdTypeA", pTables,
expected);
void put(std::string const &key)
BOOST_AUTO_TEST_CASE |
( |
Keep_only_production_branches_with_instance_name_i1 |
| ) |
|
Definition at line 224 of file GroupSelector_t.cc.
226 auto expected = {
false,
true,
false,
false,
false,
false};
229 std::string const keep_i1prod_rule =
"keep *_*_i1_PROD";
230 std::vector<std::string>
cmds;
231 cmds.push_back(keep_i1prod_rule);
232 keep_i1prod.
put(
"outputCommands", cmds);
234 doTest(keep_i1prod,
"keep_i1prod", pTables,
expected);
void put(std::string const &key)
BOOST_AUTO_TEST_CASE |
( |
Keep_drop_keep |
| ) |
|
Definition at line 237 of file GroupSelector_t.cc.
239 auto expected = {
true,
true,
true,
true,
true,
true};
245 std::vector<std::string>
cmds;
246 cmds.push_back(indecisive_rule1);
247 cmds.push_back(indecisive_rule2);
248 cmds.push_back(indecisive_rule3);
249 indecisive.
put(
"outputCommands", cmds);
251 doTest(indecisive,
"indecisive", pTables,
expected);
void put(std::string const &key)
BOOST_AUTO_TEST_CASE |
( |
Keep_all_drop_from_modA_keep_USER |
| ) |
|
Definition at line 254 of file GroupSelector_t.cc.
256 auto expected = {
false,
false,
true,
true,
true,
true};
262 std::vector<std::string>
cmds;
263 cmds.push_back(rule1);
264 cmds.push_back(rule2);
265 cmds.push_back(rule3);
266 params.
put(
"outputCommands", cmds);
268 doTest(params,
"drop_modA_keep_user", pTables,
expected);
void put(std::string const &key)
BOOST_AUTO_TEST_CASE |
( |
Exercise_wildcards |
| ) |
|
Definition at line 271 of file GroupSelector_t.cc.
273 auto expected = {
true,
true,
false,
false,
true,
false};
277 std::string const rule2 =
"keep *Pr*A_m?dA_??_P?O*";
278 std::string const rule3 =
"keep *?*?***??*????*?***_??***?__*?***T";
279 std::vector<std::string>
cmds;
280 cmds.push_back(rule1);
281 cmds.push_back(rule2);
282 cmds.push_back(rule3);
283 params.
put(
"outputCommands", cmds);
285 doTest(params,
"exercise wildcards1", pTables,
expected);
void put(std::string const &key)
BOOST_AUTO_TEST_CASE |
( |
Drop_by_full_spec |
| ) |
|
Definition at line 288 of file GroupSelector_t.cc.
290 auto expected = {
true,
true,
true,
false,
true,
true};
294 std::string const rule2 =
"drop Stringart::Ptr_ptrmvWriter__PtrmvW";
295 std::vector<std::string>
cmds;
296 cmds.push_back(rule1);
297 cmds.push_back(rule2);
298 params.
put(
"outputCommands", cmds);
300 doTest(params,
"drop product by full spec.", pTables,
expected);
void put(std::string const &key)
BOOST_AUTO_TEST_CASE |
( |
Illegal_spec |
| ) |
|
Definition at line 303 of file GroupSelector_t.cc.
307 std::vector<std::string>
cmds;
308 cmds.push_back(bad_rule);
309 std::string const parameterName =
"outputCommands";
310 bad.
put(parameterName, cmds);
311 BOOST_REQUIRE_EXCEPTION(
314 "GroupSelectorTest"),
317 return e.categoryCode() == art::errors::Configuration;
T get(std::string const &key) const
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
void put(std::string const &key)
BOOST_AUTO_TEST_CASE |
( |
Drop_by_type_event |
| ) |
|
Definition at line 321 of file GroupSelector_t.cc.
323 auto expected = {
false,
false,
true,
true,
true,
true};
328 std::vector<std::string>
cmds;
329 cmds.push_back(rule1);
330 cmds.push_back(rule2);
331 params.
put(
"outputCommands", cmds);
333 doTest(params,
"drop product by full spec.", pTables,
expected);
void put(std::string const &key)
BOOST_AUTO_TEST_CASE |
( |
Drop_by_type_results |
| ) |
|
Definition at line 336 of file GroupSelector_t.cc.
338 auto expected = {
true,
true,
true,
true,
true,
false};
343 std::vector<std::string>
cmds;
344 cmds.push_back(rule1);
345 cmds.push_back(rule2);
346 params.
put(
"outputCommands", cmds);
348 doTest(params,
"drop product by full spec.", pTables,
expected);
void put(std::string const &key)
BOOST_AUTO_TEST_CASE |
( |
Keep_by_type_results |
| ) |
|
Definition at line 351 of file GroupSelector_t.cc.
353 auto expected = {
false,
false,
false,
false,
false,
true};
357 std::string const rule2 =
"keep *_*_*_* inResults";
358 std::vector<std::string>
cmds;
359 cmds.push_back(rule1);
360 cmds.push_back(rule2);
361 params.
put(
"outputCommands", cmds);
363 doTest(params,
"drop product by full spec.", pTables,
expected);
void put(std::string const &key)
BOOST_AUTO_TEST_CASE |
( |
Bad_type |
| ) |
|
Definition at line 366 of file GroupSelector_t.cc.
369 std::string const bad_rule =
"keep *_*_i2_* wibble";
370 std::vector<std::string>
cmds;
371 cmds.push_back(bad_rule);
372 std::string const parameterName =
"outputCommands";
373 bad.
put(parameterName, cmds);
374 BOOST_REQUIRE_EXCEPTION(
377 "GroupSelectorTest"),
380 return e.categoryCode() == art::errors::Configuration;
T get(std::string const &key) const
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
void put(std::string const &key)