summaryrefslogtreecommitdiffstats
path: root/src/cmd/go/testdata/script/cover_statements.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 13:18:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 13:18:25 +0000
commit109be507377fe7f6e8819ac94041d3fdcdf6fd2f (patch)
tree2806a689f8fab4a2ec9fc949830ef270a91d667d /src/cmd/go/testdata/script/cover_statements.txt
parentInitial commit. (diff)
downloadgolang-1.19-109be507377fe7f6e8819ac94041d3fdcdf6fd2f.tar.xz
golang-1.19-109be507377fe7f6e8819ac94041d3fdcdf6fd2f.zip
Adding upstream version 1.19.8.upstream/1.19.8upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/cmd/go/testdata/script/cover_statements.txt')
-rw-r--r--src/cmd/go/testdata/script/cover_statements.txt61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/cmd/go/testdata/script/cover_statements.txt b/src/cmd/go/testdata/script/cover_statements.txt
new file mode 100644
index 0000000..4f3c9ca
--- /dev/null
+++ b/src/cmd/go/testdata/script/cover_statements.txt
@@ -0,0 +1,61 @@
+[short] skip
+go test -cover ./pkg1 ./pkg2 ./pkg3 ./pkg4
+stdout 'pkg1 \[no test files\]'
+stdout 'pkg2 \S+ coverage: 0.0% of statements \[no tests to run\]'
+stdout 'pkg3 \S+ coverage: 100.0% of statements'
+stdout 'pkg4 \S+ coverage: \[no statements\]'
+
+-- go.mod --
+module m
+
+go 1.16
+-- pkg1/a.go --
+package pkg1
+
+import "fmt"
+
+func F() {
+ fmt.Println("pkg1")
+}
+-- pkg2/a.go --
+package pkg2
+
+import "fmt"
+
+func F() {
+ fmt.Println("pkg2")
+}
+-- pkg2/a_test.go --
+package pkg2
+-- pkg3/a.go --
+package pkg3
+
+import "fmt"
+
+func F() {
+ fmt.Println("pkg3")
+}
+-- pkg3/a_test.go --
+package pkg3
+
+import "testing"
+
+func TestF(t *testing.T) {
+ F()
+}
+-- pkg4/a.go --
+package pkg4
+
+type T struct {
+ X bool
+}
+-- pkg4/a_test.go --
+package pkg4
+
+import (
+ "testing"
+)
+
+func TestT(t *testing.T) {
+ _ = T{}
+}