Skip to content

Commit 7f59bea

Browse files
anuraagagopherbot
authored andcommitted
strconv: add Atoi test cases with characters less than '0'
Change-Id: I35c0fe4e7e11b694ef07687d5e0532a2ab9ba213 GitHub-Last-Rev: e0a28f4 GitHub-Pull-Request: #58575 Reviewed-on: https://go-review.googlesource.com/c/go/+/469035 Auto-Submit: Robert Griesemer <[email protected]> Run-TryBot: Robert Griesemer <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
1 parent 99bc53f commit 7f59bea

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)