Skip to content

Commit

Permalink
fixes the JSONObjectNumberTest cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Leary authored and Sean Leary committed Apr 28, 2024
1 parent 6529a7e commit d1fd901
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/test/java/org/json/junit/JSONObjectNumberTest.java
Expand Up @@ -23,22 +23,22 @@ public class JSONObjectNumberTest {
@Parameters(name = "{index}: {0}")
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][]{
{"{value:50}", 1},
{"{value:50.0}", 1},
{"{value:5e1}", 1},
{"{value:5E1}", 1},
{"{value:5e1}", 1},
{"{value:'50'}", 1},
{"{value:-50}", -1},
{"{value:-50.0}", -1},
{"{value:-5e1}", -1},
{"{value:-5E1}", -1},
{"{value:-5e1}", -1},
{"{value:'-50'}", -1}
{"{\"value\":50}", 1},
{"{\"value\":50.0}", 1},
{"{\"value\":5e1}", 1},
{"{\"value\":5E1}", 1},
{"{\"value\":5e1}", 1},
{"{\"value\":\"50\"}", 1},
{"{\"value\":-50}", -1},
{"{\"value\":-50.0}", -1},
{"{\"value\":-5e1}", -1},
{"{\"value\":-5E1}", -1},
{"{\"value\":-5e1}", -1},
{"{\"value\":\"-50\"}", -1}
// JSON does not support octal or hex numbers;
// see https://stackoverflow.com/a/52671839/6323312
// "{value:062}", // octal 50
// "{value:0x32}" // hex 50
// "{\"value\":062}", // octal 50
// "{\"value\":0x32}" // hex 50
});
}

Expand Down

0 comments on commit d1fd901

Please sign in to comment.