summaryrefslogtreecommitdiffstats
path: root/c++/test/ttypes.cpp
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-08-07 04:59:31 (GMT)
committerGitHub <noreply@github.com>2022-08-07 04:59:31 (GMT)
commit956282fa6f5f5b7df92be6f14c12681f7ecabbc9 (patch)
tree262418febb0a037f752e577ab632accd358edd93 /c++/test/ttypes.cpp
parent7127d8912c8fa601d59b4e8ce522eaf149c02344 (diff)
downloadhdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.zip
hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.tar.gz
hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.tar.bz2
Develop cmake clean (#1971)
Diffstat (limited to 'c++/test/ttypes.cpp')
-rw-r--r--c++/test/ttypes.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/c++/test/ttypes.cpp b/c++/test/ttypes.cpp
index c488f0e..b731d37 100644
--- a/c++/test/ttypes.cpp
+++ b/c++/test/ttypes.cpp
@@ -45,7 +45,8 @@ using namespace H5;
/* #include "H5Tpkg.h"
*/
-const char *FILENAME[] = {"dtypes1.h5", "dtypes2.h5", "dtypes3.h5", "dtypes4.h5", NULL};
+const char *FILENAME[] = {"dtypes1.h5", "dtypes2.h5", "dtypes3.h5", "dtypes4.h5",
+ "encode_decode.h5", "h5_type_operators.h5", NULL};
typedef enum flt_t { FLT_FLOAT, FLT_DOUBLE, FLT_LDOUBLE, FLT_OTHER } flt_t;
@@ -557,7 +558,6 @@ test_query()
* January, 2007
*-------------------------------------------------------------------------
*/
-const char *filename1 = "dtypes1.h5";
static void
test_transient()
@@ -568,7 +568,7 @@ test_transient()
try {
// Create the file and the dataspace.
- H5File file(filename1, H5F_ACC_TRUNC);
+ H5File file(FILENAME[0], H5F_ACC_TRUNC);
DataSpace space(2, ds_size, ds_size);
// Copying a predefined type results in a modifiable copy
@@ -637,7 +637,6 @@ test_transient()
* January, 2007
*-------------------------------------------------------------------------
*/
-const H5std_string filename2("dtypes2.h5");
static void
test_named()
@@ -649,7 +648,7 @@ test_named()
SUBTEST("Named datatypes");
try {
// Create the file.
- H5File file(filename2, H5F_ACC_TRUNC);
+ H5File file(FILENAME[1], H5F_ACC_TRUNC);
// Create a simple dataspace.
DataSpace space(2, ds_size, ds_size);
@@ -805,9 +804,8 @@ test_named()
* August, 2017
*-------------------------------------------------------------------------
*/
-const H5std_string filename3("encode_decode.h5");
-const int ARRAY1_RANK = 1;
-const int ARRAY1_DIM = 10;
+const int ARRAY1_RANK = 1;
+const int ARRAY1_DIM = 10;
static void
test_encode_decode()
@@ -817,7 +815,7 @@ test_encode_decode()
SUBTEST("DataType::encode() and DataType::decode()");
try {
// Create the file.
- H5File file(filename3, H5F_ACC_TRUNC);
+ H5File file(FILENAME[4], H5F_ACC_TRUNC);
//
// Test with CompType
@@ -1026,7 +1024,6 @@ test_encode_decode()
* August, 2017
*-------------------------------------------------------------------------
*/
-const H5std_string filename4("h5_type_operators.h5");
static void
test_operators()
@@ -1036,7 +1033,7 @@ test_operators()
SUBTEST("DataType::operator== and DataType::operator!=");
try {
// Create the file.
- H5File file(filename4, H5F_ACC_TRUNC);
+ H5File file(FILENAME[5], H5F_ACC_TRUNC);
//
// Test with CompType
@@ -1140,6 +1137,6 @@ test_types()
extern "C" void
cleanup_types()
{
- for (int i = 0; i < 3; i++)
+ for (int i = 0; i < 6; i++)
HDremove(FILENAME[i]);
} // cleanup_types