package com.fasterxml.jackson.failing;

import com.fasterxml.jackson.databind.*;

/**
 * Basic tests for {@link JsonNode} implementations that
 * contain numeric values.
 */
public class NumberNodes1770Test extends BaseMapTest
{
    private final ObjectMapper MAPPER = newJsonMapper();

    // Related to [databind#1770]
    public void testBigDecimalCoercion() throws Exception
    {
        final JsonNode jsonNode = MAPPER.reader()
            .with(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS)
            .readTree("7976931348623157e309");
        assertTrue(jsonNode.isBigDecimal());
        // the following fails with NumberFormatException, because jsonNode is a DoubleNode with a value of POSITIVE_INFINITY
//        Assert.assertTrue(jsonNode.decimalValue().compareTo(new BigDecimal("7976931348623157e309")) == 0);
    }
}

@@ -291,15 +291,11 @@
  // 
-Related
+For
  to 
@@ -309,16 +309,301 @@
 nd#1770%5D
+ (broken due to fix for #1028): %60JsonNodeDeserializer%60%0A    // would coerce ok but does %60parser.isNaN()%60 check which ends up parsing%0A    // as Double, gets %60POSITIVE_INFINITY%60 and returns %60true%60: this results in%0A    // %60DoubleNode%60 being used even tho %60BigDecimal%60 could fit the number.
 %0A    pub

add a comment to test to give context