diff --git a/server/src/Tests.h b/server/src/Tests.h index 4429b603..928bd402 100644 --- a/server/src/Tests.h +++ b/server/src/Tests.h @@ -467,6 +467,13 @@ namespace tests { FileInfo getFileByName(char fileName) const { return filesValues.value()[fileName - 'A']; } + + std::string getError() const { + if (!errorDescriptors.empty()) { + return errorDescriptors[0].substr(0, errorDescriptors[0].find('\n')); + } + return ""; + } }; struct Modifiers { diff --git a/server/src/printers/TestsPrinter.cpp b/server/src/printers/TestsPrinter.cpp index 54d1e2e6..7b90a231 100644 --- a/server/src/printers/TestsPrinter.cpp +++ b/server/src/printers/TestsPrinter.cpp @@ -408,6 +408,9 @@ void TestsPrinter::genHeaders(Tests &tests, const fs::path& generatedHeaderPath) } void TestsPrinter::testHeader(const Tests::MethodTestCase &testCase) { + if (testCase.isError()) { + strComment(testCase.getError()); + } strFunctionCall("TEST", { testCase.suiteName, testCase.testName }, NL) << LB(false); } diff --git a/vscode-plugin/protoc.sh b/vscode-plugin/protoc.sh old mode 100644 new mode 100755