]> source.dussan.org Git - poi.git/commitdiff
Adjust excludes to make the output a bit cleaner in OOXMLLite and also look in the...
authorDominik Stadler <centic@apache.org>
Wed, 19 Aug 2015 13:03:05 +0000 (13:03 +0000)
committerDominik Stadler <centic@apache.org>
Wed, 19 Aug 2015 13:03:05 +0000 (13:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1696577 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/util/OOXMLLite.java

index 99719ba60292d2dc758598e0b96df68d276caba8..c8aa21c214248b9f74326ecb9fc042fcd49e0cee 100644 (file)
@@ -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