mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-07 03:06:03 +08:00
tests for improved failure handling
This commit is contained in:
@@ -94,4 +94,14 @@ public class JSONPointerTest {
|
|||||||
new JSONPointer("key");
|
new JSONPointer("key");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test(expected = JSONPointerException.class)
|
||||||
|
public void arrayIndexFailure() {
|
||||||
|
query("/foo/2");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test(expected = JSONPointerException.class)
|
||||||
|
public void primitiveFailure() {
|
||||||
|
query("/obj/key/failure");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -12,5 +12,8 @@
|
|||||||
"i\\j": 5,
|
"i\\j": 5,
|
||||||
"k\"l": 6,
|
"k\"l": 6,
|
||||||
" ": 7,
|
" ": 7,
|
||||||
"m~n": 8
|
"m~n": 8,
|
||||||
|
"obj" : {
|
||||||
|
"key" : "value"
|
||||||
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user