diff options
author | Dominik Stadler <centic@apache.org> | 2015-08-19 13:03:05 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2015-08-19 13:03:05 +0000 |
commit | 7f27e92800e33f39f9ebb3752d6ab725d5460550 (patch) | |
tree | cafd0056a241aa4150d6c5540dc16e0e106b6b9a /src/ooxml/java/org/apache/poi/util | |
parent | 598e148d2d7bd9805ab250c5dc6100bc0a0b0eb5 (diff) | |
download | poi-7f27e92800e33f39f9ebb3752d6ab725d5460550.tar.gz poi-7f27e92800e33f39f9ebb3752d6ab725d5460550.zip |
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
Diffstat (limited to 'src/ooxml/java/org/apache/poi/util')
-rw-r--r-- | src/ooxml/java/org/apache/poi/util/OOXMLLite.java | 14 |
1 files changed, 13 insertions, 1 deletions
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 |