• Home
  • History
  • Annotate
  • only in /libcore/json/src/test/java/org/json/
History log of /libcore/json/src/test/java/org/json/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f0d4a04f3c7ac8dcb4a455084ca69721fbe9845e 22-Apr-2016 Tobias Thierer <tobiast@google.com> Make broken JSONOBject.NULL.equals(null) consistent with Objects.hashCode(null)

Bug: 28189207
Change-Id: I76b8cc270dbf1b63f43c0dcd6970a703ad040da4
SONObjectTest.java
bf07204bff37fa34dbdb32e0a9d790d97ef46a81 12-Nov-2015 Narayan Kamath <narayan@google.com> Merge lmp changes into mnc.

Change-Id: I8f49c58f39dc5f4268c6b5718cab18ed26ac930a
0decb3b3616f4a5507a136a20676bdaf9f351a83 04-Aug-2015 Narayan Kamath <narayan@google.com> Remove bogus test case from JSONObjectTest.

There's no guarantee that Selector.open() returns something that's
in the java namespace. It depends on the provider.

Change-Id: I4e4b020ad9ccde4071300f3222c9db87bc27ee73
SONObjectTest.java
c75cd0a51c12a49893977532f6fac03f2beca21b 29-Jan-2015 Elliott Hughes <enh@google.com> Fix org.json.JSONTokenerTest#testNextStringUnicodeEscaped.

Throwing NumberFormatException for bad Unicode escapes was a bug.
The test I added when I fixed that was in a different file, and
apparently I didn't re-run these tests.

Bug: https://code.google.com/p/android/issues/detail?id=103641
Change-Id: I271063ef12eab1369e4ce4cbbb7dd00e15c9ce79
SONTokenerTest.java
8e2f8aff8b2c9493ebffb8ad3825e58d02253471 22-Jan-2015 Elliott Hughes <enh@google.com> Throw JSONException rather than NumberFormatException for an invalid escape.

Only our documentation claims that any of the JSON code throws
NumberFormatException, and throwing JSONException seems much more in keeping
with the rest of the API (and makes it easier for callers to handle errors).

Bug: https://code.google.com/p/android/issues/detail?id=103641
Change-Id: I4f4ebfd983f4ccb2a1f266a0bfa5732174df26f6
SONObjectTest.java
2ea1d56a1f70aeb0441209cda10756a301474bf4 10-Jan-2014 Narayan Kamath <narayan@google.com> Implement JSONObject#append.

It provides better semantics that accumulate. In particular,
the type of the mapping does not depend on the number of calls
to the function.

Change-Id: Ib8f9d229d8de72d57b25ff9d69c69a61215c2fd7
SONObjectTest.java
319bef83054979209a01b484af34ce1087d28559 10-Jan-2014 Narayan Kamath <narayan@google.com> Fix JSONObject#test_toString_listAsMapValues

Changed the map type in JSONObject to a LinkedHashMap so that
its iteration order is well defined.

bug: 12476022
Change-Id: I8f2e40fd6bca5f776396aba4c9fde6e9d58f662e
SONObjectTest.java
d62e296abe060ff7557e731fe70f240dbaa142e8 28-Nov-2013 Narayan Kamath <narayan@google.com> Fix JSONArrayTest.

Whitespace issues.

Change-Id: I12bf6134c9bdd060ab5362f97d2315471ecd7251
SONArrayTest.java
c06da90b0b7d26e68805d4944fbc5446d48fe360 25-Nov-2013 Elliott Hughes <enh@google.com> Add a test for JSONArray and enums.

Bug: https://code.google.com/p/android/issues/detail?id=62539
Change-Id: If41b9afe801832ea796649d27b0af25657653684
SONArrayTest.java
3ad786880c88955a0e92610d24bb9bbe51b0e14c 10-Jul-2013 Elliott Hughes <enh@google.com> Implement JSONObject.wrap, and use it.

Bug: https://code.google.com/p/android/issues/detail?id=55114
Change-Id: Ic2e010ac616f24dda7b8abced7eb2fc84dc7d50e
SONObjectTest.java
arsingTest.java
609601075ec0934cb23783c0b1194ecde041b6f5 10-Jul-2013 Elliott Hughes <enh@google.com> Implement JSONArray.remove.

Bug: https://code.google.com/p/android/issues/detail?id=53461
Change-Id: I2b920fa8d63bcc8f1260669d72e33833bbd81ced
SONArrayTest.java
037fb18dd4ba3f54c5b2fb5386c5673e1db5babf 20-Jul-2011 Jesse Wilson <jessewilson@google.com> Skip byte order mark (BOM) in org.json

Bug: http://code.google.com/p/android/issues/detail?id=18508
Change-Id: Ib992a0a4b22e340446abab14e4f32df5efcd0b49
SONTokenerTest.java
661054f5a2f7f8f5f3ceffb97e803211b546e7fc 08-Jul-2011 Jesse Wilson <jessewilson@google.com> Fix string to boolean coercsion.

When we reimplemented this API I broke consistency with
org.json. Bringing it back into line makes the implementation
more strict (my preference) and makes us consistent with
ourselves before this code was redone.

Bug: http://code.google.com/p/android/issues/detail?id=16411
Change-Id: I8c1b52e382ad91932d3cf9a5b346db58df4da7c6
SONArrayTest.java
SONObjectTest.java
7365de1056414750d0a7d1fdd26025fd247f0d04 12-Aug-2010 Jesse Wilson <jessewilson@google.com> Sorting imports.

