sharkdp / pastel

A command-line tool to generate, analyze, convert and manipulate colors
Apache License 2.0
5k stars 97 forks source link

Failed test when building for 32bit archs #97

Closed jjsearle closed 4 years ago

jjsearle commented 4 years ago

I am packaging the project for alpine linux (see https://github.com/alpinelinux/aports/pull/11597)

It builds fine for all archs but when running the tests on x86 armhf armv7 it fails a single test

thread 'distinct::tests::test_distinct_fixed_colors' panicked at 'assertion failed: `(left == right)`
  left: `107.21254717619618`,
 right: `109.44885365121317`', src/distinct.rs:456:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

You can see the full build logs for each arch here: https://cloud.drone.io/alpinelinux/aports/12236

sharkdp commented 4 years ago

Thank you for reporting this. I can see the same error in 32bit i686 builds which I just enabled (#98).

Don't worry about the unit test failure. We shouldn't have added this test. It relied on comparing precise floating point values, which is never a good idea. I disabled the test in #98.

I am packaging the project for alpine linux (see alpinelinux/aports#11597)

Awesome, thank you!