File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
source/framework/test_case Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -82,18 +82,21 @@ bool TestCaseBase::matchesWithArgFilter(const ArgumentContainer &arguments) cons
8282
8383bool TestCaseBase::needsToBeFilteredDueToLimitedTargets () const {
8484 const auto *test_info = ::testing::UnitTest::GetInstance ()->current_test_info ();
85- const auto full_suite_name = std::string (test_info->test_suite_name ());
86- if (full_suite_name.find (" LIMITED/" ) != std::string::npos) {
87- const auto pos = full_suite_name.find (' /' );
88- if (pos != std::string::npos) {
89- const auto instantiate_name = full_suite_name.substr (0 , pos);
90- const auto test_class_name = full_suite_name.substr (pos + 1 );
91- if (instantiate_name != test_class_name) {
92- return !Configuration::get ().allowLimitedTests ;
85+ if (test_info) {
86+ const auto full_suite_name = std::string (test_info->test_suite_name ());
87+ if (full_suite_name.find (" LIMITED/" ) != std::string::npos) {
88+ const auto pos = full_suite_name.find (' /' );
89+ if (pos != std::string::npos) {
90+ const auto instantiate_name = full_suite_name.substr (0 , pos);
91+ const auto test_class_name = full_suite_name.substr (pos + 1 );
92+ if (instantiate_name != test_class_name) {
93+ return !Configuration::get ().allowLimitedTests ;
94+ }
9395 }
9496 }
97+ return Configuration::get ().allowLimitedTests ;
9598 }
96- return Configuration::get (). allowLimitedTests ;
99+ return false ;
97100}
98101
99102void TestCaseBase::printTestMapWarning () const {
You can’t perform that action at this time.
0 commit comments