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

JUnit reporter className cpp to Java style namespace conversion #2468

Closed
Ext3h opened this issue Jun 27, 2022 · 0 comments
Closed

JUnit reporter className cpp to Java style namespace conversion #2468

Ext3h opened this issue Jun 27, 2022 · 0 comments

Comments

@Ext3h
Copy link

Ext3h commented Jun 27, 2022

Describe the bug
A test of the form:

namespace foo { class bar {}; }
TEST_CASE_METHOD(foo::bar, "test")

using the junit reporter creates an output in the form

<testcase classname="test.exe.foo::bar" name="test" time="0.002" status="run"/>

The classname is mal-formed, a Java classpath like identifier was expected, but a C++ like class path is yielded instead.

Expected behavior

<testcase classname="test.exe.foo.bar" name="test" time="0.002" status="run"/>

The C++ style class path is translated properly into a Java style class path by substituting any :: in testInfo.className with ..

This allows Jenkins and Gitlab to properly group tests by namespace hierarchy as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants