diff options
author | Brad King <brad.king@kitware.com> | 2005-07-26 15:36:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-07-26 15:36:39 (GMT) |
commit | a5483acc0ec3c86fff58f861be04a9da4fa0f5fa (patch) | |
tree | 0596329962d19a57ab769af61e64dc43db7fde96 | |
parent | b9d472d81dd5c2e12583aa0a8447e9eaa2d8ed50 (diff) | |
download | CMake-a5483acc0ec3c86fff58f861be04a9da4fa0f5fa.zip CMake-a5483acc0ec3c86fff58f861be04a9da4fa0f5fa.tar.gz CMake-a5483acc0ec3c86fff58f861be04a9da4fa0f5fa.tar.bz2 |
ENH: Added TEST_KWSYS_CXX_SAME_LONG_AND___INT64, TEST_KWSYS_CXX_SAME_LONG_LONG_AND___INT64, TEST_KWSYS_CAN_CONVERT_UI64_TO_DOUBLE, and TEST_KWSYS_CHAR_IS_SIGNED.
-rw-r--r-- | Source/kwsys/kwsysPlatformCxxTests.cxx | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Source/kwsys/kwsysPlatformCxxTests.cxx b/Source/kwsys/kwsysPlatformCxxTests.cxx index fa06a50..4187bcc 100644 --- a/Source/kwsys/kwsysPlatformCxxTests.cxx +++ b/Source/kwsys/kwsysPlatformCxxTests.cxx @@ -221,3 +221,47 @@ int main() return 0; } #endif + +#ifdef TEST_KWSYS_CXX_SAME_LONG_AND___INT64 +void function(long**) {} +int main() +{ + __int64** p = 0; + function(p); + return 0; +} +#endif + +#ifdef TEST_KWSYS_CXX_SAME_LONG_LONG_AND___INT64 +void function(long long**) {} +int main() +{ + __int64** p = 0; + function(p); + return 0; +} +#endif + +#ifdef TEST_KWSYS_CAN_CONVERT_UI64_TO_DOUBLE +void function(double& l, unsigned __int64 const& r) +{ + l = static_cast<double>(r); +} + +int main() +{ + double tTo = 0.0; + unsigned __int64 tFrom = 0; + function(tTo, tFrom); + return 0; +} +#endif + +#ifdef TEST_KWSYS_CHAR_IS_SIGNED +/* Return 1 for char signed and 0 for char unsigned. */ +int main() +{ + unsigned char uc = 255; + return (*reinterpret_cast<char*>(&uc) < 0)?1:0; +} +#endif |