Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit a3ad54e

Browse files
author
Sauyon Lee
committed
Add tests for ginkgo test files
1 parent 385603a commit a3ad54e

7 files changed

Lines changed: 80 additions & 0 deletions

File tree

ql/test/query-tests/filters/ClassifyFiles/ClassifyFiles.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
| ginkgo.go:0:0:0:0 | ginkgo.go | test |
12
| hello2.go:0:0:0:0 | hello2.go | generated |
23
| hello.go:0:0:0:0 | hello.go | generated |
34
| httptest.go:0:0:0:0 | httptest.go | test |

ql/test/query-tests/filters/ClassifyFiles/TestCase.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
| ginkgo.go:13:1:16:1 | function declaration |
12
| test1.go:5:1:5:26 | function declaration |
23
| test1.go:7:1:7:27 | function declaration |
34
| test1.go:15:1:15:31 | function declaration |
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package main
2+
3+
//go:generate depstubber -vendor github.com/onsi/ginkgo "" Fail,RunSpecs
4+
//go:generate depstubber -vendor github.com/onsi/gomega "" RegisterFailHandler
5+
6+
import (
7+
"testing"
8+
9+
. "github.com/onsi/ginkgo"
10+
. "github.com/onsi/gomega"
11+
)
12+
13+
func TestClassifyFiles(t *testing.T) {
14+
RegisterFailHandler(Fail)
15+
RunSpecs(t, "ClassifyFiles Suite")
16+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module filters.ClassifyFiles
2+
3+
go 1.14
4+
5+
require (
6+
github.com/github/depstubber v0.0.0-20200414033246-a63ca77a1581 // indirect
7+
github.com/onsi/ginkgo v1.12.0
8+
github.com/onsi/gomega v1.9.0
9+
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b // indirect
10+
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
11+
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
12+
)

ql/test/query-tests/filters/ClassifyFiles/vendor/github.com/onsi/ginkgo/stub.go

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ql/test/query-tests/filters/ClassifyFiles/vendor/github.com/onsi/gomega/stub.go

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# github.com/github/depstubber v0.0.0-20200414033246-a63ca77a1581
2+
## explicit
3+
github.com/github/depstubber
4+
# github.com/onsi/ginkgo v1.12.0
5+
## explicit
6+
github.com/onsi/ginkgo
7+
# github.com/onsi/gomega v1.9.0
8+
## explicit
9+
github.com/onsi/gomega
10+
# golang.org/x/net v0.0.0-20200226121028-0de0cce0169b
11+
## explicit
12+
golang.org/x/net
13+
# golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
14+
## explicit
15+
golang.org/x/sync
16+
# golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
17+
## explicit
18+
golang.org/x/xerrors

0 commit comments

Comments
 (0)