summaryrefslogtreecommitdiff
path: root/tests/Basic_Types_Test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Basic_Types_Test.cpp')
-rw-r--r--tests/Basic_Types_Test.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/Basic_Types_Test.cpp b/tests/Basic_Types_Test.cpp
index 7a864720841..2372defb539 100644
--- a/tests/Basic_Types_Test.cpp
+++ b/tests/Basic_Types_Test.cpp
@@ -290,10 +290,19 @@ run_main (int, ACE_TCHAR *[])
++errors;
}
+ ACE_UINT16 test_val = 123;
#if defined (ACE_LITTLE_ENDIAN)
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("little endian\n")));
+ if (ACE_HTONS (test_val) == test_val)
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Endian test: %d == %d but should be different\n"),
+ ACE_HTONS (test_val), test_val));
#elif defined (ACE_BIG_ENDIAN)
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("big endian\n")));
+ if (ACE_HTONS (test_val) != test_val)
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("Endian test: %d != %d but should be equal\n"),
+ ACE_HTONS (test_val), test_val));
#else
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("assertion failed: no ACE_*_ENDIAN definition!\n")));