mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 11:25:30 -04:00
Small test fixes.
One test method was missing `@Test` so it was never run. One test method used another test class as the base for finding a test resource. While this works in practice with Maven, it is not strictly right.
This commit is contained in:
parent
01727fd0ed
commit
3e688afc66
@ -1369,7 +1369,7 @@ public class JSONArrayTest {
|
|||||||
@Test(expected = JSONException.class)
|
@Test(expected = JSONException.class)
|
||||||
public void issue654StackOverflowInputWellFormed() {
|
public void issue654StackOverflowInputWellFormed() {
|
||||||
//String input = new String(java.util.Base64.getDecoder().decode(base64Bytes));
|
//String input = new String(java.util.Base64.getDecoder().decode(base64Bytes));
|
||||||
final InputStream resourceAsStream = JSONObjectTest.class.getClassLoader().getResourceAsStream("Issue654WellFormedArray.json");
|
final InputStream resourceAsStream = JSONArrayTest.class.getClassLoader().getResourceAsStream("Issue654WellFormedArray.json");
|
||||||
JSONTokener tokener = new JSONTokener(resourceAsStream);
|
JSONTokener tokener = new JSONTokener(resourceAsStream);
|
||||||
JSONArray json_input = new JSONArray(tokener);
|
JSONArray json_input = new JSONArray(tokener);
|
||||||
assertNotNull(json_input);
|
assertNotNull(json_input);
|
||||||
|
@ -3288,6 +3288,7 @@ public class JSONObjectTest {
|
|||||||
* Sample test case from https://github.com/stleary/JSON-java/issues/531
|
* Sample test case from https://github.com/stleary/JSON-java/issues/531
|
||||||
* which verifies that no regression in double/BigDecimal support is present.
|
* which verifies that no regression in double/BigDecimal support is present.
|
||||||
*/
|
*/
|
||||||
|
@Test
|
||||||
public void testObjectToBigDecimal() {
|
public void testObjectToBigDecimal() {
|
||||||
double value = 1412078745.01074;
|
double value = 1412078745.01074;
|
||||||
Reader reader = new StringReader("[{\"value\": " + value + "}]");
|
Reader reader = new StringReader("[{\"value\": " + value + "}]");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user