From: Dominik Stadler Date: Wed, 19 Aug 2015 13:03:05 +0000 (+0000) Subject: Adjust excludes to make the output a bit cleaner in OOXMLLite and also look in the... X-Git-Tag: REL_3_13_FINAL~99 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7f27e92800e33f39f9ebb3752d6ab725d5460550;p=poi.git 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 --- diff --git a/src/ooxml/java/org/apache/poi/util/OOXMLLite.java b/src/ooxml/java/org/apache/poi/util/OOXMLLite.java index 99719ba602..c8aa21c214 100644 --- a/src/ooxml/java/org/apache/poi/util/OOXMLLite.java +++ b/src/ooxml/java/org/apache/poi/util/OOXMLLite.java @@ -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