aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBastien Bouclet2017-01-14 10:36:04 +0100
committerBastien Bouclet2017-01-14 10:36:04 +0100
commitce343f7168f52a7288611ee48126e1b31b548095 (patch)
treeeb7b7116704e84a24557db8da9a9580382dd7bfa /test
parent77818e968392301eacf718a56518ea1b63815c72 (diff)
downloadscummvm-rg350-ce343f7168f52a7288611ee48126e1b31b548095.tar.gz
scummvm-rg350-ce343f7168f52a7288611ee48126e1b31b548095.tar.bz2
scummvm-rg350-ce343f7168f52a7288611ee48126e1b31b548095.zip
TESTS: Fix building Common::Span test on big endian systems
Diffstat (limited to 'test')
-rw-r--r--test/common/span.h16
1 files changed, 8 insertions, 8 deletions
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<uint16>(0, 2).size(), 1U);
TS_ASSERT_EQUALS(span.subspan<uint16>(0, 2).byteSize(), 2U);
-#ifdef SCUMM_LITTLE_ENDIAN
+#if defined(SCUMM_LITTLE_ENDIAN)
TS_ASSERT_EQUALS(span.subspan<uint16>(0)[1], 4 << 8 | 3);
-#elif SCUMM_BIG_ENDIAN
+#elif defined(SCUMM_BIG_ENDIAN)
TS_ASSERT_EQUALS(span.subspan<uint16>(0)[1], 3 << 8 | 4);
#else
#error No endianness detected
@@ -559,9 +559,9 @@ public:
TS_ASSERT_EQUALS(span.subspan<uint16>(0, 2).size(), 1U);
TS_ASSERT_EQUALS(span.subspan<uint16>(0, 2).byteSize(), 2U);
-#ifdef SCUMM_LITTLE_ENDIAN
+#if defined(SCUMM_LITTLE_ENDIAN)
TS_ASSERT_EQUALS(span.subspan<uint16>(0)[1], 4 << 8 | 3);
-#elif SCUMM_BIG_ENDIAN
+#elif defined(SCUMM_BIG_ENDIAN)
TS_ASSERT_EQUALS(span.subspan<uint16>(0)[1], 3 << 8 | 4);
#else
#error No endianness detected