mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
Merge pull request #39 from johnjaylward/FixNegativeZero
Fix negative zero
This commit is contained in:
commit
8f16e065c5
2 changed files with 8 additions and 1 deletions
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
/bin/
|
||||
build
|
||||
.classpath
|
||||
.project
|
||||
.settings/
|
|
@ -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!",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue