#653 - optLong vs getLong inconsistencies

For exponential decimal conversion, number is not touched.
Leading zeros removed from numeric number strings before converting to number.
This commit is contained in:
rudrajyoti biswas
2023-10-06 21:34:00 +05:30
parent 79af389f7a
commit 1a38879c90
3 changed files with 73 additions and 4 deletions

View File

@@ -23,7 +23,10 @@ public class JSONObjectNumberTest {
@Parameters(name = "{index}: {0}")
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][]{
{"{value:50}", 1},
{"{value:0050}", 1},
{"{value:0050.0000}", 1},
{"{value:-0050}", -1},
{"{value:-0050.0000}", -1},
{"{value:50.0}", 1},
{"{value:5e1}", 1},
{"{value:5E1}", 1},
@@ -32,6 +35,7 @@ public class JSONObjectNumberTest {
{"{value:-50}", -1},
{"{value:-50.0}", -1},
{"{value:-5e1}", -1},
{"{value:-0005e1}", -1},
{"{value:-5E1}", -1},
{"{value:-5e1}", -1},
{"{value:'-50'}", -1}