Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a short description of the error to a test comment #583

Merged
merged 3 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions server/src/Tests.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,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 {
Expand Down
3 changes: 3 additions & 0 deletions server/src/printers/TestsPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Empty file modified vscode-plugin/protoc.sh
100644 → 100755
Empty file.