mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 03:38:35 +00:00
native: std.itoa uses lower-cased letters, fix #2476
This commit is contained in:
parent
711e21709f
commit
3d1a81df1f
2 changed files with 3 additions and 4 deletions
|
@ -238,7 +238,6 @@ func (s *Std) itoa(_ *interop.Context, args []stackitem.Item) stackitem.Item {
|
||||||
if pad := bs[0] & 0xF8; pad == 0 || pad == 0xF8 {
|
if pad := bs[0] & 0xF8; pad == 0 || pad == 0xF8 {
|
||||||
str = str[1:]
|
str = str[1:]
|
||||||
}
|
}
|
||||||
str = strings.ToUpper(str)
|
|
||||||
default:
|
default:
|
||||||
panic(ErrInvalidBase)
|
panic(ErrInvalidBase)
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,9 +35,9 @@ func TestStdLibItoaAtoi(t *testing.T) {
|
||||||
{big.NewInt(1), big.NewInt(16), "1"},
|
{big.NewInt(1), big.NewInt(16), "1"},
|
||||||
{big.NewInt(7), big.NewInt(16), "7"},
|
{big.NewInt(7), big.NewInt(16), "7"},
|
||||||
{big.NewInt(8), big.NewInt(16), "08"},
|
{big.NewInt(8), big.NewInt(16), "08"},
|
||||||
{big.NewInt(65535), big.NewInt(16), "0FFFF"},
|
{big.NewInt(65535), big.NewInt(16), "0ffff"},
|
||||||
{big.NewInt(15), big.NewInt(16), "0F"},
|
{big.NewInt(15), big.NewInt(16), "0f"},
|
||||||
{big.NewInt(-1), big.NewInt(16), "F"},
|
{big.NewInt(-1), big.NewInt(16), "f"},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tc := range testCases {
|
for _, tc := range testCases {
|
||||||
|
|
Loading…
Reference in a new issue