Skip to content

Commit d1fd901

Browse files
Sean LearySean Leary
authored andcommitted
fixes the JSONObjectNumberTest cases
1 parent 6529a7e commit d1fd901

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/test/java/org/json/junit/JSONObjectNumberTest.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@ public class JSONObjectNumberTest {
2323
@Parameters(name = "{index}: {0}")
2424
public static Collection<Object[]> data() {
2525
return Arrays.asList(new Object[][]{
26-
{"{value:50}", 1},
27-
{"{value:50.0}", 1},
28-
{"{value:5e1}", 1},
29-
{"{value:5E1}", 1},
30-
{"{value:5e1}", 1},
31-
{"{value:'50'}", 1},
32-
{"{value:-50}", -1},
33-
{"{value:-50.0}", -1},
34-
{"{value:-5e1}", -1},
35-
{"{value:-5E1}", -1},
36-
{"{value:-5e1}", -1},
37-
{"{value:'-50'}", -1}
26+
{"{\"value\":50}", 1},
27+
{"{\"value\":50.0}", 1},
28+
{"{\"value\":5e1}", 1},
29+
{"{\"value\":5E1}", 1},
30+
{"{\"value\":5e1}", 1},
31+
{"{\"value\":\"50\"}", 1},
32+
{"{\"value\":-50}", -1},
33+
{"{\"value\":-50.0}", -1},
34+
{"{\"value\":-5e1}", -1},
35+
{"{\"value\":-5E1}", -1},
36+
{"{\"value\":-5e1}", -1},
37+
{"{\"value\":\"-50\"}", -1}
3838
// JSON does not support octal or hex numbers;
3939
// see https://stackoverflow.com/a/52671839/6323312
40-
// "{value:062}", // octal 50
41-
// "{value:0x32}" // hex 50
40+
// "{\"value\":062}", // octal 50
41+
// "{\"value\":0x32}" // hex 50
4242
});
4343
}
4444

0 commit comments

Comments
 (0)