Add more test coverage around unset input source applying

This commit is contained in:
2022-04-25 22:15:39 -04:00
parent fe1468cc86
commit ac641ffda5
2 changed files with 206 additions and 60 deletions

View File

@@ -22,7 +22,10 @@ func expect(t *testing.T, a interface{}, b interface{}) {
}
func refute(t *testing.T, a interface{}, b interface{}) {
if a == b {
t.Errorf("Did not expect %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a))
_, fn, line, _ := runtime.Caller(1)
fn = strings.Replace(fn, wd+"/", "", -1)
if reflect.DeepEqual(a, b) {
t.Errorf("(%s:%d) Did not expect %v (type %v) - Got %v (type %v)", fn, line, b, reflect.TypeOf(b), a, reflect.TypeOf(a))
}
}