mirror of https://github.com/golang/go.git
cmd/internal/obj/x86: use raw string literals in regexp
Found with megacheck (S1007). Change-Id: Icb15fd5bfefa8e0b39a1bfa9ec3e9af3eff6b390 Reviewed-on: https://go-review.googlesource.com/105415 Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
3e31eb6b84
commit
d8b417e00b
|
|
@ -74,7 +74,7 @@ func parseTestData(t *testing.T) *ParsedTestData {
|
|||
return r
|
||||
}
|
||||
|
||||
var spaces_re *regexp.Regexp = regexp.MustCompile("\\s+")
|
||||
var spaces_re *regexp.Regexp = regexp.MustCompile(`\s+`)
|
||||
|
||||
func normalize(s string) string {
|
||||
return spaces_re.ReplaceAllLiteralString(strings.TrimSpace(s), " ")
|
||||
|
|
@ -115,7 +115,7 @@ func asmOutput(t *testing.T, s string) []byte {
|
|||
|
||||
func parseOutput(t *testing.T, td *ParsedTestData, asmout []byte) {
|
||||
scanner := bufio.NewScanner(bytes.NewReader(asmout))
|
||||
marker := regexp.MustCompile("MOVQ \\$([0-9]+), AX")
|
||||
marker := regexp.MustCompile(`MOVQ \$([0-9]+), AX`)
|
||||
mark := -1
|
||||
td.marker_to_output = make(map[int][]string)
|
||||
for scanner.Scan() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue