summaryrefslogtreecommitdiffstats
path: root/c++/test
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2016-10-23 15:54:33 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2016-10-23 15:59:44 (GMT)
commit7f7248220a1cb03535b1e9f9dee905070e999d11 (patch)
tree5363e094c1119c9939dff250f3d54d8281f31ea7 /c++/test
parentc6e1b8f6aa46c6eb0186c16ac923761b9764b06a (diff)
downloadhdf5-7f7248220a1cb03535b1e9f9dee905070e999d11.zip
hdf5-7f7248220a1cb03535b1e9f9dee905070e999d11.tar.gz
hdf5-7f7248220a1cb03535b1e9f9dee905070e999d11.tar.bz2
Purpose: Fix HDFFV-9532
Description: Removed obsolete macros from C++ API library and tests: H5_NO_NAMESPACE and __cplusplus Leave OLD_HEADER_FILENAME because iostream.h might still be in use, until further checking is done. Leave H5_NO_STD to consider retiring H5std_string first. Platforms tested: Linux/32 2.6 (jam) Linux/64 (jelly) Darwin (osx1010test)
Diffstat (limited to 'c++/test')
-rw-r--r--c++/test/dsets.cpp8
-rw-r--r--c++/test/h5cpputil.cpp7
-rw-r--r--c++/test/h5cpputil.h6
-rw-r--r--c++/test/tarray.cpp11
-rw-r--r--c++/test/tattr.cpp11
-rw-r--r--c++/test/tcompound.cpp11
-rw-r--r--c++/test/tdspl.cpp11
-rw-r--r--c++/test/testhdf5.cpp7
-rw-r--r--c++/test/tfile.cpp11
-rw-r--r--c++/test/tfilter.cpp11
-rw-r--r--c++/test/th5s.cpp11
-rw-r--r--c++/test/tlinks.cpp11
-rw-r--r--c++/test/tobject.cpp11
-rw-r--r--c++/test/trefer.cpp9
-rw-r--r--c++/test/ttypes.cpp11
-rw-r--r--c++/test/tvlstr.cpp11
16 files changed, 14 insertions, 144 deletions
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp
index 7dcda0d..a9191d1 100644
--- a/c++/test/dsets.cpp
+++ b/c++/test/dsets.cpp
@@ -32,18 +32,14 @@
#endif
#include <string>
-#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cerr;
using std::endl;
#endif // H5_NO_STD
-#endif
#include "H5Cpp.h" // C++ API header file
-#ifndef H5_NO_NAMESPACE
using namespace H5;
-#endif
#include "h5cpputil.h" // C++ utilility header file
@@ -1175,9 +1171,7 @@ test_types(H5File& file)
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void test_dset()
{
hid_t fapl_id;
@@ -1235,9 +1229,7 @@ void test_dset()
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void cleanup_dsets()
{
HDremove(FILE1.c_str());
diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp
index f56782f..60dbf6c 100644
--- a/c++/test/h5cpputil.cpp
+++ b/c++/test/h5cpputil.cpp
@@ -28,19 +28,14 @@
#endif
#include <string>
-#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cerr;
using std::endl;
#endif // H5_NO_STD
-#endif
#include "h5test.h"
#include "H5Cpp.h"
-
-#ifndef H5_NO_NAMESPACE
- using namespace H5;
-#endif
+using namespace H5;
#include "h5cpputil.h"
diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h
index b615194..ede6850 100644
--- a/c++/test/h5cpputil.h
+++ b/c++/test/h5cpputil.h
@@ -26,9 +26,7 @@
#include "h5test.h"
-#ifndef H5_NO_NAMESPACE
using namespace H5;
-#endif
#ifndef H5_NO_STD
using std::cerr;
@@ -129,9 +127,7 @@ template <class Type1, class Type2>
/* Prototypes for the test routines */
-#ifdef __cplusplus
extern "C" {
-#endif
void test_array();
void test_attr();
void test_compound();
@@ -161,9 +157,7 @@ void cleanup_reference();
void cleanup_types();
void cleanup_vlstrings();
-#ifdef __cplusplus
}
-#endif
/* not yet
void cleanup_select(void);
diff --git a/c++/test/tarray.cpp b/c++/test/tarray.cpp
index 441ef81..1da9e0c 100644
--- a/c++/test/tarray.cpp
+++ b/c++/test/tarray.cpp
@@ -26,18 +26,13 @@
#endif
#include <string>
-#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cerr;
using std::endl;
#endif // H5_NO_STD
-#endif
#include "H5Cpp.h" // C++ API header file
-
-#ifndef H5_NO_NAMESPACE
- using namespace H5;
-#endif
+using namespace H5;
#include "h5cpputil.h" // C++ utilility header file
@@ -478,9 +473,7 @@ static void test_array_info()
** test_array(): Main datatypes testing routine.
**
****************************************************************/
-#ifdef __cplusplus
extern "C"
-#endif
void test_array()
{
// Output message about test being performed
@@ -512,9 +505,7 @@ void test_array()
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void cleanup_array()
{
HDremove(FILENAME.c_str());
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index d20466e..a739618 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -27,18 +27,13 @@
#endif
#include <string>
-#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cerr;
using std::endl;
#endif // H5_NO_STD
-#endif
#include "H5Cpp.h" // C++ API header file
-
-#ifndef H5_NO_NAMESPACE
- using namespace H5;
-#endif
+using namespace H5;
#include "h5cpputil.h" // C++ utilility header file
@@ -1783,9 +1778,7 @@ static void test_attr_corder_create_basic(FileCreatPropList& fcpl,
** test_attr(): Main attribute testing routine.
**
****************************************************************/
-#ifdef __cplusplus
extern "C"
-#endif
void test_attr()
{
// Output message about test being performed
@@ -1883,9 +1876,7 @@ void test_attr()
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void cleanup_attr()
{
HDremove(FILE_BASIC.c_str());
diff --git a/c++/test/tcompound.cpp b/c++/test/tcompound.cpp
index e293ded..c334e28 100644
--- a/c++/test/tcompound.cpp
+++ b/c++/test/tcompound.cpp
@@ -26,18 +26,13 @@
#endif
#include <string>
-#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cerr;
using std::endl;
#endif // H5_NO_STD
-#endif
#include "H5Cpp.h" // C++ API header file
-
-#ifndef H5_NO_NAMESPACE
- using namespace H5;
-#endif
+using namespace H5;
#include "h5cpputil.h" // C++ utilility header file
@@ -832,9 +827,7 @@ static void test_compound_set_size()
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void test_compound()
{
// Output message about test being performed
@@ -863,9 +856,7 @@ void test_compound()
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void cleanup_compound()
{
HDremove(COMPFILE.c_str());
diff --git a/c++/test/tdspl.cpp b/c++/test/tdspl.cpp
index ab93c26..3c04b67 100644
--- a/c++/test/tdspl.cpp
+++ b/c++/test/tdspl.cpp
@@ -27,18 +27,13 @@
#endif
#include <string>
-#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cerr;
using std::endl;
#endif // H5_NO_STD
-#endif
#include "H5Cpp.h" // C++ API header file
-
-#ifndef H5_NO_NAMESPACE
- using namespace H5;
-#endif
+using namespace H5;
#include "h5cpputil.h" // C++ utilility header file
@@ -126,9 +121,7 @@ static void test_transfplist()
** test_dsproplist(): Main dataset property list testing routine.
**
****************************************************************/
-#ifdef __cplusplus
extern "C"
-#endif
void test_dsproplist()
{
// Output message about test being performed
@@ -139,9 +132,7 @@ void test_dsproplist()
} // test_dsproplist()
-#ifdef __cplusplus
extern "C"
-#endif
void cleanup_dsproplist()
{
HDremove(FILENAME.c_str());
diff --git a/c++/test/testhdf5.cpp b/c++/test/testhdf5.cpp
index dbf7e3e..21a5a7d 100644
--- a/c++/test/testhdf5.cpp
+++ b/c++/test/testhdf5.cpp
@@ -48,19 +48,14 @@
#endif
#include <string>
-#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cerr;
using std::endl;
#endif // H5_NO_STD
-#endif
#include "h5test.h" // C test header file
#include "H5Cpp.h" // C++ API header file
-
-#ifndef H5_NO_NAMESPACE
- using namespace H5;
-#endif /* !H5_NO_NAMESPACE */
+using namespace H5;
#include "h5cpputil.h" // C++ utilility header file
diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp
index b40b34c..11cc33e 100644
--- a/c++/test/tfile.cpp
+++ b/c++/test/tfile.cpp
@@ -30,18 +30,13 @@
#endif
#include <string>
-#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cerr;
using std::endl;
#endif // H5_NO_STD
-#endif
#include "H5Cpp.h" // C++ API header file
-
-#ifndef H5_NO_NAMESPACE
- using namespace H5;
-#endif
+using namespace H5;
#include "h5cpputil.h" // C++ utilility header file
@@ -755,9 +750,7 @@ static void test_libver_bounds()
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void test_file()
{
// Output message about test being performed
@@ -785,9 +778,7 @@ void test_file()
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void cleanup_file()
{
HDremove(FILE1.c_str());
diff --git a/c++/test/tfilter.cpp b/c++/test/tfilter.cpp
index 19549b3..101ec07 100644
--- a/c++/test/tfilter.cpp
+++ b/c++/test/tfilter.cpp
@@ -26,18 +26,13 @@
#endif
#include <string>
-#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cerr;
using std::endl;
#endif // H5_NO_STD
-#endif
#include "H5Cpp.h" // C++ API header file
-
-#ifndef H5_NO_NAMESPACE
- using namespace H5;
-#endif
+using namespace H5;
#include "h5cpputil.h" // C++ utilility header file
@@ -258,9 +253,7 @@ static void test_szip_filter(H5File& file1)
**
****************************************************************/
const H5std_string FILE1("tfilters.h5");
-#ifdef __cplusplus
extern "C"
-#endif
void test_filters()
{
// Output message about test being performed
@@ -300,9 +293,7 @@ void test_filters()
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void cleanup_filters()
{
HDremove(FILE1.c_str());
diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp
index 7ef048b..16d1c57 100644
--- a/c++/test/th5s.cpp
+++ b/c++/test/th5s.cpp
@@ -29,18 +29,13 @@
#endif
#include <string>
-#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cerr;
using std::endl;
#endif // H5_NO_STD
-#endif
#include "H5Cpp.h" // C++ API header file
-
-#ifndef H5_NO_NAMESPACE
- using namespace H5;
-#endif
+using namespace H5;
#include "h5cpputil.h" // C++ utilility header file
#include "H5srcdir.h" // srcdir querying header file
@@ -566,9 +561,7 @@ static void test_h5s_compound_scalar_read()
* Modifications:
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void test_h5s()
{
// Output message about test being performed
@@ -597,9 +590,7 @@ void test_h5s()
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void cleanup_h5s()
{
HDremove(DATAFILE.c_str());
diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp
index 025fedc..2b05764 100644
--- a/c++/test/tlinks.cpp
+++ b/c++/test/tlinks.cpp
@@ -26,18 +26,13 @@
#endif
#include <string>
-#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cerr;
using std::endl;
#endif // H5_NO_STD
-#endif
#include "H5Cpp.h" // C++ API header file
-
-#ifndef H5_NO_NAMESPACE
- using namespace H5;
-#endif
+using namespace H5;
#include "h5cpputil.h" // C++ test utilility header file
@@ -460,9 +455,7 @@ static void test_basic_links(hid_t fapl_id, hbool_t new_format)
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void test_links()
{
hid_t fapl_id, fapl2_id; /* File access property lists */
@@ -651,9 +644,7 @@ void test_links()
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void cleanup_links()
{
HDremove(FILENAME[0]);
diff --git a/c++/test/tobject.cpp b/c++/test/tobject.cpp
index 046e67a..aa6baf3 100644
--- a/c++/test/tobject.cpp
+++ b/c++/test/tobject.cpp
@@ -26,18 +26,13 @@
#endif
#include <string>
-#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cerr;
using std::endl;
#endif // H5_NO_STD
-#endif
#include "H5Cpp.h" // C++ API header file
-
-#ifndef H5_NO_NAMESPACE
- using namespace H5;
-#endif
+using namespace H5;
#include "h5cpputil.h" // C++ utilility header file
@@ -319,9 +314,7 @@ static void test_get_objtype()
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void test_object()
{
// Output message about test being performed
@@ -346,9 +339,7 @@ void test_object()
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void cleanup_object()
{
HDremove(FILE_OBJECTS.c_str());
diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp
index d7c237f..e3499aa 100644
--- a/c++/test/trefer.cpp
+++ b/c++/test/trefer.cpp
@@ -28,10 +28,7 @@
#include <string>
#include "H5Cpp.h" // C++ API header file
-
-#ifndef H5_NO_NAMESPACE
- using namespace H5;
-#endif
+using namespace H5;
#include "h5cpputil.h" // C++ utilility header file
@@ -806,9 +803,7 @@ static void test_reference_compat(void)
** test_reference(): Main reference testing routine.
**
****************************************************************/
-#ifdef __cplusplus
extern "C"
-#endif
void test_reference(void)
{
// Output message about test being performed
@@ -829,9 +824,7 @@ void test_reference(void)
** Purpose: Cleanup temporary test files
** Return: none
****************************************************************/
-#ifdef __cplusplus
extern "C"
-#endif
void cleanup_reference(void)
{
HDremove(FILE1.c_str());
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index 217b7b9..b77abf2 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -26,18 +26,13 @@
#endif
#include <string>
-#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cerr;
using std::endl;
#endif // H5_NO_STD
-#endif
#include "H5Cpp.h" // C++ API header file
-
-#ifndef H5_NO_NAMESPACE
- using namespace H5;
-#endif
+using namespace H5;
#include "h5cpputil.h" // C++ utilility header file
@@ -546,9 +541,7 @@ static void test_named ()
** test_types(): Main datatypes testing routine.
**
****************************************************************/
-#ifdef __cplusplus
extern "C"
-#endif
void test_types()
{
// Output message about test being performed
@@ -578,9 +571,7 @@ void test_types()
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void cleanup_types()
{
for (int i = 0; i < 3; i++)
diff --git a/c++/test/tvlstr.cpp b/c++/test/tvlstr.cpp
index 6ec7f25..a3e54c2 100644
--- a/c++/test/tvlstr.cpp
+++ b/c++/test/tvlstr.cpp
@@ -28,18 +28,13 @@
#endif
#include <string>
-#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cerr;
using std::endl;
#endif // H5_NO_STD
-#endif
#include "H5Cpp.h" // C++ API header file
-
-#ifndef H5_NO_NAMESPACE
- using namespace H5;
-#endif
+using namespace H5;
#include "h5cpputil.h" // C++ utilility header file
@@ -958,9 +953,7 @@ static void test_vl_rewrite()
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void test_vlstrings()
{
// Output message about test being performed
@@ -1000,9 +993,7 @@ void test_vlstrings()
*
*-------------------------------------------------------------------------
*/
-#ifdef __cplusplus
extern "C"
-#endif
void cleanup_vlstrings()
{
HDremove(FILENAME.c_str());