mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-02 11:05:28 -04:00
fixes the JSONObjectNumberTest cases
This commit is contained in:
parent
6529a7e536
commit
d1fd901bdb
@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user