@@ -51,21 +51,28 @@ class TestOptions : public TestFixture {
5151 void which_test () const {
5252 const char * argv[] = {" ./test_runner" , " TestClass" };
5353 options args (getArrayLength (argv), argv);
54- ASSERT (std::set<std::string> {" TestClass" } == args.which_test ());
54+ const std::map<std::string, std::set<std::string>> expected{
55+ { " TestClass" , {} }
56+ };
57+ ASSERT (expected == args.which_tests ());
5558 }
5659
5760
5861 void which_test_method () const {
5962 const char * argv[] = {" ./test_runner" , " TestClass::TestMethod" };
6063 options args (getArrayLength (argv), argv);
61- ASSERT (std::set<std::string> {" TestClass::TestMethod" } == args.which_test ());
64+ const std::map<std::string, std::set<std::string>> expected{
65+ { " TestClass" , {" TestMethod" } }
66+ };
67+ ASSERT (expected == args.which_tests ());
6268 }
6369
6470
6571 void no_test_method () const {
6672 const char * argv[] = {" ./test_runner" };
6773 options args (getArrayLength (argv), argv);
68- ASSERT (std::set<std::string> {" " } == args.which_test ());
74+ const std::map<std::string, std::set<std::string>> expected{};
75+ ASSERT (expected == args.which_tests ());
6976 }
7077
7178
@@ -105,22 +112,28 @@ class TestOptions : public TestFixture {
105112 void multiple_testcases () const {
106113 const char * argv[] = {" ./test_runner" , " TestClass::TestMethod" , " TestClass::AnotherTestMethod" };
107114 options args (getArrayLength (argv), argv);
108- std::set<std::string> expected {" TestClass::TestMethod" , " TestClass::AnotherTestMethod" };
109- ASSERT (expected == args.which_test ());
115+ const std::map<std::string, std::set<std::string>> expected{
116+ { " TestClass" , { " TestMethod" , " AnotherTestMethod" } }
117+ };
118+ ASSERT (expected == args.which_tests ());
110119 }
111120
112121 void multiple_testcases_ignore_duplicates () const {
113122 const char * argv[] = {" ./test_runner" , " TestClass::TestMethod" , " TestClass" };
114123 options args (getArrayLength (argv), argv);
115- std::set<std::string> expected {" TestClass" };
116- ASSERT (expected == args.which_test ());
124+ const std::map<std::string, std::set<std::string>> expected{
125+ { " TestClass" , {} }
126+ };
127+ ASSERT (expected == args.which_tests ());
117128 }
118129
119130 void invalid_switches () const {
120131 const char * argv[] = {" ./test_runner" , " TestClass::TestMethod" , " -a" , " -v" , " -q" };
121132 options args (getArrayLength (argv), argv);
122- std::set<std::string> expected {" TestClass::TestMethod" };
123- ASSERT (expected == args.which_test ());
133+ const std::map<std::string, std::set<std::string>> expected {
134+ { " TestClass" , { " TestMethod" } }
135+ };
136+ ASSERT (expected == args.which_tests ());
124137 ASSERT_EQUALS (true , args.quiet ());
125138 }
126139
0 commit comments