IDL Test case [message #37968] |
Wed, 04 February 2004 09:24 |
wroozee
Messages: 2 Registered: October 2003
|
Junior Member |
|
|
This might be a simple question for all IDL gurus. What i want to do
is write a test case.
This is what i have:
PRO test1
pushd,'C:\Temp\test'
obj = CREATEOBJ("B.xml", "B.dat")
list_struct= LISTSTRUCTURES(obj, '\')
print,'Structure:', list_struct
list_field = LISTFIELDS(obj, '\')
print, 'Field:', list_field
rank = GETRANK(obj, '/Bin/19GHz')
print, 'Rank:', rank
dim = GETDIMENSION(obj, '/Bin/19GHz',1)
print, 'Dimension:',dim
dim_name = GETDIMENSIONNAME(obj, '/Bin/19GHz',1)
print, 'Dimension Name:', dim_name
type = GETFIELDTYPE(obj, '/Bin/19GHz')
print,'Data Type:', type
field = READFIELD(obj, '/Bin/19GHz')
print, field
print, DeleteObj(obj)
end
The above code takes one B.xml and one B.dat file from a directory and
runs the program. What i want to do is instead of testing for only
these 2 files, i want to test for all the files in that same
directory. It is very time consuming to test each file seperately.
Could someone suggest me how to write a test case so it tests all
files listed in the directory without me having to hard code each
filename in the above code?
Thanks a lot
Wroozee
|
|
|