-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Index all test code consistently
- Loading branch information
1 parent
fd3c308
commit 5c73fe7
Showing
5 changed files
with
142 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
internal/testdata/snapshots/output/sharedtestmodule/cmd/gitserver/server/cleanup_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package server | ||
// ^^^^^^ reference 0.1.test `sg/sharedtestmodule/cmd/gitserver/server`/ | ||
|
||
import "testing" | ||
// ^^^^^^^ reference github.com/golang/go/src go1.22 testing/ | ||
|
||
func TestStuff(t *testing.T) { | ||
// ^^^^^^^^^ definition 0.1.test `sg/sharedtestmodule/cmd/gitserver/server`/TestStuff(). | ||
// documentation | ||
// > ```go | ||
// > func TestStuff(t *T) | ||
// > ``` | ||
// ^ definition local 0 | ||
// ^^^^^^^ reference github.com/golang/go/src go1.22 testing/ | ||
// ^ reference github.com/golang/go/src go1.22 testing/T# | ||
wd := "hello" | ||
// ^^ definition local 1 | ||
repo := "world" | ||
// ^^^^ definition local 2 | ||
|
||
runCmd(t, wd, "git", "init", repo) | ||
// ^^^^^^ reference 0.1.test `sg/sharedtestmodule/cmd/gitserver/server`/runCmd(). | ||
// ^ reference local 0 | ||
// ^^ reference local 1 | ||
// ^^^^ reference local 2 | ||
} | ||
|
33 changes: 33 additions & 0 deletions
33
internal/testdata/snapshots/output/sharedtestmodule/cmd/gitserver/server/server_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package server | ||
// ^^^^^^ reference 0.1.test `sg/sharedtestmodule/cmd/gitserver/server`/ | ||
|
||
import "testing" | ||
// ^^^^^^^ reference github.com/golang/go/src go1.22 testing/ | ||
|
||
func TestExecRequest(t *testing.T) { | ||
// ^^^^^^^^^^^^^^^ definition 0.1.test `sg/sharedtestmodule/cmd/gitserver/server`/TestExecRequest(). | ||
// documentation | ||
// > ```go | ||
// > func TestExecRequest(t *T) | ||
// > ``` | ||
// ^ definition local 0 | ||
// ^^^^^^^ reference github.com/golang/go/src go1.22 testing/ | ||
// ^ reference github.com/golang/go/src go1.22 testing/T# | ||
t.Log("hello world") | ||
// ^ reference local 0 | ||
// ^^^ reference github.com/golang/go/src go1.22 testing/common#Log(). | ||
} | ||
|
||
func runCmd(t *testing.T, dir string, cmd string, arg ...string) {} | ||
// ^^^^^^ definition 0.1.test `sg/sharedtestmodule/cmd/gitserver/server`/runCmd(). | ||
// documentation | ||
// > ```go | ||
// > func runCmd(t *T, dir string, cmd string, arg ...string) | ||
// > ``` | ||
// ^ definition local 1 | ||
// ^^^^^^^ reference github.com/golang/go/src go1.22 testing/ | ||
// ^ reference github.com/golang/go/src go1.22 testing/T# | ||
// ^^^ definition local 2 | ||
// ^^^ definition local 3 | ||
// ^^^ definition local 4 | ||
|
50 changes: 50 additions & 0 deletions
50
...l/testdata/snapshots/output/testdata/conflicting_test_symbols/sandbox_unsupported_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
//go:build !linux && !windows && !freebsd | ||
// +build !linux,!windows,!freebsd | ||
|
||
package osl | ||
// ^^^ definition 0.1.test `sg/testdata/conflicting_test_symbols`/ | ||
// documentation | ||
// > package osl | ||
|
||
import ( | ||
"errors" | ||
// ^^^^^^ reference github.com/golang/go/src go1.22 errors/ | ||
"testing" | ||
// ^^^^^^^ reference github.com/golang/go/src go1.22 testing/ | ||
) | ||
|
||
var ErrNotImplemented = errors.New("not implemented") | ||
// ^^^^^^^^^^^^^^^^^ definition 0.1.test `sg/testdata/conflicting_test_symbols`/ErrNotImplemented. | ||
// documentation | ||
// > ```go | ||
// > var ErrNotImplemented error | ||
// > ``` | ||
// ^^^^^^ reference github.com/golang/go/src go1.22 errors/ | ||
// ^^^ reference github.com/golang/go/src go1.22 errors/New(). | ||
|
||
func newKey(t *testing.T) (string, error) { | ||
// ^^^^^^ definition 0.1.test `sg/testdata/conflicting_test_symbols`/newKey(). | ||
// documentation | ||
// > ```go | ||
// > func newKey(t *T) (string, error) | ||
// > ``` | ||
// ^ definition local 0 | ||
// ^^^^^^^ reference github.com/golang/go/src go1.22 testing/ | ||
// ^ reference github.com/golang/go/src go1.22 testing/T# | ||
return "", ErrNotImplemented | ||
// ^^^^^^^^^^^^^^^^^ reference 0.1.test `sg/testdata/conflicting_test_symbols`/ErrNotImplemented. | ||
} | ||
|
||
func verifySandbox(t *testing.T, s string) { | ||
// ^^^^^^^^^^^^^ definition 0.1.test `sg/testdata/conflicting_test_symbols`/verifySandbox(). | ||
// documentation | ||
// > ```go | ||
// > func verifySandbox(t *T, s string) | ||
// > ``` | ||
// ^ definition local 1 | ||
// ^^^^^^^ reference github.com/golang/go/src go1.22 testing/ | ||
// ^ reference github.com/golang/go/src go1.22 testing/T# | ||
// ^ definition local 2 | ||
return | ||
} | ||
|
11 changes: 11 additions & 0 deletions
11
internal/testdata/snapshots/output/testspecial/foo_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package testspecial | ||
// ^^^^^^^^^^^ reference 0.1.test `sg/testspecial`/ | ||
|
||
func TestFoo_Whitebox() { Foo() } | ||
// ^^^^^^^^^^^^^^^^ definition 0.1.test `sg/testspecial`/TestFoo_Whitebox(). | ||
// documentation | ||
// > ```go | ||
// > func TestFoo_Whitebox() | ||
// > ``` | ||
// ^^^ reference 0.1.test `sg/testspecial`/Foo(). | ||
|