Re: help with an upstream test suite problem?
A quick look at the rest of the code shows that util.h tests
which probably doesn't work because it needs the right header.
#if BYTE_ORDER == LITTLE_ENDIAN
works under Linux, though it probably isn't portable.
On Wed, 23 Nov 2005, Paul Wise wrote:
> 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:
> Buildd logs are available here: