From ce343f7168f52a7288611ee48126e1b31b548095 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sat, 14 Jan 2017 10:36:04 +0100 Subject: TESTS: Fix building Common::Span test on big endian systems --- test/common/span.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/common/span.h b/test/common/span.h index d73a2e2266..d9b1d3120e 100644 --- a/test/common/span.h +++ b/test/common/span.h @@ -209,9 +209,9 @@ public: TS_ASSERT_EQUALS((it + 5).getInt16LE(), -255); TS_ASSERT_EQUALS((it + 5).getUint16LE(), 65281U); TS_ASSERT_EQUALS(it.getUint24LE(), 131583U); -#ifdef SCUMM_LITTLE_ENDIAN +#if defined(SCUMM_LITTLE_ENDIAN) TS_ASSERT_EQUALS((it + 3).getUint32(), 4278256131U); -#elif SCUMM_BIG_ENDIAN +#elif defined(SCUMM_BIG_ENDIAN) TS_ASSERT_EQUALS(it.getUint32(), 4278256131U); #else #error No endianness detected @@ -480,9 +480,9 @@ public: TS_ASSERT_EQUALS(span.getInt32LEAt(3), -16711165); TS_ASSERT_EQUALS(span.getUint32LEAt(3), 4278256131U); -#ifdef SCUMM_LITTLE_ENDIAN +#if defined(SCUMM_LITTLE_ENDIAN) TS_ASSERT_EQUALS(span.getUint32At(3), 4278256131U); -#elif SCUMM_BIG_ENDIAN +#elif defined(SCUMM_BIG_ENDIAN) TS_ASSERT_EQUALS(span.getUint32At(0), 4278256131U); #else #error No endianness detected @@ -529,9 +529,9 @@ public: TS_ASSERT_EQUALS(span.subspan(0, 2).size(), 1U); TS_ASSERT_EQUALS(span.subspan(0, 2).byteSize(), 2U); -#ifdef SCUMM_LITTLE_ENDIAN +#if defined(SCUMM_LITTLE_ENDIAN) TS_ASSERT_EQUALS(span.subspan(0)[1], 4 << 8 | 3); -#elif SCUMM_BIG_ENDIAN +#elif defined(SCUMM_BIG_ENDIAN) TS_ASSERT_EQUALS(span.subspan(0)[1], 3 << 8 | 4); #else #error No endianness detected @@ -559,9 +559,9 @@ public: TS_ASSERT_EQUALS(span.subspan(0, 2).size(), 1U); TS_ASSERT_EQUALS(span.subspan(0, 2).byteSize(), 2U); -#ifdef SCUMM_LITTLE_ENDIAN +#if defined(SCUMM_LITTLE_ENDIAN) TS_ASSERT_EQUALS(span.subspan(0)[1], 4 << 8 | 3); -#elif SCUMM_BIG_ENDIAN +#elif defined(SCUMM_BIG_ENDIAN) TS_ASSERT_EQUALS(span.subspan(0)[1], 3 << 8 | 4); #else #error No endianness detected -- cgit v1.2.3