poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1696577 - /poi/trunk/src/ooxml/java/org/apache/poi/util/OOXMLLite.java
Date Wed, 19 Aug 2015 13:03:06 GMT
Author: centic
Date: Wed Aug 19 13:03:05 2015
New Revision: 1696577

URL: http://svn.apache.org/r1696577
Log:
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.

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/util/OOXMLLite.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/util/OOXMLLite.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/util/OOXMLLite.java?rev=1696577&r1=1696576&r2=1696577&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/util/OOXMLLite.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/util/OOXMLLite.java Wed Aug 19 13:03:05 2015
@@ -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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message