zoekt: 67
files / 360
matches / 1.73ms neogrok: 20 files / 182
matches
github.com/sourcegraph/zoektapi_test.go 6 matches | Go | №1
86
87 func TestSizeBytesSearchResult(t *testing.T) {
88 sr := SearchResult{
125
126 func TestSizeBytesChunkMatches(t *testing.T) {
127 cm := ChunkMatch{
142
143 func TestMatchSize(t *testing.T) {
144 cases := []struct {
164
165 func TestSearchOptions_String(t *testing.T) {
166 // To make sure we don't forget to update the string implementation we use
234
235 func TestRepositoryMergeMutable(t *testing.T) {
236 a := Repository{
github.com/sourcegraph/zoektweb/e2e_test.go 11 matches | Go | №2
85
86 func TestBasic(t *testing.T) {
87 b, err := index.NewShardBuilder(&zoekt.Repository{
151
152 func TestPrint(t *testing.T) {
153 b, err := index.NewShardBuilder(&zoekt.Repository{
204
205 func TestPrintDefault(t *testing.T) {
206 b, err := index.NewShardBuilder(&zoekt.Repository{
274
275 func TestFormatJson(t *testing.T) {
276 b, err := index.NewShardBuilder(&zoekt.Repository{
329
330 func TestContextLines(t *testing.T) {
331 b, err := index.NewShardBuilder(&zoekt.Repository{
github.com/sourcegraph/zoektmarshal_test.go 1 match | Go | №3
53
54 func TestRepoList_Marshal(t *testing.T) {
55 for i := range []int{0, 1, 10, 100} {
github.com/sourcegraph/zoektapi_proto_test.go 1 match | Go | №4
35
36 func TestProtoRoundtrip(t *testing.T) {
37 t.Run("FileMatch", func(t *testing.T) {
github.com/sourcegraph/zoektindex/bits_test.go 11 matches | Go | №5
31
32 func TestNgram(t *testing.T) {
33 in := "abc"
64
65 func TestDocSection(t *testing.T) {
66 in := []DocumentSection{{1, 2}, {3, 4}}
73
74 func TestGenerateCaseNgrams(t *testing.T) {
75 ng := stringToNGram("aB1")
94
95 func TestNextFileIndex(t *testing.T) {
96 for _, tc := range []struct {
111
112 func TestDeltas(t *testing.T) {
113 in := []uint32{1, 72, 0xfff}
github.com/sourcegraph/zoektindex/eval_test.go 9 matches | Go | №6
79
80 func TestRegexpParse(t *testing.T) {
81 type testcase struct {
151
152 func TestSearch_ShardRepoMaxMatchCountOpt(t *testing.T) {
153 cs := compoundReposShard(t, "foo", "bar")
209
210 func TestSimplifyRepoSet(t *testing.T) {
211 d := compoundReposShard(t, "foo", "bar")
231
232 func TestSimplifyRepoIDs(t *testing.T) {
233 d := compoundReposShard(t, "foo", "bar")
255
256 func TestSimplifyRepo(t *testing.T) {
257 re := func(pat string) *query.Repo {
github.com/sourcegraph/zoektindex/read_test.go 7 matches | Go | №7
35
36 func TestReadWrite(t *testing.T) {
37 b, err := NewShardBuilder(nil)
80
81 func TestReadWriteNames(t *testing.T) {
82 b, err := NewShardBuilder(nil)
124
125 func TestGet(t *testing.T) {
126 b, err := NewShardBuilder(nil)
217
218 func TestReadSearch(t *testing.T) {
219 type out struct {
310
311 func TestEncodeRawConfig(t *testing.T) {
312 mustParse := func(s string) uint8 {
github.com/sourcegraph/zoektindex/index_test.go 87 matches | Go | №8
88
89 func TestBoundary(t *testing.T) {
90 b := testShardBuilder(t, nil,
98
99 func TestDocSectionInvalid(t *testing.T) {
100 b, err := NewShardBuilder(nil)
124
125 func TestBasic(t *testing.T) {
126 b := testShardBuilder(t, nil,
167
168 func TestEmptyIndex(t *testing.T) {
169 b := testShardBuilder(t, nil)
202
203 func TestNewlines(t *testing.T) {
204 b := testShardBuilder(t, nil,
github.com/sourcegraph/zoektindex/ctags_test.go 5 matches | Go | №9
24
25 func TestTagsToSections(t *testing.T) {
26 c := []byte("package foo\nfunc bar(j int) {}\n//bla")
45
46 func TestTagsToSectionsMultiple(t *testing.T) {
47 c := []byte("class Foo { int x; int b; }")
74
75 func TestTagsToSectionsReverse(t *testing.T) {
76 c := []byte("typedef enum { FOO, BAR } bas\n")
108
109 func TestTagsToSectionsEOF(t *testing.T) {
110 c := []byte("package foo\nfunc bar(j int) {}")
151
152 func TestOverlaps(t *testing.T) {
153 tests := []struct {
github.com/sourcegraph/zoektquery/query_test.go 5 matches | Go | №10
27
28 func TestQueryString(t *testing.T) {
29 q := &Or{[]Q{
42
43 func TestSimplify(t *testing.T) {
44 type testcase struct {
102
103 func TestMap(t *testing.T) {
104 in := NewAnd(&Substring{Pattern: "bla"}, &Not{&Repo{Regexp: regexp.MustCompile("foo")}})
118
119 func TestVisitAtoms(t *testing.T) {
120 in := NewAnd(&Substring{}, &Repo{}, &Not{&Const{}})
129
130 func TestExpandFileContent(t *testing.T) {
131 re, _ := syntax.Parse("foo", syntax.Perl)
github.com/sourcegraph/zoektindex/btree_test.go 3 matches | Go | №11
7
8 func TestBTree_sorted(t *testing.T) {
9 bt := newBtree(btreeOpts{bucketSize: 2, v: 2})
22
23 func TestFindBucket(t *testing.T) {
24 bt := newBtree(btreeOpts{bucketSize: 4, v: 2})
66
67 func TestGetBucket(t *testing.T) {
68 var off uint32 = 13
github.com/sourcegraph/zoektquery/parse_test.go 2 matches | Go | №12
33
34 func TestParseQuery(t *testing.T) {
35 type testcase struct {
140
141 func TestTokenize(t *testing.T) {
142 type testcase struct {
github.com/sourcegraph/zoektindex/merge_test.go 1 match | Go | №13
14 // identical.
15 func TestExplode(t *testing.T) {
16 simpleShards := []string{
github.com/sourcegraph/zoektindex/limit_test.go 1 match | Go | №14
11
12 func TestLimitMatches(t *testing.T) {
13 cases := []struct {
github.com/sourcegraph/zoektquery/regexp_test.go 2 matches | Go | №15
53
54 func TestLowerRegexp(t *testing.T) {
55 in := "[a-zA-Z]fooBAR"
70
71 func TestOptimize(t *testing.T) {
72 tests := []struct {
github.com/sourcegraph/zoektindex/builder_test.go 17 matches | Go | №16
24 // ensure we don't regress on how we build v16
25 func TestBuildv16(t *testing.T) {
26 dir := t.TempDir()
95
96 func TestFlags(t *testing.T) {
97 cases := []struct {
158
159 func TestIncrementalSkipIndexing(t *testing.T) {
160 cases := []struct {
220
221 func TestMain(m *testing.M) {
222 flag.Parse()
228
229 func TestDontCountContentOfSkippedFiles(t *testing.T) {
230 b, err := NewBuilder(Options{RepositoryDescription: zoekt.Repository{
github.com/sourcegraph/zoektquery/marshal_test.go 2 matches | Go | №17
82
83 func TestBranchesRepos_Marshal(t *testing.T) {
84 want := genBranchesRepos(1000)
143
144 func TestFileNameSet_Marshal(t *testing.T) {
145 for i := range []int{0, 1, 10, 100} {
github.com/sourcegraph/zoektindex/hititer_test.go 1 match | Go | №18
28
29 func TestCompressedPostingIterator_limit(t *testing.T) {
30 f := func(nums, limits []uint32) bool {
github.com/sourcegraph/zoektignore/ignore_test.go 2 matches | Go | №19
11
12 func TestParseIgnoreFile(t *testing.T) {
13 tests := []struct {
45
46 func TestIgnoreMatcher(t *testing.T) {
47 ignoreFile := `
github.com/sourcegraph/zoektindex/matchtree_test.go 8 matches | Go | №20
162
163 func TestEquivalentQuerySkipRegexpTree(t *testing.T) {
164 tests := []struct {
202 // case:yes"
203 func TestWordSearchSkipRegexpTree(t *testing.T) {
204 qStr := "\\bfoo\\b case:yes"
234
235 func TestSymbolMatchTree(t *testing.T) {
236 tests := []struct {
288
289 func TestRepoSet(t *testing.T) {
290 d := &indexData{
311
312 func TestRepo(t *testing.T) {
313 d := &indexData{