summaryrefslogtreecommitdiffstats
path: root/src/cmd/cover/testdata/pkgcfg/a/a.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/cover/testdata/pkgcfg/a/a.go')
-rw-r--r--src/cmd/cover/testdata/pkgcfg/a/a.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/cmd/cover/testdata/pkgcfg/a/a.go b/src/cmd/cover/testdata/pkgcfg/a/a.go
new file mode 100644
index 0000000..44c380b
--- /dev/null
+++ b/src/cmd/cover/testdata/pkgcfg/a/a.go
@@ -0,0 +1,28 @@
+package a
+
+type Atyp int
+
+func (ap *Atyp) Set(q int) {
+ *ap = Atyp(q)
+}
+
+func (ap Atyp) Get() int {
+ inter := func(q Atyp) int {
+ return int(q)
+ }
+ return inter(ap)
+}
+
+var afunc = func(x int) int {
+ return x + 1
+}
+var Avar = afunc(42)
+
+func A(x int) int {
+ if x == 0 {
+ return 22
+ } else if x == 1 {
+ return 33
+ }
+ return 44
+}