Skip to content

Commit

Permalink
Improve test error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko committed Jun 13, 2015
1 parent 841a1f0 commit e9e41df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/interpolate_funcs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,12 +532,12 @@ func testFunction(t *testing.T, config testFunctionConfig) {
for i, tc := range config.Cases {
ast, err := lang.Parse(tc.Input)
if err != nil {
t.Fatalf("%d: err: %s", i, err)
t.Fatalf("Case #%d: input: %#v\nerr: %s", i, tc.Input, err)
}

out, _, err := lang.Eval(ast, langEvalConfig(config.Vars))
if (err != nil) != tc.Error {
t.Fatalf("%d: err: %s", i, err)
t.Fatalf("Case #%d:\ninput: %#v\nerr: %s", i, tc.Input, err)
}

if !reflect.DeepEqual(out, tc.Result) {
Expand Down

0 comments on commit e9e41df

Please sign in to comment.