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.

This commit is contained in:
Brad King 2005-07-26 11:36:39 -04:00
parent b9d472d81d
commit a5483acc0e
1 changed files with 44 additions and 0 deletions

View File

@ -221,3 +221,47 @@ int main()
return 0; return 0;
} }
#endif #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