Hi.
I've implemented CPPUNIT_TEST_XFAIL to add test cases to a suite, which
are expected to fail. See
https://gerrit.libreoffice.org/#/c/19213/
https://gerrit.libreoffice.org/#/c/19214/
https://gerrit.libreoffice.org/#/c/19215/
The current approach unfortunately breaks the ABI and API. The API break
can be prevented, but I wanted to get some review of the approach.
One minor problem I'm struggling with is the accounting of the test in
src/cppunit/TestResultCollector.cpp and the resulting summary output of
src/cppunit/CompilerOutputter.cpp and src/cppunit/TextOutputter.cpp
So errors are a part of the failures, but for XFAIL a pass is actually a
failure. Currently XFAIL pass and failure are both handled as errors.
<< "Run: " << m_result->runTests() << " "
<< "Failure total: " << m_result->testFailuresTotal() << " "
<< "Failures: " << m_result->testFailures() << " "
<< "Errors: " << m_result->testErrors() << " "
<< "Expected: " << m_result->testFailuresExpected() << " "
<< "Unexpected passed: " << m_result->testUnexpectedPasses()
accounted as
if ( failure.isError() )
++m_testErrors;
if ( failure.isExpected() )
{
++m_expectedFailures;
if ( failure.isUnexpectedPass() )
++m_unexpectedPasses;
}
Suggestions welcome.
Thanks for reviewing.
Jan-Marek
Context
- Implement expected failures for CppUnit · Jan-Marek Glogowski
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.