resources: Fix image test error on s390x, ppc64* and arm64
authorAnthony Fok <foka@debian.org>
Mon, 7 Oct 2019 18:35:00 +0000 (12:35 -0600)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 7 Oct 2019 19:52:43 +0000 (21:52 +0200)
commit39ed33fcebcde91605e645fd28fd94020b442d97
tree67af004797c57614dffe99db462844356d78ac80
parent020a6fbd7f6996ed84d80ba6c37fe0d8c2536806
resources: Fix image test error on s390x, ppc64* and arm64

In TestImageOperationsGolden, tolerate slight floating-point rounding
differences due to the use or non-use of "fused multiply and add" (FMA)
instruction on different architectures.

Special thanks to @disintegration for the solution in goldenEqual();
see https://github.com/disintegration/gift/issues/20

Fixes #6387
resources/image_test.go