aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/cover/cover_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/cover/cover_test.go')
-rw-r--r--src/cmd/cover/cover_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/cover/cover_test.go b/src/cmd/cover/cover_test.go
index 50a7ce829f..81ac8ae467 100644
--- a/src/cmd/cover/cover_test.go
+++ b/src/cmd/cover/cover_test.go
@@ -90,6 +90,11 @@ func TestCover(t *testing.T) {
if got, err := regexp.MatchString(".*\n//go:nosplit\nfunc someFunction().*", string(file)); err != nil || !got {
t.Errorf("misplaced compiler directive: got=(%v, %v); want=(true; nil)", got, err)
}
+ // "go:linkname" compiler directive should be present.
+ if got, err := regexp.MatchString(`.*go\:linkname some\_name some\_name.*`, string(file)); err != nil || !got {
+ t.Errorf("'go:linkname' compiler directive not found: got=(%v, %v); want=(true; nil)", got, err)
+ }
+
// No other comments should be present in generated code.
c := ".*// This comment shouldn't appear in generated go code.*"
if got, err := regexp.MatchString(c, string(file)); err != nil || got {