aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-16 00:21:24 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:16:10 +0200
commit1c598695e433b9ac65887d156fcd78b10e6269de (patch)
tree130382519419264296bea7a00349b8a7ba95ecf5 /tests
parent8c486ac721e590b18650abaaa8a69b36dbcba806 (diff)
Optimize for little endian instead of big endian
Diffstat (limited to 'tests')
-rw-r--r--tests/main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/main.cpp b/tests/main.cpp
index 4b6c7a7..e879e6a 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -15,6 +15,15 @@ struct TestStruct
int main()
{
+#if BYTE_ORDER == BIG_ENDIAN
+ const char *endianessStr = "big";
+#elif BYTE_ORDER == LITTLE_ENDIAN
+ const char *endianessStr = "little";
+#else
+ const char *endianessStr = "Unknown";
+#endif
+ printf("System endianess: %s\n", endianessStr);
+
TestStruct expectedTestStruct;
expectedTestStruct.a = 0x38956326;
expectedTestStruct.b = 0x34;