Skip to content

Commit e9e41df

Browse files
committed
Improve test error messages
1 parent 841a1f0 commit e9e41df

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

config/interpolate_funcs_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,12 +532,12 @@ func testFunction(t *testing.T, config testFunctionConfig) {
532532
for i, tc := range config.Cases {
533533
ast, err := lang.Parse(tc.Input)
534534
if err != nil {
535-
t.Fatalf("%d: err: %s", i, err)
535+
t.Fatalf("Case #%d: input: %#v\nerr: %s", i, tc.Input, err)
536536
}
537537

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

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

0 commit comments

Comments
 (0)