// compareStringVals converts the expected and actual values into string values,
// reporting any conversion failure and then checks that they are the same
// reporting any differeinces
compareStringVals converts the expected and actual values into string values,
reporting any conversion failure and then checks that they are the same
reporting any differeinces
// compareStringVals converts the expected and actual values into string values // reporting any conversion failure and then checks that they are the same // reporting any differeinces
func compareStringVals(t *testing.T, id string, expected, actual interface{}) {
	t.Helper()
	expVal, ok := expected.(dataframe.StringVal)
	if !ok {
		t.Fatal(id, ": BAD TEST - expVal should have been of type string")
		return
	}
	actualVal, ok := actual.(dataframe.StringVal)
	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 compareStringVals ( t * testing . T , id string , expected , actual interface { } ) { t . Helper ( ) expVal , ok := expected . ( dataframe . StringVal ) if ! ok { t . Fatal ( id , " " ) return } actualVal , ok := actual . ( dataframe . StringVal ) 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 " ) } }
compareStringVals converts the expected and actual values into string values,
reporting any conversion failure and then checks that they are the same
reporting any differeinces
compareStringVals converts the expected and actual values into string values reporting any conversion failure and then checks that they are the same reporting any differeinces