Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests failing on 32 bits architecture #24

Open
lucaskanashiro opened this issue Nov 24, 2021 · 0 comments
Open

Tests failing on 32 bits architecture #24

lucaskanashiro opened this issue Nov 24, 2021 · 0 comments

Comments

@lucaskanashiro
Copy link

In Debian and Ubuntu, the following tests are failing when executed in armhf (32bits):

  1) OilyPNG::Color#compose_quick should use the background color as is when a fully transparent pixel is given as foreground color
     Failure/Error: expect(compose_quick(@fully_transparent, @white)).to be(@white)

       expected #<Integer:820> => 4294967295
            got #<Integer:830> => 4294967295

       Compared using equal?, which compares object identity,
       but expected and actual are not the same object. Use
       `expect(actual).to eq(expected)` if you don't care about
       object identity in this example.
     # ./spec/color_spec.rb:24:in `block (3 levels) in <top (required)>'

  2) OilyPNG::Color#compose_quick should compose pixels correctly
     Failure/Error: expect(compose_quick(@non_opaque, @white)).to be(0x9fc2d6ff)

       expected #<Integer:840> => 2680346367
            got #<Integer:850> => 2680346367

       Compared using equal?, which compares object identity,
       but expected and actual are not the same object. Use
       `expect(actual).to eq(expected)` if you don't care about
       object identity in this example.
     # ./spec/color_spec.rb:28:in `block (3 levels) in <top (required)>'

  3) OilyPNG::Color#compose_quick should compose colors exactly the same as ChunkyPNG
     Failure/Error: expect(compose_quick(fg, bg)).to be(ChunkyPNG::Color.compose_quick(fg, bg))

       expected #<Integer:860> => 2126858483
            got #<Integer:870> => 2126858483

       Compared using equal?, which compares object identity,
       but expected and actual are not the same object. Use
       `expect(actual).to eq(expected)` if you don't care about
       object identity in this example.
     # ./spec/color_spec.rb:33:in `block (3 levels) in <top (required)>'

Debian bug as reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=999650

I tried to change the expect(value).to be(expected) to expect(value).to eq(expected) and the tests pass, but I am not sure if this is the right fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant