// compareBoolVals converts the expected and actual values into bool values,
// reporting any conversion failure and then checks that they are the same
// reporting any differeinces
compareBoolVals converts the expected and actual values into bool values,
reporting any conversion failure and then checks that they are the same
reporting any differeinces
// compareBoolVals converts the expected and actual values into bool values // reporting any conversion failure and then checks that they are the same // reporting any differeinces
func compareBoolVals(t *testing.T, id string, expected, actual interface{}) {
	t.Helper()
	expVal, ok := expected.(dataframe.BoolVal)
	if !ok {
		t.Fatal(id, ": BAD TEST - expVal should have been of type bool")
		return
	}
	actualVal, ok := actual.(dataframe.BoolVal)
	if !ok {
		t.Log(id)
		t.Logf("\t: expected type: %T", expVal)
		t.Logf("\t:   actual type: %T", actual)
		t.Errorf("\t: value type doesn't match the returned type")
	} else if actualVal.IsNA != expVal.IsNA {
		t.Log(id)
		t.Logf("\t: expected IsNA: %v", expVal.IsNA)
		t.Logf("\t:   actual IsNA: %v", actualVal.IsNA)
		t.Errorf("\t: the IsNA flags don't match")
	} else if !actualVal.IsNA && expVal.Val != actualVal.Val {
		t.Log(id)
		t.Logf("\t: expected val: %v", expVal.Val)
		t.Logf("\t:   actual val: %v", actualVal.Val)
		t.Errorf("\t: the values don't match")
	}
}
func compareBoolVals ( t * testing . T , id string , expected , actual interface { } ) { t . Helper ( ) expVal , ok := expected . ( dataframe . BoolVal ) if ! ok { t . Fatal ( id , " " ) return } actualVal , ok := actual . ( dataframe . BoolVal ) if ! ok { t . Log ( id ) t . Logf ( " \t " , expVal ) t . Logf ( " \t " , actual ) t . Errorf ( " \t " ) } else if actualVal . IsNA != expVal . IsNA { t . Log ( id ) t . Logf ( " \t " , expVal . IsNA ) t . Logf ( " \t " , actualVal . IsNA ) t . Errorf ( " \t " ) } else if ! actualVal . IsNA && expVal . Val != actualVal . Val { t . Log ( id ) t . Logf ( " \t " , expVal . Val ) t . Logf ( " \t " , actualVal . Val ) t . Errorf ( " \t " ) } }
compareBoolVals converts the expected and actual values into bool values,
reporting any conversion failure and then checks that they are the same
reporting any differeinces
compareBoolVals converts the expected and actual values into bool values reporting any conversion failure and then checks that they are the same reporting any differeinces