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

Wrong test result #13

Open
andre2007 opened this issue Nov 3, 2017 · 2 comments
Open

Wrong test result #13

andre2007 opened this issue Nov 3, 2017 · 2 comments

Comments

@andre2007
Copy link

The following sample has 1 test class with 1 test method but the output shows 2 tests in console and also in the xml report.

dub test --skip-registry=all -- --report=dunit.xml
..
Tests run: 2, Failures: 0, Errors: 0, Skips: 0
OK

dunit.xml

<testsuites>
    <testsuite name="dunit">
        <testcase name="unittest" time="0.000" classname="app" />
        <testcase name="checkAnswer" time="0.000" classname="tests.tests.TestCase" />
    </testsuite>
</testsuites>

dlang-sample.zip

@linkrope
Copy link
Owner

Seems that dmd invents a unittest function in app.d in certain situations.
The easiest fix is to remove the feature "run unittest functions like @test functions" introduced in 0.8.0.
What do you think?

@andre2007
Copy link
Author

My gut feeling is, the unittest function is introduced by dub but I have to do deeper investigations. If I find found out which component causes the additional unittest function I will create an issue either on dub/dmd.
Having the unittest functions handled in the same way like the @test functions is a good feature in my opinion. Maybe someone want to enable/disable this by a e.g. console argument but for me it is highly valuable.

As d-unit shows the "truth" and the bug is not d-unit related I think this issue can be closed. What do you think?

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

No branches or pull requests

2 participants