summaryrefslogtreecommitdiffstats
path: root/windows
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-05-18 18:38:06 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-05-18 18:38:06 (GMT)
commit38df150e1635103c44ec4c89ee9eff43a61ebc84 (patch)
treebeb7f6d69c8183f8f58479d2495b4103be7095a7 /windows
parent92a21ab279ff6798ab9d3b28b792a91e0d123e6c (diff)
downloadhdf5-38df150e1635103c44ec4c89ee9eff43a61ebc84.zip
hdf5-38df150e1635103c44ec4c89ee9eff43a61ebc84.tar.gz
hdf5-38df150e1635103c44ec4c89ee9eff43a61ebc84.tar.bz2
[svn-r18850] Added packed-bits tests to batch file
Tested: windows
Diffstat (limited to 'windows')
-rw-r--r--windows/tools/h5dump/testh5dump.bat53
1 files changed, 52 insertions, 1 deletions
diff --git a/windows/tools/h5dump/testh5dump.bat b/windows/tools/h5dump/testh5dump.bat
index 1a55c40..7004274 100644
--- a/windows/tools/h5dump/testh5dump.bat
+++ b/windows/tools/h5dump/testh5dump.bat
@@ -33,6 +33,8 @@ call :detect_filter fletcher32
call :detect_filter nbit
call :detect_filter scaleoffset
+call :detect_packedbits
+
rem The tool name
set dumper=h5dump%2
rem The path of the tool library
@@ -291,6 +293,16 @@ rem --SJW 9/4/07
exit /b
+:detect_packedbits
+ findstr /b /i /c:"#define H5_HAVE_H5DUMP_PACKED_BITS" %h5pubconf% > nul
+ if %errorlevel% equ 0 (
+ set Have_Packed_Bits=yes
+ ) else (
+ set Have_Packed_Bits=no
+ )
+
+ exit /b
+
rem ############################################################################
rem ############################################################################
@@ -414,7 +426,11 @@ rem ############################################################################
rem test failure handling
rem Missing file name
- call :tooltest tnofilename.ddl
+ if "%Have_Packed_Bits%"=="yes" (
+ call :tooltest tnofilename-with-packed-bits.ddl
+ ) else (
+ call :tooltest tnofilename.ddl
+ )
rem rev. 2004
@@ -613,6 +629,41 @@ rem ############################################################################
call :tooltest textlinksrc.ddl textlinksrc.h5
call :tooltest textlinkfar.ddl textlinkfar.h5
+ if "%Have_Packed_Bits%"=="yes" (
+ rem test for dataset packed bits
+ rem Set up xCMD to test or skip.
+ rem Limits:
+ rem Maximum number of packed bits is 8 (for now).
+ rem Maximum integer size is 8 (for now).
+ rem Maximun Offset is 7 (Maximum size - 1).
+ rem Maximum Offset+Length is 8 (Maximum size).
+ rem Tests:
+ rem Normal operation on both signed and unsigned int datasets.
+ rem Their rawdata output should be the same.
+ call :tooltest tpbitsSigned.ddl -d /DS08BITS -M 0,2,2,6 packedbits.h5
+ call :tooltest tpbitsUnsigned.ddl -d /DU08BITS -M 0,2,2,6 packedbits.h5
+ rem Overlapped packed bits.
+ call :tooltest tpbitsOverlapped.ddl -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5
+ rem Maximum number of packed bits.
+ call :tooltest tpbitsMax.ddl -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5
+ rem Compound type.
+ call :tooltest tpbitsCompound.ddl -d /dset1 -M 0,1,1,1 tcompound.h5
+ rem Array type.
+ call :tooltest tpbitsArray.ddl -d /Dataset1 -M 0,1,1,1 tarray1.h5
+ rem Test Error handling.
+ rem Too many packed bits requested. Max is 8 for now.
+ call :tooltest tpbitsMaxExceeded.ddl -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5
+ rem Offset too large. Max is 7 (8-1) for now.
+ call :tooltest tpbitsOffsetExceeded.ddl -d /DS08BITS -M 8,1 packedbits.h5
+ rem Bad offset, must not be negative.
+ call :tooltest tpbitsOffsetNegative.ddl -d /DS08BITS -M -1,1 packedbits.h5
+ rem Bad length, must not be positive.
+ call :tooltest tpbitsLengthPositive.ddl -d /DS08BITS -M 4,0 packedbits.h5
+ rem Offset+Length is too large. Max is 8 for now.
+ call :tooltest tpbitsLengthExceeded.ddl -d /DS08BITS -M 2,7 packedbits.h5
+ rem Incomplete pair of packed bits request.
+ call :tooltest tpbitsIncomplete.ddl -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5
+ )
if %nerrors% equ 0 (
echo.All %dumper% tests passed.