[Scummvm-git-logs] scummvm master -> ce343f7168f52a7288611ee48126e1b31b548095

bgK bastien.bouclet at gmail.com
Sat Jan 14 10:38:24 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ce343f7168 TESTS: Fix building Common::Span test on big endian systems


Commit: ce343f7168f52a7288611ee48126e1b31b548095
    https://github.com/scummvm/scummvm/commit/ce343f7168f52a7288611ee48126e1b31b548095
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2017-01-14T10:36:04+01:00

Commit Message:
TESTS: Fix building Common::Span test on big endian systems

Changed paths:
    test/common/span.h


diff --git a/test/common/span.h b/test/common/span.h
index d73a2e2..d9b1d31 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





More information about the Scummvm-git-logs mailing list