diff options
author | Ian Lance Taylor <iant@golang.org> | 2018-09-24 21:46:21 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-09-24 21:46:21 +0000 |
commit | dd931d9b48647e898dc80927c532ae93cc09e192 (patch) | |
tree | 71be2295cd79b8a182f6130611658db8628772d5 /libgo/go/regexp/syntax/parse_test.go | |
parent | 779d8a5ad09b01428726ea5a0e6c87bd9ac3c0e4 (diff) | |
download | gcc-dd931d9b48647e898dc80927c532ae93cc09e192.tar.gz |
libgo: update to Go 1.11
Reviewed-on: https://go-review.googlesource.com/136435
gotools/:
* Makefile.am (mostlyclean-local): Run chmod on check-go-dir to
make sure it is writable.
(check-go-tools): Likewise.
(check-vet): Copy internal/objabi to check-vet-dir.
* Makefile.in: Rebuild.
From-SVN: r264546
Diffstat (limited to 'libgo/go/regexp/syntax/parse_test.go')
-rw-r--r-- | libgo/go/regexp/syntax/parse_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libgo/go/regexp/syntax/parse_test.go b/libgo/go/regexp/syntax/parse_test.go index dd6529f7c8c..fe3d2517615 100644 --- a/libgo/go/regexp/syntax/parse_test.go +++ b/libgo/go/regexp/syntax/parse_test.go @@ -5,8 +5,8 @@ package syntax import ( - "bytes" "fmt" + "strings" "testing" "unicode" ) @@ -282,7 +282,7 @@ func testParseDump(t *testing.T, tests []parseTest, flags Flags) { // dump prints a string representation of the regexp showing // the structure explicitly. func dump(re *Regexp) string { - var b bytes.Buffer + var b strings.Builder dumpRegexp(&b, re) return b.String() } @@ -312,7 +312,7 @@ var opNames = []string{ // dumpRegexp writes an encoding of the syntax tree for the regexp re to b. // It is used during testing to distinguish between parses that might print // the same using re's String method. -func dumpRegexp(b *bytes.Buffer, re *Regexp) { +func dumpRegexp(b *strings.Builder, re *Regexp) { if int(re.Op) >= len(opNames) || opNames[re.Op] == "" { fmt.Fprintf(b, "op%d", re.Op) } else { |