Skip to content

Commit 49d47e3

Browse files
author
John J. Aylward
committed
Adjustments to tests for stleary/JSON-java#337
1 parent c945b53 commit 49d47e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/org/json/junit/JSONObjectTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,8 @@ public void bigNumberOperations() {
10011001
assertTrue("expected an exeption", false);
10021002
} catch (JSONException ignored) {}
10031003
obj = jsonObject.optBigInteger("bigDec", BigInteger.ONE);
1004-
assertTrue("expected BigInteger", obj.equals(BigInteger.ONE));
1004+
assertTrue("expected BigInteger", obj instanceof BigInteger);
1005+
assertEquals(bigDecimal.toBigInteger(), obj);
10051006

10061007
/**
10071008
* JSONObject.numberToString() works correctly, nothing to change.

0 commit comments

Comments
 (0)