amazon-ion / ion-go

A Go implementation of Amazon Ion.
https://amazon-ion.github.io/ion-docs/
Apache License 2.0
175 stars 31 forks source link

Use go-cmp for comparison in integration_test #72

Closed R-maan closed 4 years ago

R-maan commented 4 years ago

Currently integration_test is using reflect.DeepEqual() to check equivalency. There is at lease one case that we know of where DeepEqual() is not working as expected and is when float values have NaN. And there might be other cases too.

For now we have a customized cmpOption for FloatType to cover the above case, and other types are using the regular cmp.Equal(), except for DecimalType and IntType.

In order to have cmp.Equal() working for DecimalType, we might need to explicitly track precision.

As for IntType more investigation is needed, but I probably the issues is with 0 and null.Int cases

R-maan commented 4 years ago

Closing -- Not ready yet, it was supposed to be a PR into Armanbqt/ion-go fork