Subject: | t/Image/Bar.t tests fails on big endinan plarforms |
1.45 introduced t/Image/Bar.t tests. The tests fail on big endian platform like this:
# Failed test 'imRGB ropCopy'
# at t/Image/Bar.t line 26.
# 005634005634005634005634 (actual)
# 123456123456123456123456 (expected)
# Failed test 'imRGB ropOrPut'
# at t/Image/Bar.t line 26.
# 00f6f400f6f400f6f400f6f4 (actual)
# f2f4f6f2f4f6f2f4f6f2f4f6 (expected)
# Looks like you failed 2 tests of 1133.
t/Image/Bar.t ...........
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/1133 subtests
For example here <http://ppc.koji.fedoraproject.org/koji/packageinfo?packageID=16932> is a history of Prima builds, you can see first failing version is 1.45. Here <http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3224166> you can see build on little-endian 64-bit PowerPC passed, while build on big-endian 64-bit PowerPC failed.
One of the failing tests is:
$i->set(
type => im::RGB,
color => 0x563412,
);
$i->bar(0,0,3,0);
is_bytes( $i->data, "\x12\x34\x56" x 4, "imRGB ropCopy");
I believe you compare in-memory representation of 0x563412 that depends on architecture. However, it's not the only bug because otherwise the the bytes were reordered only. So probably there is another bug.