From daac7668cbb19a857d565cd917b15c3451915db9 Mon Sep 17 00:00:00 2001 From: malaterre Date: Sun, 29 May 2005 23:06:41 +0000 Subject: [PATCH] ENH: Adding the long long/ __int64 mess --- CMake/gdcmTestCompareTypes.cxx | 31 ++++++++++++++++++++++++++++++ CMake/gdcmTestConvertTypes.cxx | 35 ++++++++++++++++++++++++++++++++++ CMake/gdcmTestFUNCTION.cxx | 18 +++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 CMake/gdcmTestCompareTypes.cxx create mode 100644 CMake/gdcmTestConvertTypes.cxx diff --git a/CMake/gdcmTestCompareTypes.cxx b/CMake/gdcmTestCompareTypes.cxx new file mode 100644 index 00000000..bad59da1 --- /dev/null +++ b/CMake/gdcmTestCompareTypes.cxx @@ -0,0 +1,31 @@ +/*========================================================================= + + Program: gdcm + Module: $RCSfile: gdcmTestCompareTypes.cxx,v $ + Language: C++ + Date: $Date: 2005/05/29 23:06:41 $ + Version: $Revision: 1.1 $ + + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de + l'Image). All rights reserved. See Doc/License.txt or + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#define TYPE_LONG_LONG long long + +typedef GDCM_TEST_COMPARE_TYPE_1 Type1; +typedef GDCM_TEST_COMPARE_TYPE_2 Type2; + +void function(Type1**) {} + +int main() +{ + Type2** p = 0; + function(p); + return 0; +} diff --git a/CMake/gdcmTestConvertTypes.cxx b/CMake/gdcmTestConvertTypes.cxx new file mode 100644 index 00000000..18413ff1 --- /dev/null +++ b/CMake/gdcmTestConvertTypes.cxx @@ -0,0 +1,35 @@ +/*========================================================================= + + Program: gdcm + Module: $RCSfile: gdcmTestConvertTypes.cxx,v $ + Language: C++ + Date: $Date: 2005/05/29 23:06:41 $ + Version: $Revision: 1.1 $ + + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de + l'Image). All rights reserved. See Doc/License.txt or + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#define TYPE_UNSIGNED___INT64 unsigned __int64 + +typedef GDCM_TEST_CONVERT_TYPE_TO TypeTo; +typedef GDCM_TEST_CONVERT_TYPE_FROM TypeFrom; + +void function(TypeTo& l, TypeFrom const& r) +{ + l = static_cast(r); +} + +int main() +{ + TypeTo tTo = TypeTo(); + TypeFrom tFrom = TypeFrom(); + function(tTo, tFrom); + return 0; +} diff --git a/CMake/gdcmTestFUNCTION.cxx b/CMake/gdcmTestFUNCTION.cxx index db316f4e..9e1b2e0a 100644 --- a/CMake/gdcmTestFUNCTION.cxx +++ b/CMake/gdcmTestFUNCTION.cxx @@ -1,3 +1,21 @@ +/*========================================================================= + + Program: gdcm + Module: $RCSfile: gdcmTestFUNCTION.cxx,v $ + Language: C++ + Date: $Date: 2005/05/29 23:06:41 $ + Version: $Revision: 1.2 $ + + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de + l'Image). All rights reserved. See Doc/License.txt or + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + // Minimal test for existence of __FUNCTION__ pseudo-macro #include -- 2.45.1