diff options
author | Steve Huston <shuston@riverace.com> | 2009-12-07 16:20:41 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2009-12-07 16:20:41 +0000 |
commit | 37f33163d4cb477333797d7b33fee2a33396d608 (patch) | |
tree | 836bbda7c536d31ae5afa702f0d85464b3ecd729 /ACE/tests/Basic_Types_Test.cpp | |
parent | 31c82fb4c8eeea2934f6fd275d75024c38a72a17 (diff) | |
download | ATCD-37f33163d4cb477333797d7b33fee2a33396d608.tar.gz |
ChangeLogTag:Mon Dec 7 16:09:18 UTC 2009 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ACE/tests/Basic_Types_Test.cpp')
-rw-r--r-- | ACE/tests/Basic_Types_Test.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ACE/tests/Basic_Types_Test.cpp b/ACE/tests/Basic_Types_Test.cpp index 7a864720841..548357e25f4 100644 --- a/ACE/tests/Basic_Types_Test.cpp +++ b/ACE/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"))); |