Merge pull request #1 from alexflint/travis_ping

fix test failures
This commit is contained in:
Alex Flint 2017-02-15 18:04:25 -08:00 committed by GitHub
commit e80c3b7ed2
1 changed files with 2 additions and 2 deletions

View File

@ -14,13 +14,13 @@ func assertParse(t *testing.T, expected interface{}, str string) {
v := reflect.New(reflect.TypeOf(expected)).Elem()
err := ParseValue(v, str)
if assert.NoError(t, err) {
assert.Equal(t, expected, v)
assert.Equal(t, expected, v.Interface())
}
ptr := reflect.New(reflect.PtrTo(reflect.TypeOf(expected))).Elem()
err = ParseValue(ptr, str)
if assert.NoError(t, err) {
assert.Equal(t, expected, ptr.Elem())
assert.Equal(t, expected, ptr.Elem().Interface())
}
assert.True(t, CanParse(v.Type()))