From a5483acc0ec3c86fff58f861be04a9da4fa0f5fa Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 26 Jul 2005 11:36:39 -0400 Subject: [PATCH] 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. --- Source/kwsys/kwsysPlatformCxxTests.cxx | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/Source/kwsys/kwsysPlatformCxxTests.cxx b/Source/kwsys/kwsysPlatformCxxTests.cxx index fa06a5000..4187bcc77 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(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(&uc) < 0)?1:0; +} +#endif