summaryrefslogtreecommitdiffstats
path: root/tools/test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test')
-rw-r--r--tools/test/h5dump/CMakeTests.cmake15
-rw-r--r--tools/test/h5dump/testh5dump.sh.in9
-rw-r--r--tools/test/misc/talign.c35
3 files changed, 19 insertions, 40 deletions
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index f17b116..ae4649a 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -62,7 +62,8 @@
${HDF5_TOOLS_DIR}/testfiles/tbin4.ddl
${HDF5_TOOLS_DIR}/testfiles/tbinregR.ddl
${HDF5_TOOLS_DIR}/testfiles/tbigdims.ddl
- ${HDF5_TOOLS_DIR}/testfiles/tbitnopaque.ddl
+ ${HDF5_TOOLS_DIR}/testfiles/tbitnopaque_be.ddl
+ ${HDF5_TOOLS_DIR}/testfiles/tbitnopaque_le.ddl
${HDF5_TOOLS_DIR}/testfiles/tboot1.ddl
${HDF5_TOOLS_DIR}/testfiles/tboot2.ddl
${HDF5_TOOLS_DIR}/testfiles/tboot2A.ddl
@@ -810,8 +811,10 @@
tbinregR.out.err
tbigdims.out
tbigdims.out.err
- tbitnopaque.out
- tbitnopaque.out.err
+ tbitnopaque_be.out
+ tbitnopaque_be.out.err
+ tbitnopaque_le.out
+ tbitnopaque_le.out.err
tboot1.out
tboot1.out.err
tboot2.out
@@ -1172,7 +1175,11 @@
ADD_H5_TEST (tcomp-4 0 --enable-error-stack tcompound_complex.h5)
ADD_H5_TEST (tcompound_complex2 0 --enable-error-stack tcompound_complex2.h5)
# tests for bitfields and opaque data types
- ADD_H5_TEST (tbitnopaque 0 --enable-error-stack tbitnopaque.h5)
+ if (H5_WORDS_BIGENDIAN)
+ ADD_H5_TEST (tbitnopaque_be 0 --enable-error-stack tbitnopaque.h5)
+ else ()
+ ADD_H5_TEST (tbitnopaque_le 0 --enable-error-stack tbitnopaque.h5)
+ endif ()
#test for the nested compound type
ADD_H5_TEST (tnestcomp-1 0 --enable-error-stack tnestedcomp.h5)
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index 7edaedd..ef6c4d8 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -218,7 +218,8 @@ $SRC_H5DUMP_TESTFILES/tbin3.ddl
$SRC_H5DUMP_TESTFILES/tbin4.ddl
$SRC_H5DUMP_TESTFILES/tbinregR.ddl
$SRC_H5DUMP_TESTFILES/tbigdims.ddl
-$SRC_H5DUMP_TESTFILES/tbitnopaque.ddl
+$SRC_H5DUMP_TESTFILES/tbitnopaque_be.ddl
+$SRC_H5DUMP_TESTFILES/tbitnopaque_le.ddl
$SRC_H5DUMP_TESTFILES/tboot1.ddl
$SRC_H5DUMP_TESTFILES/tboot2.ddl
$SRC_H5DUMP_TESTFILES/tboot2A.ddl
@@ -1062,7 +1063,11 @@ TOOLTEST4 tcomp-3.ddl --enable-error-stack -t /#6632 -g /group2 tcompound.h5
TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5
TOOLTEST tcompound_complex2.ddl --enable-error-stack tcompound_complex2.h5
# tests for bitfields and opaque data types
-TOOLTEST tbitnopaque.ddl --enable-error-stack tbitnopaque.h5
+if test $WORDS_BIGENDIAN != "yes"; then
+TOOLTEST tbitnopaque_le.ddl --enable-error-stack tbitnopaque.h5
+else
+TOOLTEST tbitnopaque_be.ddl --enable-error-stack tbitnopaque.h5
+fi
#test for the nested compound type
TOOLTEST tnestcomp-1.ddl --enable-error-stack tnestedcomp.h5
diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c
index d905e37..9a72557 100644
--- a/tools/test/misc/talign.c
+++ b/tools/test/misc/talign.c
@@ -86,8 +86,7 @@ int main(void)
H5Tinsert(cmp, "Not Ok", sizeof(fok) + sizeof(string5), array_dt);
H5Tclose(array_dt);
- fix = h5tools_get_native_type(cmp);
-
+ fix = H5Tget_native_type(cmp, H5T_DIR_DEFAULT);
cmp1 = H5Tcreate(H5T_COMPOUND, sizeof(fok));
cdim[0] = sizeof(fok) / sizeof(float);
@@ -208,35 +207,3 @@ out:
return result;
}
-/*-------------------------------------------------------------------------
- * Function: h5tools_get_native_type
- *
- * Purpose: Wrapper around H5Tget_native_type() to work around
- * Problems with bitfields.
- *
- * Return: Success: datatype ID
- *
- * Failure: FAIL
- *
- * Programmer: Quincey Koziol
- * Tuesday, October 5, 2004
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-hid_t
-h5tools_get_native_type(hid_t type)
-{
- hid_t p_type;
- H5T_class_t type_class;
-
- type_class = H5Tget_class(type);
- if(type_class==H5T_BITFIELD)
- p_type=H5Tcopy(type);
- else
- p_type = H5Tget_native_type(type,H5T_DIR_DEFAULT);
-
- return(p_type);
-}
-