aboutsummaryrefslogtreecommitdiff
path: root/src/strconv
diff options
context:
space:
mode:
authorAnuraag Agrawal <anuraaga@gmail.com>2023-02-20 00:38:44 +0000
committerGopher Robot <gobot@golang.org>2023-02-21 05:09:21 +0000
commit7f59bea53c888605faaa46cd95aaa3ddf29219bf (patch)
treeda6139b1ddc5d7f5512a877cabfc71d4200bcaf9 /src/strconv
parent99bc53f5e819c2d2d49f2a56c488898085be3982 (diff)
downloadgo-7f59bea53c888605faaa46cd95aaa3ddf29219bf.tar.gz
go-7f59bea53c888605faaa46cd95aaa3ddf29219bf.zip
strconv: add Atoi test cases with characters less than '0'
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>
Diffstat (limited to 'src/strconv')
-rw-r--r--src/strconv/atoi_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/strconv/atoi_test.go b/src/strconv/atoi_test.go
index 867fa66a14..d7f8f25a29 100644
--- a/src/strconv/atoi_test.go
+++ b/src/strconv/atoi_test.go
@@ -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 {