1
0
mirror of https://github.com/taigrr/yq synced 2025-01-18 04:53:17 -08:00

JQ like syntax wip

This commit is contained in:
Mike Farah
2020-10-16 12:29:26 +11:00
parent 449fb8952c
commit 6829d8cb78
13 changed files with 446 additions and 308 deletions

View File

@@ -54,6 +54,14 @@ func AssertResultComplex(t *testing.T, expectedValue interface{}, actualValue in
}
}
func AssertResultComplexWithContext(t *testing.T, expectedValue interface{}, actualValue interface{}, context interface{}) {
t.Helper()
if !reflect.DeepEqual(expectedValue, actualValue) {
t.Error(context)
t.Error("\nExpected <", expectedValue, ">\nbut got <", actualValue, ">", fmt.Sprintf("%T", actualValue))
}
}
func AssertResultWithContext(t *testing.T, expectedValue interface{}, actualValue interface{}, context interface{}) {
t.Helper()
if expectedValue != actualValue {