Debian Codegraph @

pkg/filter/filter_test.go

raw symbols SCIP
1 package filterscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/
2
3 import (
4 "testingscip-go gomod github.com/golang/go/src go1.18 testing/"
5 )
6
7 func TestNewFilterByNamescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/TestNewFilterByName().(t *testingscip-go gomod github.com/golang/go/src go1.18 testing/.Tscip-go gomod github.com/golang/go/src go1.18 testing/T#) {
8 scf, _ := NewFilterByNamescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/NewFilterByName().("status", "200")
9 if _, ok := scf.(*StatusFilterscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/StatusFilter#); !ok {
10 t.Errorfscip-go gomod github.com/golang/go/src go1.18 testing/common#Errorf().("Was expecting statusfilter")
11 }
12
13 szf, _ := NewFilterByNamescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/NewFilterByName().("size", "200")
14 if _, ok := szf.(*SizeFilterscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/SizeFilter#); !ok {
15 t.Errorfscip-go gomod github.com/golang/go/src go1.18 testing/common#Errorf().("Was expecting sizefilter")
16 }
17
18 wf, _ := NewFilterByNamescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/NewFilterByName().("word", "200")
19 if _, ok := wf.(*WordFilterscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/WordFilter#); !ok {
20 t.Errorfscip-go gomod github.com/golang/go/src go1.18 testing/common#Errorf().("Was expecting wordfilter")
21 }
22
23 lf, _ := NewFilterByNamescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/NewFilterByName().("line", "200")
24 if _, ok := lf.(*LineFilterscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/LineFilter#); !ok {
25 t.Errorfscip-go gomod github.com/golang/go/src go1.18 testing/common#Errorf().("Was expecting linefilter")
26 }
27
28 ref, _ := NewFilterByNamescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/NewFilterByName().("regexp", "200")
29 if _, ok := ref.(*RegexpFilterscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/RegexpFilter#); !ok {
30 t.Errorfscip-go gomod github.com/golang/go/src go1.18 testing/common#Errorf().("Was expecting regexpfilter")
31 }
32
33 tf, _ := NewFilterByNamescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/NewFilterByName().("time", "200")
34 if _, ok := tf.(*TimeFilterscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/TimeFilter#); !ok {
35 t.Errorfscip-go gomod github.com/golang/go/src go1.18 testing/common#Errorf().("Was expecting timefilter")
36 }
37 }
38
39 func TestNewFilterByNameErrorscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/TestNewFilterByNameError().(t *testingscip-go gomod github.com/golang/go/src go1.18 testing/.Tscip-go gomod github.com/golang/go/src go1.18 testing/T#) {
40 _, err := NewFilterByNamescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/NewFilterByName().("status", "invalid")
41 if err == nil {
42 t.Errorfscip-go gomod github.com/golang/go/src go1.18 testing/common#Errorf().("Was expecing an error")
43 }
44 }
45
46 func TestNewFilterByNameNotFoundscip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/TestNewFilterByNameNotFound().(t *testingscip-go gomod github.com/golang/go/src go1.18 testing/.Tscip-go gomod github.com/golang/go/src go1.18 testing/T#) {
47 _, err := NewFilterByNamescip-go gomod github.com/ffuf/ffuf/v2 . `github.com/ffuf/ffuf/v2/pkg/filter`/NewFilterByName().("nonexistent", "invalid")
48 if err == nil {
49 t.Errorfscip-go gomod github.com/golang/go/src go1.18 testing/common#Errorf().("Was expecing an error with invalid filter name")
50 }
51 }