Adjust excludes to make the output a bit cleaner in OOXMLLite and also look in the superclass for @Test annotations to include one additional unit-test that we missed currently.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696577 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2af2fa28c2
commit
580171fe27
@ -91,7 +91,10 @@ public final class OOXMLLite {
|
||||
//collect unit tests
|
||||
System.out.println("Collecting unit tests from " + _testDir);
|
||||
collectTests(_testDir, _testDir, lst, ".+.class$",
|
||||
".+(BaseTestXCell|TestUnfixedBugs|MemoryUsage|TestDataProvider|TestDataSamples|All.+Tests|ZipFileAssert|PkiTestUtils|TestCellFormatPart\\$\\d|TestSignatureInfo\\$\\d).class");
|
||||
".+(BaseTestXCell|TestUnfixedBugs|MemoryUsage|TestDataProvider|TestDataSamples|All.+Tests|ZipFileAssert|PkiTestUtils|TestCellFormatPart\\$\\d|TestSignatureInfo\\$\\d|"
|
||||
+ "TestSXSSFWorkbook\\$\\d|TestCertificateEncryption\\$CertData|TestPOIXMLDocument\\$OPCParser|TestPOIXMLDocument\\$TestFactory|TestXSLFTextParagraph\\$DrawTextParagraphProxy|"
|
||||
+ "TestXSSFExportToXML\\$\\d|TestXSSFExportToXML\\$DummyEntityResolver|TestSXSSFWorkbook\\$NullOutputStream|TestFormulaEvaluatorOnXSSF\\$Result|TestFormulaEvaluatorOnXSSF\\$SS|"
|
||||
+ "TestMultiSheetFormulaEvaluatorOnXSSF\\$Result|TestMultiSheetFormulaEvaluatorOnXSSF\\$SS|TestXSSFBugs\\$\\d).class");
|
||||
System.out.println("Found " + lst.size() + " classes");
|
||||
|
||||
//run tests
|
||||
@ -148,6 +151,15 @@ public final class OOXMLLite {
|
||||
}
|
||||
}
|
||||
|
||||
// also check super classes
|
||||
if(testclass.getSuperclass() != null) {
|
||||
for (Method m : testclass.getSuperclass().getDeclaredMethods()) {
|
||||
if(m.isAnnotationPresent(Test.class)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("Class " + testclass.getName() + " does not derive from TestCase and does not have a @Test annotation");
|
||||
|
||||
// Should we also look at superclasses to find cases
|
||||
|
Loading…
Reference in New Issue
Block a user