zoekt: 87
files / 494
matches / 1.37ms neogrok: 20 files / 193
matches
2 3 class TestSimpleOperations(unittest.TestCase):4 def test_addition(self): neogrokapi_test.go 7 matches | Go | №2
87 88 func TestSizeBytesSearchResult(t *testing.T) {89 sr := SearchResult{ 126 127 func TestSizeBytesChunkMatches(t *testing.T) {128 cm := ChunkMatch{ 143 144 func TestMatchSize(t *testing.T) {145 cases := []struct { 165 166 func TestSearchOptions_String(t *testing.T) {167 // To make sure we don't forget to update the string implementation we use 232 233 func TestRepositoryMergeMutable(t *testing.T) {234 a := Repository{ 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{ 53 54 func TestRepoList_Marshal(t *testing.T) {55 for i := range []int{0, 1, 10, 100} { 35 36 func TestProtoRoundtrip(t *testing.T) {37 t.Run("FileMatch", func(t *testing.T) { 350 351 func TestSearchOptionsSchedulingClassProto(t *testing.T) {352 if got := SearchOptionsFromProto(&webserverv1.SearchOptions{}).SchedulingClass; got != SchedulingClassInteractive { 81 82 func TestRegexpParse(t *testing.T) {83 type testcase struct { 156 157 func TestSearch_ShardRepoMaxMatchCountOpt(t *testing.T) {158 cs := compoundReposShard(t, "foo", "bar") 195 196 func TestSearch_ShardMaxMatchCountStats(t *testing.T) {197 cs := compoundReposShard(t, "foo") 230 231 func TestSimplifyRepoSet(t *testing.T) {232 d := compoundReposShard(t, "foo", "bar") 252 253 func TestSimplifyRepoIDs(t *testing.T) {254 d := compoundReposShard(t, "foo", "bar") 32 33 func TestNgram(t *testing.T) {34 in := "abc" 65 66 func TestDocSection(t *testing.T) {67 in := []DocumentSection{{1, 2}, {3, 4}} 74 75 func TestGenerateCaseNgrams(t *testing.T) {76 ng := stringToNGram("aB1") 95 96 func TestNextFileIndex(t *testing.T) {97 for _, tc := range []struct { 112 113 func TestDeltas(t *testing.T) {114 in := []uint32{1, 72, 0xfff} 36 37 func TestReadWrite(t *testing.T) {38 b, err := NewShardBuilder(nil) 81 82 func TestReadWriteNames(t *testing.T) {83 b, err := NewShardBuilder(nil) 125 126 func TestGet(t *testing.T) {127 b, err := NewShardBuilder(nil) 218 219 func TestReadSearch(t *testing.T) {220 type out struct { 311 312 func TestEncodeRawConfig(t *testing.T) {313 mustParse := func(s string) uint8 { 8 9 func TestAddLineNumbers(t *testing.T) {10 tests := []struct { 89 90 func TestBoundary(t *testing.T) {91 b := testShardBuilder(t, nil, 99 100 func TestSearchPanicsOnCorruptRuneOffset(t *testing.T) {101 for _, tc := range []struct { 150 151 func TestSearchPanicsOnMatchPastDocumentEnd(t *testing.T) {152 for _, tc := range []struct { 205 206 func TestDocSectionInvalid(t *testing.T) {207 b, err := NewShardBuilder(nil) 231 232 func TestBasic(t *testing.T) {233 b := testShardBuilder(t, nil, 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 { 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) 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 14 15 func TestMergePreservesStoredCategoryForSkippedGeneratedFile(t *testing.T) {16 sb, err := NewShardBuilder(&zoekt.Repository{Name: "repo"}) 82 // identical.83 func TestExplode(t *testing.T) {84 simpleShards := []string{ 169 // search error rate until it is removed.170 func TestExplodeEmptyShard(t *testing.T) {171 dir := t.TempDir() 33 34 func TestParseQuery(t *testing.T) {35 type testcase struct { 191 192 func TestTokenize(t *testing.T) {193 type testcase struct { 235 236 func TestMetaQueryParsing(t *testing.T) {237 cases := []struct { 12 13 func TestSearchTypeRepo(t *testing.T) {14 ss := newShardedSearcher(2) 12 13 func TestLimitMatches(t *testing.T) {14 cases := []struct { 71 72 func TestYield(t *testing.T) {73 ctx := context.Background() 116 117 func TestMultiScheduler(t *testing.T) {118 ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) 179 180 func TestMultiSchedulerBatchAdmission(t *testing.T) {181 sched := newMultiScheduler(4) 220 221 func TestMultiSchedulerBatchAdmissionCancellation(t *testing.T) {222 sched := newMultiScheduler(1) 241 242 func TestParseTuneables(t *testing.T) {243 cases := map[string]map[string]int{ 53 54 func TestLowerRegexp(t *testing.T) {55 in := "[a-zA-Z]fooBAR" 70 71 func TestOptimize(t *testing.T) {72 tests := []struct { 104 105 func TestRegexpRegexpString(t *testing.T) {106 tests := []struct { 46 47 func TestMain(m *testing.M) {48 flag.Parse() 81 82 func TestSearchSchedulingClass(t *testing.T) {83 sched := &recordingScheduler{} 108 109 func TestCrashResilience(t *testing.T) {110 out := &bytes.Buffer{} 205 206 func TestOrderByShard(t *testing.T) {207 ss := newShardedSearcher(1) 246 247 func TestShardedSearcher_Ranking(t *testing.T) {248 ss := newShardedSearcher(1)