Mercurial > hg > orthanc
changeset 642:a5f291f05bba
merge
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 29 Oct 2013 15:29:30 +0100 |
parents | 6270ae2688d6 (current diff) 900274ed996f (diff) |
children | 8d1382acee29 |
files | |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/UnitTestsSources/main.cpp Tue Oct 29 15:29:24 2013 +0100 +++ b/UnitTestsSources/main.cpp Tue Oct 29 15:29:30 2013 +0100 @@ -522,6 +522,23 @@ } +TEST(Toolbox, Endianness) +{ +#if defined(__powerpc__) || defined(__powerpc64__) + ASSERT_EQ(Endianness_Big, Toolbox::DetectEndianness()); +#endif + +#if defined(_WIN32) + ASSERT_EQ(Endianness_Little, Toolbox::DetectEndianness()); +#endif + +#if defined(__amd64__) || defined(__i386__) + ASSERT_EQ(Endianness_Little, Toolbox::DetectEndianness()); +#endif +} + + + int main(int argc, char **argv) { // Initialize Google's logging library.