diff options
author | Dominik Stadler <centic@apache.org> | 2019-12-14 13:10:12 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2019-12-14 13:10:12 +0000 |
commit | 57b0576f63fffcbc55afc58e3e9d186d2d8c4e72 (patch) | |
tree | 526b31670569a1071223c717a81b2f56e500ea11 /src/testcases/org/apache/poi/ss/formula | |
parent | 4c034f0e202ab6c3a56a2c30716d2c56f9be3311 (diff) | |
download | poi-57b0576f63fffcbc55afc58e3e9d186d2d8c4e72.tar.gz poi-57b0576f63fffcbc55afc58e3e9d186d2d8c4e72.zip |
Adjust some JavaDoc and fix some IDE warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1871505 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss/formula')
-rw-r--r-- | src/testcases/org/apache/poi/ss/formula/eval/TestMinusZeroResult.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/testcases/org/apache/poi/ss/formula/eval/TestMinusZeroResult.java b/src/testcases/org/apache/poi/ss/formula/eval/TestMinusZeroResult.java index 8e7af0312d..8ddead517f 100644 --- a/src/testcases/org/apache/poi/ss/formula/eval/TestMinusZeroResult.java +++ b/src/testcases/org/apache/poi/ss/formula/eval/TestMinusZeroResult.java @@ -68,19 +68,19 @@ public final class TestMinusZeroResult extends TestCase { } public void testTextRendering() { - confirmTextRendering("-0", MINUS_ZERO); + confirmTextRendering(MINUS_ZERO); // sub-normal negative numbers also display as '-0' - confirmTextRendering("-0", Double.longBitsToDouble(0x8000100020003000L)); + confirmTextRendering(Double.longBitsToDouble(0x8000100020003000L)); } /** * Uses {@link ConcatEval} to force number-to-text conversion */ - private static void confirmTextRendering(String expRendering, double d) { + private static void confirmTextRendering(double d) { ValueEval[] args = { StringEval.EMPTY_INSTANCE, new NumberEval(d), }; StringEval se = (StringEval) EvalInstances.Concat.evaluate(args, -1, (short)-1); String result = se.getStringValue(); - assertEquals(expRendering, result); + assertEquals("-0", result); } private static void checkEval(double expectedResult, Function instance, double... dArgs) { @@ -104,12 +104,14 @@ public final class TestMinusZeroResult extends TestCase { * Not really a POI test - just shows similar behaviour of '-0.0' in Java. */ public void testJava() { - assertEquals(0x8000000000000000L, Double.doubleToLongBits(MINUS_ZERO)); // The simple operators consider all zeros to be the same + //noinspection SimplifiableJUnitAssertion,ConstantConditions assertTrue(MINUS_ZERO == MINUS_ZERO); + //noinspection SimplifiableJUnitAssertion,ConstantConditions assertTrue(MINUS_ZERO == +0.0); + //noinspection ConstantConditions assertFalse(MINUS_ZERO < +0.0); // Double.compare() considers them different |