summaryrefslogtreecommitdiff
path: root/gocomplete/tests_test.go
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2017-11-04 10:21:41 +0200
committerEyal Posener <[email protected]>2017-11-04 10:51:40 +0200
commit7ee9623f2b5d4685a91a51d0823275754b4d3a0a (patch)
treef45cd54539dd9a03cbb5314bb6a9c0891d013712 /gocomplete/tests_test.go
parent88e59760adaddb8276c9b15511302890690e2dae (diff)
Filter matches as a final stage
This simplifies the prediction logic writing, the predictor doesn't need to filter our according to line matching, instead it returns everything and the filtering is done at the end. This does not break current behavior.
Diffstat (limited to 'gocomplete/tests_test.go')
-rw-r--r--gocomplete/tests_test.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/gocomplete/tests_test.go b/gocomplete/tests_test.go
index 6799157..150e2e2 100644
--- a/gocomplete/tests_test.go
+++ b/gocomplete/tests_test.go
@@ -23,37 +23,10 @@ func TestPredictions(t *testing.T) {
want: []string{"TestPredictions", "Example"},
},
{
- name: "predict tests not found",
- predictor: predictTest,
- last: "X",
- },
- {
name: "predict benchmark ok",
predictor: predictBenchmark,
want: []string{"BenchmarkFake"},
},
- {
- name: "predict benchmarks not found",
- predictor: predictBenchmark,
- last: "X",
- },
- {
- name: "predict local ok",
- predictor: complete.PredictFunc(predictPackages),
- last: ".",
- want: []string{"./"},
- },
- {
- name: "predict system ok",
- predictor: complete.PredictFunc(predictPackages),
- last: "github.com/posener/complete/goc",
- want: []string{"github.com/posener/complete/gocomplete/"},
- },
- {
- name: "predict packages not found",
- predictor: complete.PredictFunc(predictPackages),
- last: "X",
- },
}
for _, tt := range tests {