diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9e7b59c --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/bin/ +build +.classpath +.project +.settings/ diff --git a/src/test/org/json/junit/JSONObjectTest.java b/src/test/org/json/junit/JSONObjectTest.java index 994c4b3..869fe46 100644 --- a/src/test/org/json/junit/JSONObjectTest.java +++ b/src/test/org/json/junit/JSONObjectTest.java @@ -519,7 +519,9 @@ public class JSONObjectTest { */ @Test public void stringToValueNumbersTest() { - + assertTrue("-0 Should be a Double!",JSONObject.stringToValue("-0") instanceof Double); + assertTrue("-0.0 Should be a Double!",JSONObject.stringToValue("-0.0") instanceof Double); + assertTrue("'-' Should be a String!",JSONObject.stringToValue("-") instanceof String); assertTrue( "0.2 should be a Double!", JSONObject.stringToValue( "0.2" ) instanceof Double ); assertTrue( "Doubles should be Doubles, even when incorrectly converting floats!",