From 56a0771cd1cb873ccca43bb2e67d155d3aa736a3 Mon Sep 17 00:00:00 2001 From: Matthew Huxtable Date: Fri, 4 May 2018 16:47:08 +0100 Subject: [PATCH] Mark test helpers as such --- utils_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils_test.go b/utils_test.go index 88789194..0828cb2e 100644 --- a/utils_test.go +++ b/utils_test.go @@ -41,19 +41,21 @@ func parseData(rawData string) yaml.MapSlice { } func assertResult(t *testing.T, expectedValue interface{}, actualValue interface{}) { + t.Helper() if expectedValue != actualValue { t.Error("Expected <", expectedValue, "> but got <", actualValue, ">", fmt.Sprintf("%T", actualValue)) } } func assertResultComplex(t *testing.T, expectedValue interface{}, actualValue interface{}) { + t.Helper() if !reflect.DeepEqual(expectedValue, actualValue) { t.Error("Expected <", expectedValue, "> but got <", actualValue, ">", fmt.Sprintf("%T", actualValue)) } } func assertResultWithContext(t *testing.T, expectedValue interface{}, actualValue interface{}, context interface{}) { - + t.Helper() if expectedValue != actualValue { t.Error(context) t.Error(": expected <", expectedValue, "> but got <", actualValue, ">")