You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2016/06/10 04:57:05 UTC

svn commit: r1747633 - in /poi/branches/xssf_structured_references/src: ooxml/testcases/org/apache/poi/ss/formula/TestFormulaParser.java testcases/org/apache/poi/hssf/model/AllModelTests.java

Author: onealj
Date: Fri Jun 10 04:57:04 2016
New Revision: 1747633

URL: http://svn.apache.org/viewvc?rev=1747633&view=rev
Log:
ooxml o.a.p.ss.formula.TestFormulaParser junit3 -> junit4

Modified:
    poi/branches/xssf_structured_references/src/ooxml/testcases/org/apache/poi/ss/formula/TestFormulaParser.java
    poi/branches/xssf_structured_references/src/testcases/org/apache/poi/hssf/model/AllModelTests.java

Modified: poi/branches/xssf_structured_references/src/ooxml/testcases/org/apache/poi/ss/formula/TestFormulaParser.java
URL: http://svn.apache.org/viewvc/poi/branches/xssf_structured_references/src/ooxml/testcases/org/apache/poi/ss/formula/TestFormulaParser.java?rev=1747633&r1=1747632&r2=1747633&view=diff
==============================================================================
--- poi/branches/xssf_structured_references/src/ooxml/testcases/org/apache/poi/ss/formula/TestFormulaParser.java (original)
+++ poi/branches/xssf_structured_references/src/ooxml/testcases/org/apache/poi/ss/formula/TestFormulaParser.java Fri Jun 10 04:57:04 2016
@@ -18,6 +18,11 @@
  */
 package org.apache.poi.ss.formula;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import org.apache.poi.hssf.usermodel.HSSFEvaluationWorkbook;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.ss.formula.ptg.AbstractFunctionPtg;
@@ -28,7 +33,7 @@ import org.apache.poi.xssf.XSSFTestDataS
 import org.apache.poi.xssf.usermodel.XSSFEvaluationWorkbook;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 
-import junit.framework.TestCase;
+import org.junit.Test;
 
 /**
  * Test {@link FormulaParser}'s handling of row numbers at the edge of the
@@ -36,8 +41,9 @@ import junit.framework.TestCase;
  * 
  * @author David North
  */
-public class TestFormulaParser extends TestCase {
+public class TestFormulaParser {
 
+    @Test
     public void testHSSFFailsForOver65536() {
         FormulaParsingWorkbook workbook = HSSFEvaluationWorkbook.create(new HSSFWorkbook());
         try {
@@ -49,16 +55,19 @@ public class TestFormulaParser extends T
         }
     }
 
+    @Test
     public void testHSSFPassCase() {
         FormulaParsingWorkbook workbook = HSSFEvaluationWorkbook.create(new HSSFWorkbook());
         FormulaParser.parse("Sheet1!1:65536", workbook, FormulaType.CELL, 0);
     }
 
+    @Test
     public void testXSSFWorksForOver65536() {
         FormulaParsingWorkbook workbook = XSSFEvaluationWorkbook.create(new XSSFWorkbook());
         FormulaParser.parse("Sheet1!1:65537", workbook, FormulaType.CELL, 0);
     }
 
+    @Test
     public void testXSSFFailCase() {
         FormulaParsingWorkbook workbook = XSSFEvaluationWorkbook.create(new XSSFWorkbook());
         try {
@@ -71,6 +80,7 @@ public class TestFormulaParser extends T
     }
     
     // copied from org.apache.poi.hssf.model.TestFormulaParser
+    @Test
     public void testMacroFunction() throws Exception {
         // testNames.xlsm contains a VB function called 'myFunc'
         final String testFile = "testNames.xlsm";
@@ -126,6 +136,7 @@ public class TestFormulaParser extends T
         }
     }
     
+    @Test
     public void testParserErrors() throws Exception {
         XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("testNames.xlsm");
         try {

Modified: poi/branches/xssf_structured_references/src/testcases/org/apache/poi/hssf/model/AllModelTests.java
URL: http://svn.apache.org/viewvc/poi/branches/xssf_structured_references/src/testcases/org/apache/poi/hssf/model/AllModelTests.java?rev=1747633&r1=1747632&r2=1747633&view=diff
==============================================================================
--- poi/branches/xssf_structured_references/src/testcases/org/apache/poi/hssf/model/AllModelTests.java (original)
+++ poi/branches/xssf_structured_references/src/testcases/org/apache/poi/hssf/model/AllModelTests.java Fri Jun 10 04:57:04 2016
@@ -27,7 +27,7 @@ import org.junit.runners.Suite;
 @Suite.SuiteClasses({
     TestDrawingManager.class,
     TestDrawingManager2.class,
-    TestFormulaParser.class,
+    //TestFormulaParser.class, //converted to junit4
     TestFormulaParserEval.class,
     TestFormulaParserIf.class,
     TestLinkTable.class,



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