@@ -15,15 +15,23 @@ using namespace types;
1515static const string INT64_MIN_STRING =
1616 std::to_string (std::numeric_limits<int64_t >::min());
1717
18- const string Tests::DEFAULT_SCOPE_NAME = " regression" ;
19- const string Tests::ERROR_SCOPE_NAME = " error" ;
18+ const string Tests::DEFAULT_SUITE_NAME = " regression" ;
19+ const string Tests::ERROR_SUITE_NAME = " error" ;
2020
2121const Tests::MethodParam &tests::Tests::getStdinMethodParam () {
2222 static const Tests::MethodParam stdinMethodParam =
2323 MethodParam (types::Type::CStringType (), types::Type::getStdinParamName (), std::nullopt );
2424 return stdinMethodParam;
2525}
2626
27+ Tests::MethodDescription::MethodDescription () : suiteTestCases{
28+ {Tests::DEFAULT_SUITE_NAME, std::vector<MethodTestCase>()},
29+ {Tests::ERROR_SUITE_NAME, std::vector<MethodTestCase>()}
30+ }, codeText{
31+ {Tests::DEFAULT_SUITE_NAME, std::string ()},
32+ {Tests::ERROR_SUITE_NAME, std::string ()}
33+ } {}
34+
2735static string makeDecimalConstant (string value, const string &typeName) {
2836 if (typeName == " long" ) {
2937 if (value == INT64_MIN_STRING) {
@@ -516,13 +524,13 @@ void KTestObjectParser::parseKTest(const MethodKtests &batch,
516524 }
517525}
518526
519- static string getScopeName (const UTBotKTest::Status &status,
527+ static string getSuiteName (const UTBotKTest::Status &status,
520528 const shared_ptr<LineInfo> lineInfo) {
521529 bool forAssert = lineInfo != nullptr && lineInfo->forAssert ;
522530 if (status == UTBotKTest::Status::FAILED || forAssert) {
523- return Tests::ERROR_SCOPE_NAME ;
531+ return Tests::ERROR_SUITE_NAME ;
524532 }
525- return Tests::DEFAULT_SCOPE_NAME ;
533+ return Tests::DEFAULT_SUITE_NAME ;
526534}
527535
528536int KTestObjectParser::findFieldIndex (const StructInfo &structInfo, unsigned int offset) {
@@ -671,8 +679,8 @@ void KTestObjectParser::parseTestCases(const UTBotKTestList &cases,
671679 for (const auto &case_ : cases) {
672680 std::stringstream traceStream;
673681 traceStream << " Test case #" << (++caseCounter) << " :\n " ;
674- string scopeName = getScopeName (case_.status , lineInfo);
675- Tests::MethodTestCase testCase{ scopeName };
682+ string suiteName = getSuiteName (case_.status , lineInfo);
683+ Tests::MethodTestCase testCase{ suiteName };
676684 vector<Tests::TestCaseParamValue> paramValues;
677685
678686 Tests::TestCaseDescription testCaseDescription;
@@ -734,6 +742,7 @@ void KTestObjectParser::parseTestCases(const UTBotKTestList &cases,
734742 assignTypeStubVar (testCase, methodDescription);
735743
736744 methodDescription.testCases .push_back (testCase);
745+ methodDescription.suiteTestCases [testCase.suiteName ].push_back (testCase);
737746 }
738747}
739748
@@ -1124,6 +1133,6 @@ bool isUnnamed(char *name) {
11241133}
11251134
11261135bool Tests::MethodTestCase::isError () const {
1127- return scopeName == ERROR_SCOPE_NAME ;
1136+ return suiteName == ERROR_SUITE_NAME ;
11281137}
11291138}
0 commit comments