Skip to content

Commit

Permalink
Move #267 test under non-failing
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Apr 5, 2021
1 parent 9e11fe6 commit 7f50e52
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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());
}
}

0 comments on commit 7f50e52

Please sign in to comment.