From 7f50e523ef61053628b119bfb9d2db95b4204c12 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Sun, 4 Apr 2021 17:58:12 -0700 Subject: [PATCH] Move #267 test under non-failing --- .../{failing => fuzz}/Fuzz32579BigDecimalTest.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) rename cbor/src/test/java/com/fasterxml/jackson/dataformat/cbor/{failing => fuzz}/Fuzz32579BigDecimalTest.java (80%) diff --git a/cbor/src/test/java/com/fasterxml/jackson/dataformat/cbor/failing/Fuzz32579BigDecimalTest.java b/cbor/src/test/java/com/fasterxml/jackson/dataformat/cbor/fuzz/Fuzz32579BigDecimalTest.java similarity index 80% rename from cbor/src/test/java/com/fasterxml/jackson/dataformat/cbor/failing/Fuzz32579BigDecimalTest.java rename to cbor/src/test/java/com/fasterxml/jackson/dataformat/cbor/fuzz/Fuzz32579BigDecimalTest.java index d935cf980..5a6fb991f 100644 --- a/cbor/src/test/java/com/fasterxml/jackson/dataformat/cbor/failing/Fuzz32579BigDecimalTest.java +++ b/cbor/src/test/java/com/fasterxml/jackson/dataformat/cbor/fuzz/Fuzz32579BigDecimalTest.java @@ -1,6 +1,6 @@ -package com.fasterxml.jackson.dataformat.cbor.failing; +package com.fasterxml.jackson.dataformat.cbor.fuzz; -import java.math.BigInteger; +import java.math.BigDecimal; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; @@ -42,7 +42,10 @@ public void testBigDecimalOverflow() throws Exception JsonNode root = MAPPER.readTree(input); assertTrue(root.isNumber()); - assertTrue(root.isBigInteger()); - assertEquals(BigInteger.ZERO, root.bigIntegerValue()); + assertTrue(root.isBigDecimal()); + + // No point checking the actual value... could have a look at scale? + BigDecimal dec = root.decimalValue(); + assertEquals(Integer.MIN_VALUE + 1, dec.scale()); } }