Skip to content

Commit e0a28f4

Browse files
committed
strconv: add test cases with characters less than '0'
1 parent 9f834a5 commit e0a28f4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/strconv/atoi_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ var parseInt64Tests = []parseInt64Test{
164164
{"_12345", 0, ErrSyntax},
165165
{"1__2345", 0, ErrSyntax},
166166
{"12345_", 0, ErrSyntax},
167+
{"123%45", 0, ErrSyntax},
167168
}
168169

169170
type parseInt64BaseTest struct {
@@ -302,6 +303,7 @@ var parseInt32Tests = []parseInt32Test{
302303
{"_12345", 0, ErrSyntax},
303304
{"1__2345", 0, ErrSyntax},
304305
{"12345_", 0, ErrSyntax},
306+
{"123%45", 0, ErrSyntax},
305307
}
306308

307309
type numErrorTest struct {

0 commit comments

Comments
 (0)