summaryrefslogtreecommitdiffstats
path: root/hl/c++/test/ptableTest.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2016-04-26 04:15:52 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2016-04-26 04:15:52 (GMT)
commit75b926c96aa0716e0936d6fa5dfad1142fe14331 (patch)
tree996eab51c6d95f13f3a2e1ceda0c5684c24b8d62 /hl/c++/test/ptableTest.cpp
parentcedc64c69564c18a3a6fdcb405efc98bc5cea7e5 (diff)
downloadhdf5-75b926c96aa0716e0936d6fa5dfad1142fe14331.zip
hdf5-75b926c96aa0716e0936d6fa5dfad1142fe14331.tar.gz
hdf5-75b926c96aa0716e0936d6fa5dfad1142fe14331.tar.bz2
[svn-r29803] Purpose: Code improvement
Description: The constructor FL_PacketTable added in 1.10.0 did not have good prototype; it didn't allow the property list to be default. Marked it deprecated and added this one: FL_PacketTable(hid_t fileID, const char* name, hid_t dtypeID, hsize_t chunkSize = 0, hid_t plistID = H5P_DEFAULT) Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
Diffstat (limited to 'hl/c++/test/ptableTest.cpp')
-rw-r--r--hl/c++/test/ptableTest.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/hl/c++/test/ptableTest.cpp b/hl/c++/test/ptableTest.cpp
index 18bf421..dd3d2ba 100644
--- a/hl/c++/test/ptableTest.cpp
+++ b/hl/c++/test/ptableTest.cpp
@@ -279,7 +279,7 @@ int TestCompress()
dscreatplist.setDeflate(6);
/* Create packet table with compression. */
- FL_PacketTable wrapper(fileID, dscreatplist.getId(), COMPRESS_PT, H5T_NATIVE_CHAR, 100);
+ FL_PacketTable wrapper(fileID, COMPRESS_PT, H5T_NATIVE_CHAR, 100, dscreatplist.getId());
/* Close the property list */
dscreatplist.close();
@@ -320,8 +320,9 @@ int TestGetPacket()
int i;
TESTING("GetPacket")
- /* Create a dataset. Explicitly specify no compression */
- FL_PacketTable wrapper(fileID, H5P_DEFAULT, PT_TESTGETPT, H5T_NATIVE_INT, 1);
+ /* Create a dataset. Does not need to specify property list because
+ there is no compression. */
+ FL_PacketTable wrapper(fileID, PT_TESTGETPT, H5T_NATIVE_INT, 1);
if(! wrapper.IsValid())
goto error;
@@ -358,7 +359,7 @@ int TestErrors()
TESTING("error conditions")
/* Create a dataset */
- FL_PacketTable wrapper(fileID, H5P_DEFAULT, PT_TESTERROR, H5T_NATIVE_INT, 1);
+ FL_PacketTable wrapper(fileID, PT_TESTERROR, H5T_NATIVE_INT, 1);
if(! wrapper.IsValid())
goto error;
@@ -480,7 +481,7 @@ int SystemTest()
int e;
} compoundType;
- dtypeID1 = H5Tcreate( H5T_COMPOUND, sizeof(compoundType));
+ dtypeID1 = H5Tcreate(H5T_COMPOUND, sizeof(compoundType));
H5Tinsert(dtypeID1, "abbey", HOFFSET( compoundType, a ), H5T_NATIVE_SHORT);
H5Tinsert(dtypeID1, "bert", HOFFSET( compoundType, b ), H5T_NATIVE_SHORT);
@@ -493,7 +494,7 @@ int SystemTest()
compoundType g;
} cType2;
- dtypeID2 = H5Tcreate ( H5T_COMPOUND, sizeof(cType2));
+ dtypeID2 = H5Tcreate(H5T_COMPOUND, sizeof(cType2));
H5Tinsert(dtypeID2, "f", HOFFSET( cType2, f ), H5T_NATIVE_CHAR);
H5Tinsert(dtypeID2, "g", HOFFSET( cType2, g ), dtypeID1);
@@ -505,8 +506,8 @@ int SystemTest()
ct2[0].g.c = 0;
ct2[0].g.e = 3000;
- /* Create the packet table datasets. Make one of them compressed. */
- FL_PacketTable wrapper1(fileID, H5P_DEFAULT, PT_SYSTEMTST1, dtypeID1, 1);
+ /* Create the packet table datasets. One used a deprecated constructor */
+ FL_PacketTable wrapper1(fileID, PT_SYSTEMTST1, dtypeID1, 1);
FL_PacketTable wrapper2(fileID, H5P_DEFAULT, PT_SYSTEMTST2, dtypeID2, 1);
if(! wrapper1.IsValid())