zoekt: 188 files / 2783 matches / 4.76ms neogrok: 13 files / 500 matches

github.com/sourcegraph/zoektinternal/e2e/examples/test_example.py 7 matches | Python | №1

1 import unittest2 3 class TestSimpleOperations(unittest.TestCase):4 def test_addition(self):5 self.assertEqual(2 + 2, 4)

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

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/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/zoektinternal/syntaxutil/parse_test.go 25 matches | Go | №4

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/zoektapi_test.go 40 matches | Go | №5

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

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

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 | №7

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 | №8

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 | №9

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

github.com/sourcegraph/zoektindex/eval_test.go 35 matches | Go | №10

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

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

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

github.com/sourcegraph/zoektweb/server_test.go 6 matches | Go | №12

3 import (4 "testing"5
8 9 func TestAddLineNumbers(t *testing.T) {10 tests := []struct {11 name string
87 88 for _, tt := range tests {89 t.Run(tt.name, func(t *testing.T) {90 got := AddLineNumbers(tt.content, tt.lineNum, tt.isBefore)

github.com/sourcegraph/zoektindex/index_test.go 219 matches | Go | №13

89 90 func TestBoundary(t *testing.T) {91 b := testShardBuilder(t, nil,92 Document{Name: "f1", Content: []byte("x the")},
99 100 func TestDocSectionInvalid(t *testing.T) {101 b, err := NewShardBuilder(nil)