zoekt: 175 files / 2638 matches / 5.24ms neogrok: 11 files / 500 matches

github.com/sourcegraph/zoektcmd/zoekt-test/main.go 3 matches | Go | №1

14 15 // Command zoekt-test compares the zoekt results with raw substring search.16 package main
176 177 func testLoadIndexDir(indexDir string) {178 var a, b runtime.MemStats
223 if *indexDir != "" {224 testLoadIndexDir(*indexDir)225 return

github.com/sourcegraph/zoektinternal/syntaxutil/parse_test.go 25 matches | Go | №2

9 "strings"10 "testing"11 "unicode"
13 14 type parseTest struct {15 Regexp string
18 19 var parseTests = []parseTest{20 // Base cases
126 127 // Test precedences128 {`(?:ab)*`, `star{str{ab}}`},

github.com/sourcegraph/zoektinternal/e2e/examples/example.java 4 matches | Java | №3

57 58 public static void testEnum(InnerEnum magicEnum) {59 if (System.nanoTime() > System.currentTimeMillis()) {
76 77 public static void testAnon() {78 InnerInterface<String, String> fn =
94 System.out.println(runInnerInterface(innerClass, a));95 testEnum(InnerEnum.A);96 testAnon();97 return "";

github.com/sourcegraph/zoektapi_test.go 30 matches | Go | №4

21 "strings"22 "testing"23 "time"
31 */32 func BenchmarkMinimalRepoListEncodings(b *testing.B) {33 size := uint32(13000) // 2021-06-24 rough estimate of number of repos on a replica.
65 66 func benchmarkEncoding(data interface{}) func(*testing.B) {67 return func(b *testing.B) {68 b.Helper()
86 87 func TestSizeBytesSearchResult(t *testing.T) {88 sr := SearchResult{

github.com/sourcegraph/zoektweb/e2e_test.go 56 matches | Go | №5

24 "net/http"25 "net/http/httptest"26 "reflect"
28 "strings"29 "testing"30 "time"
38 39 // TODO(hanwen): cut & paste from ../ . Should create internal test40 // util package.
57 58 func searcherForTest(t *testing.T, b *index.ShardBuilder) zoekt.Streamer {59 var buf bytes.Buffer

github.com/sourcegraph/zoektmarshal_test.go 5 matches | Go | №6

5 "encoding/gob"6 "testing"7 "time"
11 12 func BenchmarkRepoList_Encode(b *testing.B) {13 set := genRepoList(1000)
33 34 func BenchmarkRepoList_Decode(b *testing.B) {35 set := genRepoList(1000)
53 54 func TestRepoList_Marshal(t *testing.T) {55 for i := range []int{0, 1, 10, 100} {

github.com/sourcegraph/zoektapi_proto_test.go 41 matches | Go | №7

23 "reflect"24 "testing"25 "testing/quick"26 "time"
35 36 func TestProtoRoundtrip(t *testing.T) {37 t.Run("FileMatch", func(t *testing.T) {38 f := func(f1 FileMatch) bool {

github.com/sourcegraph/zoektindex/bits_test.go 33 matches | Go | №8

23 "strconv"24 "testing"25 "testing/quick"26
31 32 func TestNgram(t *testing.T) {33 in := "abc"
55 func (ngramRunes) Generate(rand *rand.Rand, size int) reflect.Value {56 // Same implementation used by testing/quick to generate strings. But we57 // force it to ngramSize runes.

github.com/sourcegraph/zoektindex/eval_test.go 29 matches | Go | №9

22 "strings"23 "testing"24
54 55 func printRegexp(t *testing.T, r *syntax.Regexp, lvl int) {56 t.Logf("%s%s ch: %d", strings.Repeat(" ", lvl), opnames[r.Op], len(r.Sub))
79 80 func TestRegexpParse(t *testing.T) {81 type testcase struct {82 in string

github.com/sourcegraph/zoektindex/read_test.go 26 matches | Go | №10

28 "strings"29 "testing"30
35 36 func TestReadWrite(t *testing.T) {37 b, err := NewShardBuilder(nil)
80 81 func TestReadWriteNames(t *testing.T) {82 b, err := NewShardBuilder(nil)

github.com/sourcegraph/zoektindex/index_test.go 248 matches | Go | №11

47 48 func testShardBuilder(tb testing.TB, repo *zoekt.Repository, docs ...Document) *ShardBuilder {49 tb.Helper()
64 65 func testShardBuilderCompound(t *testing.T, repos []*zoekt.Repository, docs [][]Document) *ShardBuilder {66 t.Helper()
71 if len(repos) != len(docs) {72 t.Fatalf("testShardBuilderCompound: repos must be the same length as docs, got: len(repos)=%d len(docs)=%d", len(repos), len(docs))73 }