refactor: cleanup unused code (#7130)

* refactor: drop unused code

* refactor: drop unused code
This commit is contained in:
Silvan
2024-01-02 15:26:31 +01:00
committed by GitHub
parent 4e3936b5bf
commit 9892fd92b6
109 changed files with 0 additions and 6282 deletions

View File

@@ -1018,95 +1018,6 @@ func TestTextQuery_comp(t *testing.T) {
}
}
func TestTextComparisonFromMethod(t *testing.T) {
type args struct {
m domain.SearchMethod
}
tests := []struct {
name string
args args
want TextComparison
}{
{
name: "equals",
args: args{
m: domain.SearchMethodEquals,
},
want: TextEquals,
},
{
name: "equals ignore case",
args: args{
m: domain.SearchMethodEqualsIgnoreCase,
},
want: TextEqualsIgnoreCase,
},
{
name: "starts with",
args: args{
m: domain.SearchMethodStartsWith,
},
want: TextStartsWith,
},
{
name: "starts with ignore case",
args: args{
m: domain.SearchMethodStartsWithIgnoreCase,
},
want: TextStartsWithIgnoreCase,
},
{
name: "ends with",
args: args{
m: domain.SearchMethodEndsWith,
},
want: TextEndsWith,
},
{
name: "ends with ignore case",
args: args{
m: domain.SearchMethodEndsWithIgnoreCase,
},
want: TextEndsWithIgnoreCase,
},
{
name: "contains",
args: args{
m: domain.SearchMethodContains,
},
want: TextContains,
},
{
name: "list contains",
args: args{
m: domain.SearchMethodListContains,
},
want: TextListContains,
},
{
name: "containts ignore case",
args: args{
m: domain.SearchMethodContainsIgnoreCase,
},
want: TextContainsIgnoreCase,
},
{
name: "invalid search method",
args: args{
m: -1,
},
want: textCompareMax,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := TextComparisonFromMethod(tt.args.m); got != tt.want {
t.Errorf("TextCompareFromMethod() = %v, want %v", got, tt.want)
}
})
}
}
func TestNewNumberQuery(t *testing.T) {
type args struct {
column Column