Update Compare method@JValue.cs (#1310)
For JTokenType.Float, we should add the comparison for decimal type.
This commit is contained in:
committed by
James Newton-King
parent
f523b2d3bc
commit
b62c0286c4
@@ -341,6 +341,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.IsTrue(JToken.DeepEquals(new JValue(5L), new JValue(5)));
|
||||
Assert.IsFalse(JToken.DeepEquals(new JValue(5M), new JValue(5)));
|
||||
Assert.IsTrue(JToken.DeepEquals(new JValue((ulong)long.MaxValue), new JValue(long.MaxValue)));
|
||||
Assert.IsFalse(JToken.DeepEquals(new JValue(0.102410241024102424m), new JValue(0.102410241024102425m)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -852,4 +853,4 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user