We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 724d0eb + 7b52bc5 commit 986f294Copy full SHA for 986f294
filters/filter_test.go
@@ -317,3 +317,20 @@ func TestFilters(t *testing.T) {
317
})
318
}
319
320
+
321
+func TestOperatorStrings(t *testing.T) {
322
+ for _, testcase := range []struct {
323
+ op operator
324
+ expected string
325
+ }{
326
+ {operatorPresent, "?"},
327
+ {operatorEqual, "=="},
328
+ {operatorNotEqual, "!="},
329
+ {operatorMatches, "~="},
330
+ {10, "unknown"},
331
+ } {
332
+ if !reflect.DeepEqual(testcase.op.String(), testcase.expected) {
333
+ t.Fatalf("return value unexpected: %v != %v", testcase.op.String(), testcase.expected)
334
+ }
335
336
+}
0 commit comments