Skip to content

Commit

Permalink
Minor test refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
TristonianJones committed Jul 19, 2023
1 parent fca01a0 commit 77f4dd4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ext/strings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ func TestStrings(t *testing.T) {
out.Value(), tc.err, tc.expr)
}
if !strings.Contains(err.Error(), tc.err) {
t.Errorf("got error %v, wanted error %s for expr: %s", err, tc.err, tc.expr)
t.Errorf("got %q, expected error to contain %q for expr: %s", err, tc.err, tc.expr)
}
} else if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -1258,9 +1258,7 @@ func TestStringFormat(t *testing.T) {
reflect.ValueOf(&TestAllTypes{}),
),
}
if !skipCompileCheck {
opts = append(opts, cel.ASTValidators(cel.ValidateHomogeneousAggregateLiterals()))
}
opts = append(opts, cel.ASTValidators(cel.ValidateHomogeneousAggregateLiterals()))
opts = append(opts, variables...)
return opts
}
Expand Down

0 comments on commit 77f4dd4

Please sign in to comment.