]> Cypherpunks repositories - gostls13.git/commitdiff
strconv: add Atoi test cases with characters less than '0'
authorAnuraag Agrawal <anuraaga@gmail.com>
Mon, 20 Feb 2023 00:38:44 +0000 (00:38 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 21 Feb 2023 05:09:21 +0000 (05:09 +0000)
Change-Id: I35c0fe4e7e11b694ef07687d5e0532a2ab9ba213
GitHub-Last-Rev: e0a28f42367c2685d80bcc5c45294c0d2eae77fe
GitHub-Pull-Request: golang/go#58575
Reviewed-on: https://go-review.googlesource.com/c/go/+/469035
Auto-Submit: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
src/strconv/atoi_test.go

index 867fa66a14ca8bbe8e13fe4a364129ef1150c1db..d7f8f25a295b37d598c198b4cdba4c8db38ed7f7 100644 (file)
@@ -164,6 +164,7 @@ var parseInt64Tests = []parseInt64Test{
        {"_12345", 0, ErrSyntax},
        {"1__2345", 0, ErrSyntax},
        {"12345_", 0, ErrSyntax},
+       {"123%45", 0, ErrSyntax},
 }
 
 type parseInt64BaseTest struct {
@@ -302,6 +303,7 @@ var parseInt32Tests = []parseInt32Test{
        {"_12345", 0, ErrSyntax},
        {"1__2345", 0, ErrSyntax},
        {"12345_", 0, ErrSyntax},
+       {"123%45", 0, ErrSyntax},
 }
 
 type numErrorTest struct {