Skip to content

Commit fbe3efa

Browse files
committed
tests: add tests
1 parent d442b7c commit fbe3efa

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1+
.PHONY: clean test build
2+
3+
default: test build
4+
5+
clean:
6+
rm -rf dist/ cover.out
7+
8+
test: clean
9+
go test -v -cover ./...
10+
111
build:
2-
@GO111MODULE=on go build -ldflags '-s -w' -o contextcheck ./cmd/contextcheck/main.go
12+
go build -ldflags '-s -w' -o contextcheck ./cmd/contextcheck/main.go
313

414
install:
5-
@GO111MODULE=on go install -ldflags '-s -w' ./cmd/contextcheck
15+
go install -ldflags '-s -w' ./cmd/contextcheck

testdata/src/a/a.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,11 @@ func f13[T int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 |
155155

156156
return b
157157
}
158+
159+
/* ----------------- issue 21 ----------------- */
160+
161+
func f16(ctx context.Context, k string) func() {
162+
return func() {
163+
f16(context.Background(), k)
164+
}
165+
}

0 commit comments

Comments
 (0)