Skip to content

Commit 7038ea8

Browse files
committed
Merge pull request #47 from stleary/add-to-test-suite-and-fix-resource
add JSONPointerTest to test suite, fix resource for gradle build
2 parents 46044bf + 0112d82 commit 7038ea8

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ sourceSets {
1414
java {
1515
srcDir 'src/test'
1616
}
17+
resources {
18+
srcDir 'resources'
19+
}
1720
}
1821
}
1922

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
import static org.junit.Assert.assertSame;
55
import static org.junit.Assert.fail;
66

7-
import org.json.JSONObject;
8-
import org.json.JSONPointer;
9-
import org.json.JSONPointerException;
10-
import org.json.JSONTokener;
7+
import org.json.*;
118
import org.junit.Test;
129

1310
public class JSONPointerTest {
@@ -16,7 +13,7 @@ public class JSONPointerTest {
1613

1714
static {
1815
document = new JSONObject(new JSONTokener(
19-
JSONPointerTest.class.getResourceAsStream("/org/json/junit/jsonpointer-testdoc.json")));
16+
JSONPointerTest.class.getClassLoader().getResourceAsStream("jsonpointer-testdoc.json")));
2017
}
2118

2219
private Object query(String pointer) {

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
JSONStringerTest.class,
1515
JSONObjectTest.class,
1616
JSONArrayTest.class,
17-
EnumTest.class
17+
EnumTest.class,
18+
JSONPointerTest.class
1819
})
1920
public class JunitTestSuite {
20-
}
21+
}
File renamed without changes.

0 commit comments

Comments
 (0)