diff options
author | Elliott Hughes <enh@google.com> | 2015-01-29 11:15:46 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-01-29 12:21:25 -0800 |
commit | c75cd0a51c12a49893977532f6fac03f2beca21b (patch) | |
tree | 570c411a3657cc93474cb9447f8d1cec5f6f1c9f /json | |
parent | 2e7026cf945f2fd4b88646391730017744956e0d (diff) | |
download | libcore-c75cd0a51c12a49893977532f6fac03f2beca21b.zip libcore-c75cd0a51c12a49893977532f6fac03f2beca21b.tar.gz libcore-c75cd0a51c12a49893977532f6fac03f2beca21b.tar.bz2 |
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
Diffstat (limited to 'json')
-rw-r--r-- | json/src/test/java/org/json/JSONTokenerTest.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/json/src/test/java/org/json/JSONTokenerTest.java b/json/src/test/java/org/json/JSONTokenerTest.java index de3a59a..1152e46 100644 --- a/json/src/test/java/org/json/JSONTokenerTest.java +++ b/json/src/test/java/org/json/JSONTokenerTest.java @@ -402,7 +402,6 @@ public class JSONTokenerTest extends TestCase { try { new JSONTokener("abc\\u002\"").nextString('"'); fail(); - } catch (NumberFormatException e) { } catch (JSONException e) { } try { @@ -413,13 +412,13 @@ public class JSONTokenerTest extends TestCase { try { new JSONTokener("abc\\u \"").nextString('"'); fail(); - } catch (NumberFormatException e) { + } catch (JSONException e) { } assertEquals("abc\"def", new JSONTokener("abc\\u0022def\"ghi").nextString('"')); try { new JSONTokener("abc\\u000G\"").nextString('"'); fail(); - } catch (NumberFormatException e) { + } catch (JSONException e) { } } |