diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-04-19 11:21:50 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-04-19 11:21:50 +0200 |
commit | faf9fedc3d39cf226a26cbd41e0152359c46968a (patch) | |
tree | c49a2e7795c4476a7e25a09f1a6130f3f8dd41f5 /resources | |
parent | 11aa893198e1fe79134a0c4857116e987f29a40a (diff) | |
download | hugo-faf9fedc3d39cf226a26cbd41e0152359c46968a.tar.gz hugo-faf9fedc3d39cf226a26cbd41e0152359c46968a.zip |
resources/images: Fix TestColorLuminance on s390x
Diffstat (limited to 'resources')
-rw-r--r-- | resources/images/color_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/resources/images/color_test.go b/resources/images/color_test.go index cbbc76cf9..3a75c068e 100644 --- a/resources/images/color_test.go +++ b/resources/images/color_test.go @@ -18,6 +18,7 @@ import ( "testing" qt "github.com/frankban/quicktest" + "github.com/gohugoio/hugo/htesting/hqt" ) func TestHexStringToColor(t *testing.T) { @@ -119,8 +120,8 @@ func TestReplaceColorInPalette(t *testing.T) { func TestColorLuminance(t *testing.T) { c := qt.New(t) - c.Assert(hexStringToColor("#000000").Luminance(), qt.Equals, 0.0) - c.Assert(hexStringToColor("#768a9a").Luminance(), qt.Equals, 0.24361603589088263) - c.Assert(hexStringToColor("#d5bc9f").Luminance(), qt.Equals, 0.5261577672685374) - c.Assert(hexStringToColor("#ffffff").Luminance(), qt.Equals, 1.0) + c.Assert(hexStringToColor("#000000").Luminance(), hqt.IsSameFloat64, 0.0) + c.Assert(hexStringToColor("#768a9a").Luminance(), hqt.IsSameFloat64, 0.24361603589088263) + c.Assert(hexStringToColor("#d5bc9f").Luminance(), hqt.IsSameFloat64, 0.5261577672685374) + c.Assert(hexStringToColor("#ffffff").Luminance(), hqt.IsSameFloat64, 1.0) } |