add JSONPointerTest to test suite, fix resource for gradle build
This commit is contained in:
@@ -4,10 +4,7 @@ import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertSame;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import org.json.JSONObject;
|
||||
import org.json.JSONPointer;
|
||||
import org.json.JSONPointerException;
|
||||
import org.json.JSONTokener;
|
||||
import org.json.*;
|
||||
import org.junit.Test;
|
||||
|
||||
public class JSONPointerTest {
|
||||
@@ -16,7 +13,7 @@ public class JSONPointerTest {
|
||||
|
||||
static {
|
||||
document = new JSONObject(new JSONTokener(
|
||||
JSONPointerTest.class.getResourceAsStream("/org/json/junit/jsonpointer-testdoc.json")));
|
||||
JSONPointerTest.class.getClassLoader().getResourceAsStream("jsonpointer-testdoc.json")));
|
||||
}
|
||||
|
||||
private Object query(String pointer) {
|
||||
|
||||
@@ -14,7 +14,8 @@ import org.junit.runners.Suite;
|
||||
JSONStringerTest.class,
|
||||
JSONObjectTest.class,
|
||||
JSONArrayTest.class,
|
||||
EnumTest.class
|
||||
EnumTest.class,
|
||||
JSONPointerTest.class
|
||||
})
|
||||
public class JunitTestSuite {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"foo":
|
||||
[
|
||||
"bar",
|
||||
"baz"
|
||||
],
|
||||
"": 0,
|
||||
"a/b": 1,
|
||||
"c%d": 2,
|
||||
"e^f": 3,
|
||||
"g|h": 4,
|
||||
"i\\j": 5,
|
||||
"k\"l": 6,
|
||||
" ": 7,
|
||||
"m~n": 8,
|
||||
"obj" : {
|
||||
"key" : "value",
|
||||
"other~key" : {
|
||||
"another/key" : [
|
||||
"val"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user