[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

help with an upstream test suite problem?



Hi,

I recently enabled my upstream's cppunit test suite in an upload to
experimental and the endianess test failed on m68k. The test is
basically like so:

#define SWAP_ENDIAN_INT32(x) ( \
  (((x)&0xFF000000) >> 24) | \
  (((x)&0x00FF0000) >>  8) | \
  (((x)&0x0000FF00) <<  8) | \
  (((x)&0x000000FF) << 24) )

CPPUNIT_ASSERT_EQUAL( (int)0x78563412, (int)SWAP_ENDIAN_INT32(0x12345678) );

I've zero idea why this would fail on m68k (perhaps it is related to the
casts?), but the result was this:

Expected: 2018915346 (0x78563412)
Actual: 305419896 (0x12345678)

If anyone has time to explain what the problem is, that would be very
much appreciated.

The relevant source files are available here:

http://cvs.sourceforge.net/viewcvs.py/*checkout*/nsis/NSIS/Source/util.h
http://cvs.sourceforge.net/viewcvs.py/*checkout*/nsis/NSIS/Source/Tests/endian.cpp

Buildd logs are available here:

http://experimental.debian.net/fetch.php?&pkg=nsis&ver=2.11-1&arch=m68k&stamp=1132413921&file=log&as=raw

-- 
bye,
pabs

http://wiki.debian.org/PaulWise

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: