poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fannin...@apache.org
Subject svn commit: r1882708 - /poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestTrunc.java
Date Tue, 20 Oct 2020 16:08:29 GMT
Author: fanningpj
Date: Tue Oct 20 16:08:29 2020
New Revision: 1882708

URL: http://svn.apache.org/viewvc?rev=1882708&view=rev
Log:
reformat

Modified:
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestTrunc.java

Modified: poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestTrunc.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestTrunc.java?rev=1882708&r1=1882707&r2=1882708&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestTrunc.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestTrunc.java Tue Oct 20
16:08:29 2020
@@ -30,56 +30,56 @@ import org.junit.Test;
  * @author Stephen Wolke (smwolke at geistig.com)
  */
 public final class TestTrunc extends BaseTestNumeric {
-	private static final NumericFunction F = null;
+    private static final NumericFunction F = null;
 
-	@Test
-	public void testTruncWithStringArg() {
+    @Test
+    public void testTruncWithStringArg() {
 
-		ValueEval strArg = new StringEval("abc");
-		ValueEval[] args = { strArg, new NumberEval(2) };
-		ValueEval result = NumericFunction.TRUNC.evaluate(args, -1, (short)-1);
-		Assert.assertEquals(ErrorEval.VALUE_INVALID, result);
-	}
-
-	@Test
-	public void testTruncWithWholeNumber() {
-		ValueEval[] args = { new NumberEval(200), new NumberEval(2) };
-		@SuppressWarnings("static-access")
-		ValueEval result = F.TRUNC.evaluate(args, -1, (short)-1);
-		assertEquals("TRUNC", (new NumberEval(200d)).getNumberValue(), ((NumberEval)result).getNumberValue());
-	}
-
-	@Test
-	public void testTruncWithDecimalNumber() {
-		ValueEval[] args = { new NumberEval(2.612777), new NumberEval(3) };
-		@SuppressWarnings("static-access")
-		ValueEval result = F.TRUNC.evaluate(args, -1, (short)-1);
-		assertEquals("TRUNC", (new NumberEval(2.612d)).getNumberValue(), ((NumberEval)result).getNumberValue());
-	}
-
-	@Test
-	public void testTruncWithProblematicDecimalNumber() {
-		ValueEval[] args = { new NumberEval(0.29), new NumberEval(2) };
-		ValueEval result = NumericFunction.TRUNC.evaluate(args, -1, (short)-1);
-		assertEquals("TRUNC", (new NumberEval(0.29d)).getNumberValue(), ((NumberEval)result).getNumberValue());
-	}
-
-	@Test
-	public void testTruncWithProblematicCalculationResult() {
-
-		ValueEval[] args = { new NumberEval(21.624d / 24d + .009d), new NumberEval(2) };
-		ValueEval result = NumericFunction.TRUNC.evaluate(args, -1, (short)-1);
-		assertEquals("TRUNC", (new NumberEval(0.91d)).getNumberValue(), ((NumberEval)result).getNumberValue());
-	}
-
-	@Test
-	public void testTruncWithDecimalNumberOneArg() {
-		ValueEval[] args = { new NumberEval(2.612777) };
-		ValueEval result = NumericFunction.TRUNC.evaluate(args, -1, (short)-1);
-		assertEquals("TRUNC", (new NumberEval(2d)).getNumberValue(), ((NumberEval)result).getNumberValue());
-	}
+        ValueEval strArg = new StringEval("abc");
+        ValueEval[] args = { strArg, new NumberEval(2) };
+        ValueEval result = NumericFunction.TRUNC.evaluate(args, -1, (short)-1);
+        Assert.assertEquals(ErrorEval.VALUE_INVALID, result);
+    }
+
+    @Test
+    public void testTruncWithWholeNumber() {
+        ValueEval[] args = { new NumberEval(200), new NumberEval(2) };
+        @SuppressWarnings("static-access")
+        ValueEval result = F.TRUNC.evaluate(args, -1, (short)-1);
+        assertEquals("TRUNC", (new NumberEval(200d)).getNumberValue(), ((NumberEval)result).getNumberValue());
+    }
+
+    @Test
+    public void testTruncWithDecimalNumber() {
+        ValueEval[] args = { new NumberEval(2.612777), new NumberEval(3) };
+        @SuppressWarnings("static-access")
+        ValueEval result = F.TRUNC.evaluate(args, -1, (short)-1);
+        assertEquals("TRUNC", (new NumberEval(2.612d)).getNumberValue(), ((NumberEval)result).getNumberValue());
+    }
+
+    @Test
+    public void testTruncWithProblematicDecimalNumber() {
+        ValueEval[] args = { new NumberEval(0.29), new NumberEval(2) };
+        ValueEval result = NumericFunction.TRUNC.evaluate(args, -1, (short)-1);
+        assertEquals("TRUNC", (new NumberEval(0.29d)).getNumberValue(), ((NumberEval)result).getNumberValue());
+    }
+
+    @Test
+    public void testTruncWithProblematicCalculationResult() {
+
+        ValueEval[] args = { new NumberEval(21.624d / 24d + .009d), new NumberEval(2) };
+        ValueEval result = NumericFunction.TRUNC.evaluate(args, -1, (short)-1);
+        assertEquals("TRUNC", (new NumberEval(0.91d)).getNumberValue(), ((NumberEval)result).getNumberValue());
+    }
+
+    @Test
+    public void testTruncWithDecimalNumberOneArg() {
+        ValueEval[] args = { new NumberEval(2.612777) };
+        ValueEval result = NumericFunction.TRUNC.evaluate(args, -1, (short)-1);
+        assertEquals("TRUNC", (new NumberEval(2d)).getNumberValue(), ((NumberEval)result).getNumberValue());
+    }
 
-	@Test
+    @Test
     public void testNegative() {
         ValueEval[] args = { new NumberEval(-8.9), new NumberEval(0) };
         @SuppressWarnings("static-access")



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


Mime
View raw message