fix: parse signed hex and octal integers (#2749)

This commit is contained in:
Joeseph Grey
2026-08-03 11:36:24 +10:00
committed by GitHub
parent 0beddf45fa
commit b7a06d6e1f
3 changed files with 56 additions and 5 deletions
+10
View File
@@ -143,6 +143,16 @@ var parseInt64Scenarios = []parseInt64Scenario{
numberString: "0o10",
expectedParsedNumber: 8,
},
{
numberString: "+0x12",
expectedParsedNumber: 18,
expectedFormatString: "0x12",
},
{
numberString: "+0o22",
expectedParsedNumber: 18,
expectedFormatString: "0o22",
},
}
func TestParseInt64(t *testing.T) {