Change-Id: I8347bc625480a1c37a1ed9976193ddfedeb00bbc
SONArrayTest.java
SONObjectTest.java
SONTokenerTest.java
arsingTest.java
14816f17144d90174628ee82dc616d4b9c921149 04-Jun-2010 Jesse Wilson <jessewilson@google.com> Scrubbing broken tests and removing unnecessary organization AllTests.java files.

I've deleted as many tests as possible that duplicated coverage in Harmony.
We're now running their tests directly against our codebase and having two
copies of every test is quite painful; particularly when the tests need
maintenance.

The AllTests files aren't necessary, our test harness can automatically find
tests and run them without external organization. This strategy is also more
reliable, since often the AllTests files are out of sync.

Change-Id: I3ee052f8839e9b146ba47f945812f5937d878110
llTests.java
f33eae7e84eb6d3b0f4e86b59605bb3de73009f3 13-May-2010 Elliott Hughes <enh@google.com> Remove all trailing whitespace from the dalvik team-maintained parts of libcore.

Gentlemen, you may now set your editors to "strip trailing whitespace"...

Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
SONArrayTest.java
SONObjectTest.java
SONStringerTest.java
SONTokenerTest.java
arsingTest.java
19554ec99d57e820a4c9da3bcde93d77b537d515 06-Apr-2010 Jesse Wilson <jessewilson@google.com> Adding support for hash '#' comments to our JSON parser.

Neither the JSON RFC nor the documentation of Crockford's
implementation mention these comments, but somehow the
old parser used to support these. And so we shall also.

See bug 2571423.

Change-Id: I77d64c5ec53278d8df5fe1873404f1241320504b
SONTokenerTest.java
arsingTest.java
adfb1bcaae256f9bd591b90a5b05d30e777e27c6 25-Mar-2010 Jesse Wilson <jessewilson@google.com> Test and document our handling of nulls with getString().

Our behaviour is consistent with Crockford's.

The test confirms that the behaviour is consistent with the report
of that bug, which the submitter claims is not how it should behave.
http://code.google.com/p/android/issues/detail?id=7257

Change-Id: Ibace4bd995e3cbc8fb6c9dc509f8f4491865a647
SONArrayTest.java
1483c41ab440a713e2b935801792da9039ec5d61 17-Mar-2010 Jesse Wilson <jessewilson@google.com> Javadocs for JSONObject.

Change-Id: I5ec9df6a3a9baac8f4f498890cd35feff774737a
SONObjectTest.java
51a095f0bc7aadfcc7e6b3873b97c050c523d102 12-Mar-2010 Jesse Wilson <jessewilson@google.com> A cleanroom implementation of the org.json API.

This implementation lacks documentation. I intend to write that after checking
it into the master branch. By not waiting we'll have more time to exercise the
code, if only in Google's own applications.

This passes all of my tests. I rewrote some of the tests to make Crockford's
implementation fail. The tests that fail on Crockford's implementation are:

JSONArrayTest
testEqualsAndHashCode equals() not consistent with hashCode()
testTokenerConstructorParseFail StackOverflowError
testStringConstructorParseFail StackOverflowError

JSONObjectTest
testOtherNumbers Object.put() accepted a NaN (via a custom Number class)
testMapConstructorWithBogusEntries JSONObject constructor doesn't validate its input!

JSONTokenerTest
testNextNWithAllRemaining off-by-one error?
testNext0 Returning an empty string should be valid
testNextCleanCommentsTrailingSingleSlash nextClean doesn't consume a trailing slash
assertNotClean The character line tabulation is not whitespace according to the JSON spec.
testNextToDoesntStopOnNull nextTo() shouldn't stop after \0 characters
testNextToConsumesNull nextTo shouldn't consume \0.
testSkipToStopsOnNull skipTo shouldn't stop when it sees '\0'

ParsingTest
testParsingLargeHexValues For input "0x80000000" Hex values are parsed as Strings if their signed value is greater than Integer.MAX_VALUE.
testSyntaxProblemUnterminatedArray Stack overflowed on input "["

Change-Id: I44c4a4a698a66bf043ed339d6bd804951e732cbf
llTests.java
SONArrayTest.java
SONObjectTest.java
SONStringerTest.java
SONTokenerTest.java
arsingTest.java
elfUseTest.java
53c13031e4b68645b0ca7c7a335aae41d0b84276 10-Mar-2010 Jesse Wilson <jessewilson@google.com> New tests for JSONObject and for JSON's self-use.

Alongside development of these tests, I'm working on a new
cleanroom implementation. The self use test was written to
prevent me from self-using in a way that the original
implementation does not.

Change-Id: Ie617aca1978bd39d85b05e5c2c7bd657ed159dd6
llTests.java
SONArrayTest.java
SONObjectTest.java
SONStringerTest.java
elfUseTest.java
73c8bbb045404420ffe4440bb1c7c5578ca160a7 17-Feb-2010 Jesse Wilson <jessewilson@google.com> Fixing packages for JSON tests
SONArrayTest.java
SONStringerTest.java
SONTokenerTest.java
67f4459a2fcc50cb3378c302b6c663af48f60ff0 16-Feb-2010 Jesse Wilson <jessewilson@google.com> First round of tests for the subset of the org.json in Android.
llTests.java
SONArrayTest.java
SONStringerTest.java
SONTokenerTest.java