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

Add support for Context when running Boost test runners #507

Merged
merged 3 commits into from
Aug 18, 2023

Conversation

jonahgraham
Copy link
Member

Fixes #459

The pre-existing code assumed that string (qName) passed in
to start and end element was always interned and compared
those strings to constants using ==. Instead rewrite
code using switch statements on the strings.

Also includes small change to the exception handling so that
code analysis can correctly where exceptions are always thrown.
i.e. instead of hiding a throw in an always throwing method,
return the exception and throw it at the call site.
The code for boost test running parsing left
all the excess whitespace from the XML file.
This led to a lot whitespace in messages
in the UI. This change trims leading and
trailing whitespace, but preserves whitespace
within a message.
Boost a while ago added Context tags, this commit makes
those context tags supported in the testsrunner code of CDT

See also https://www.boost.org/doc/libs/1_82_0/libs/test/doc/html/boost_test/test_output/test_tools_support_for_logging/contexts.html

Fixes 459
@jonahgraham jonahgraham marked this pull request as draft August 16, 2023 15:44
@jonahgraham
Copy link
Member Author

Setting to draft until discussion in #459 is progressed/concluded.

@jonahgraham jonahgraham marked this pull request as ready for review August 18, 2023 14:05
@jonahgraham jonahgraham merged commit 02035b0 into eclipse-cdt:main Aug 18, 2023
@jonahgraham jonahgraham deleted the boost-context branch August 18, 2023 14:06
@jonahgraham jonahgraham added the noteworthy Pull requests and fixed issues that should be highlighted to users label Aug 18, 2023
@jonahgraham jonahgraham added this to the 11.3.0 milestone Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
noteworthy Pull requests and fixed issues that should be highlighted to users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C/C++Testing: XML parse error when using Boost Test Runners (<Context> is not accepted)
1 participant