Parser testprozedur ersetzt
This commit is contained in:
+149
-382
@@ -119,7 +119,21 @@ dsply 'Retrieve completed';
|
||||
|
||||
|
||||
//=====================================================================
|
||||
//
|
||||
// Tests
|
||||
//
|
||||
// Compares the retrieved Media Definition with the original
|
||||
// definition.
|
||||
//
|
||||
//=====================================================================
|
||||
|
||||
dcl-s DeviceIndex int(10);
|
||||
dcl-s MediaIndex int(10);
|
||||
dcl-s VolumeIndex int(10);
|
||||
|
||||
|
||||
//=====================================================================
|
||||
// General
|
||||
//=====================================================================
|
||||
|
||||
dsply '----------------------------------------';
|
||||
@@ -127,10 +141,6 @@ dsply 'Parser result';
|
||||
dsply '----------------------------------------';
|
||||
|
||||
|
||||
//=====================================================================
|
||||
// General
|
||||
//=====================================================================
|
||||
|
||||
if MediaDefinition.MediaDefinitionName =
|
||||
OriginalDefinition.MediaDefinitionName;
|
||||
|
||||
@@ -167,10 +177,6 @@ else;
|
||||
endif;
|
||||
|
||||
|
||||
//=====================================================================
|
||||
// General - additional fields
|
||||
//=====================================================================
|
||||
|
||||
if MediaDefinition.TextDescription =
|
||||
OriginalDefinition.TextDescription;
|
||||
|
||||
@@ -232,431 +238,194 @@ endif;
|
||||
|
||||
|
||||
//=====================================================================
|
||||
// Device 1
|
||||
// Devices
|
||||
//=====================================================================
|
||||
|
||||
dsply '----------------------------------------';
|
||||
dsply 'Device 1';
|
||||
for DeviceIndex = 1
|
||||
to OriginalDefinition.NumberOfDevices;
|
||||
|
||||
dsply '----------------------------------------';
|
||||
|
||||
if MediaDefinition.Device(1).DeviceName =
|
||||
OriginalDefinition.Device(1).DeviceName;
|
||||
dsply ('Device ' +
|
||||
%char(DeviceIndex));
|
||||
|
||||
dsply 'PASS Device 1 DeviceName';
|
||||
|
||||
else;
|
||||
//---------------------------------------------------------------
|
||||
// Device Name
|
||||
//---------------------------------------------------------------
|
||||
|
||||
dsply 'FAIL Device 1 DeviceName';
|
||||
if MediaDefinition.Device(DeviceIndex).DeviceName =
|
||||
OriginalDefinition.Device(DeviceIndex).DeviceName;
|
||||
|
||||
endif;
|
||||
dsply ('PASS Device ' +
|
||||
%char(DeviceIndex) +
|
||||
' DeviceName');
|
||||
|
||||
else;
|
||||
|
||||
if MediaDefinition.Device(1).NumberOfMediaFiles =
|
||||
OriginalDefinition.Device(1).NumberOfMediaFiles;
|
||||
dsply ('FAIL Device ' +
|
||||
%char(DeviceIndex) +
|
||||
' DeviceName');
|
||||
|
||||
dsply 'PASS Device 1 NumberOfMediaFiles';
|
||||
endif;
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 1 NumberOfMediaFiles';
|
||||
//---------------------------------------------------------------
|
||||
// Number of Media Files
|
||||
//---------------------------------------------------------------
|
||||
|
||||
endif;
|
||||
if MediaDefinition.Device(DeviceIndex).NumberOfMediaFiles =
|
||||
OriginalDefinition.Device(DeviceIndex).NumberOfMediaFiles;
|
||||
|
||||
dsply ('PASS Device ' +
|
||||
%char(DeviceIndex) +
|
||||
' NumberOfMediaFiles');
|
||||
|
||||
//=====================================================================
|
||||
// Device 1 / Media File 1
|
||||
//=====================================================================
|
||||
else;
|
||||
|
||||
dsply 'Media File 1';
|
||||
dsply ('FAIL Device ' +
|
||||
%char(DeviceIndex) +
|
||||
' NumberOfMediaFiles');
|
||||
|
||||
endif;
|
||||
|
||||
if MediaDefinition.Device(1)
|
||||
.MediaFile(1)
|
||||
.SequenceNumber =
|
||||
OriginalDefinition.Device(1)
|
||||
.MediaFile(1)
|
||||
.SequenceNumber;
|
||||
|
||||
dsply 'PASS Device 1 SequenceNumber';
|
||||
//=================================================================
|
||||
// Media Files
|
||||
//=================================================================
|
||||
|
||||
else;
|
||||
for MediaIndex = 1
|
||||
to OriginalDefinition.Device(DeviceIndex).NumberOfMediaFiles;
|
||||
|
||||
dsply 'FAIL Device 1 SequenceNumber';
|
||||
dsply ('Media File ' +
|
||||
%char(MediaIndex));
|
||||
|
||||
endif;
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// Sequence Number
|
||||
//-------------------------------------------------------------
|
||||
|
||||
if MediaDefinition.Device(1)
|
||||
.MediaFile(1)
|
||||
.StartingPositionInFile =
|
||||
OriginalDefinition.Device(1)
|
||||
.MediaFile(1)
|
||||
.StartingPositionInFile;
|
||||
if MediaDefinition.Device(DeviceIndex)
|
||||
.MediaFile(MediaIndex)
|
||||
.SequenceNumber =
|
||||
OriginalDefinition.Device(DeviceIndex)
|
||||
.MediaFile(MediaIndex)
|
||||
.SequenceNumber;
|
||||
|
||||
dsply 'PASS Device 1 StartingPositionInFile';
|
||||
dsply ('PASS Device ' +
|
||||
%char(DeviceIndex) +
|
||||
' Media File ' +
|
||||
%char(MediaIndex) +
|
||||
' SequenceNumber');
|
||||
|
||||
else;
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 1 StartingPositionInFile';
|
||||
dsply ('FAIL Device ' +
|
||||
%char(DeviceIndex) +
|
||||
' Media File ' +
|
||||
%char(MediaIndex) +
|
||||
' SequenceNumber');
|
||||
|
||||
endif;
|
||||
endif;
|
||||
|
||||
|
||||
if MediaDefinition.Device(1)
|
||||
.MediaFile(1)
|
||||
.NumberOfVolumeIdentifiers =
|
||||
OriginalDefinition.Device(1)
|
||||
.MediaFile(1)
|
||||
.NumberOfVolumeIdentifiers;
|
||||
//-------------------------------------------------------------
|
||||
// Starting Position
|
||||
//-------------------------------------------------------------
|
||||
|
||||
dsply 'PASS Device 1 Media File 1 NumberOfVolumes';
|
||||
if MediaDefinition.Device(DeviceIndex)
|
||||
.MediaFile(MediaIndex)
|
||||
.StartingPositionInFile =
|
||||
OriginalDefinition.Device(DeviceIndex)
|
||||
.MediaFile(MediaIndex)
|
||||
.StartingPositionInFile;
|
||||
|
||||
else;
|
||||
dsply ('PASS Device ' +
|
||||
%char(DeviceIndex) +
|
||||
' Media File ' +
|
||||
%char(MediaIndex) +
|
||||
' StartingPositionInFile');
|
||||
|
||||
dsply 'FAIL Device 1 Media File 1 NumberOfVolumes';
|
||||
else;
|
||||
|
||||
endif;
|
||||
dsply ('FAIL Device ' +
|
||||
%char(DeviceIndex) +
|
||||
' Media File ' +
|
||||
%char(MediaIndex) +
|
||||
' StartingPositionInFile');
|
||||
|
||||
endif;
|
||||
|
||||
if MediaDefinition.Device(1)
|
||||
.MediaFile(1)
|
||||
.VolumeIdentifier(1)
|
||||
.VolumeIdentifier =
|
||||
OriginalDefinition.Device(1)
|
||||
.MediaFile(1)
|
||||
.VolumeIdentifier(1)
|
||||
.VolumeIdentifier;
|
||||
|
||||
dsply 'PASS Device 1 Media File 1 Volume 1';
|
||||
//-------------------------------------------------------------
|
||||
// Number of Volumes
|
||||
//-------------------------------------------------------------
|
||||
|
||||
else;
|
||||
if MediaDefinition.Device(DeviceIndex)
|
||||
.MediaFile(MediaIndex)
|
||||
.NumberOfVolumeIdentifiers =
|
||||
OriginalDefinition.Device(DeviceIndex)
|
||||
.MediaFile(MediaIndex)
|
||||
.NumberOfVolumeIdentifiers;
|
||||
|
||||
dsply 'FAIL Device 1 Media File 1 Volume 1';
|
||||
dsply ('PASS Device ' +
|
||||
%char(DeviceIndex) +
|
||||
' Media File ' +
|
||||
%char(MediaIndex) +
|
||||
' NumberOfVolumes');
|
||||
|
||||
endif;
|
||||
else;
|
||||
|
||||
dsply ('FAIL Device ' +
|
||||
%char(DeviceIndex) +
|
||||
' Media File ' +
|
||||
%char(MediaIndex) +
|
||||
' NumberOfVolumes');
|
||||
|
||||
if MediaDefinition.Device(1)
|
||||
.MediaFile(1)
|
||||
.VolumeIdentifier(2)
|
||||
.VolumeIdentifier =
|
||||
OriginalDefinition.Device(1)
|
||||
.MediaFile(1)
|
||||
.VolumeIdentifier(2)
|
||||
.VolumeIdentifier;
|
||||
endif;
|
||||
|
||||
dsply 'PASS Device 1 Media File 1 Volume 2';
|
||||
|
||||
else;
|
||||
//=============================================================
|
||||
// Volume Identifiers
|
||||
//=============================================================
|
||||
|
||||
dsply 'FAIL Device 1 Media File 1 Volume 2';
|
||||
for VolumeIndex = 1
|
||||
to OriginalDefinition.Device(DeviceIndex)
|
||||
.MediaFile(MediaIndex)
|
||||
.NumberOfVolumeIdentifiers;
|
||||
|
||||
endif;
|
||||
if MediaDefinition.Device(DeviceIndex)
|
||||
.MediaFile(MediaIndex)
|
||||
.VolumeIdentifier(VolumeIndex)
|
||||
.VolumeIdentifier =
|
||||
OriginalDefinition.Device(DeviceIndex)
|
||||
.MediaFile(MediaIndex)
|
||||
.VolumeIdentifier(VolumeIndex)
|
||||
.VolumeIdentifier;
|
||||
|
||||
dsply ('PASS Device ' +
|
||||
%char(DeviceIndex) +
|
||||
' Media File ' +
|
||||
%char(MediaIndex) +
|
||||
' Volume ' +
|
||||
%char(VolumeIndex));
|
||||
|
||||
else;
|
||||
|
||||
//=====================================================================
|
||||
// Device 1 / Media File 2
|
||||
//=====================================================================
|
||||
dsply ('FAIL Device ' +
|
||||
%char(DeviceIndex) +
|
||||
' Media File ' +
|
||||
%char(MediaIndex) +
|
||||
' Volume ' +
|
||||
%char(VolumeIndex));
|
||||
|
||||
dsply 'Media File 2';
|
||||
endif;
|
||||
|
||||
endfor;
|
||||
|
||||
if MediaDefinition.Device(1)
|
||||
.MediaFile(2)
|
||||
.SequenceNumber =
|
||||
OriginalDefinition.Device(1)
|
||||
.MediaFile(2)
|
||||
.SequenceNumber;
|
||||
endfor;
|
||||
|
||||
dsply 'PASS Device 1 Media File 2 SequenceNumber';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 1 Media File 2 SequenceNumber';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
if MediaDefinition.Device(1)
|
||||
.MediaFile(2)
|
||||
.StartingPositionInFile =
|
||||
OriginalDefinition.Device(1)
|
||||
.MediaFile(2)
|
||||
.StartingPositionInFile;
|
||||
|
||||
dsply 'PASS Device 1 Media File 2 StartingPositionInFile';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 1 Media File 2 StartingPositionInFile';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
if MediaDefinition.Device(1)
|
||||
.MediaFile(2)
|
||||
.NumberOfVolumeIdentifiers =
|
||||
OriginalDefinition.Device(1)
|
||||
.MediaFile(2)
|
||||
.NumberOfVolumeIdentifiers;
|
||||
|
||||
dsply 'PASS Device 1 Media File 2 NumberOfVolumes';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 1 Media File 2 NumberOfVolumes';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
if MediaDefinition.Device(1)
|
||||
.MediaFile(2)
|
||||
.VolumeIdentifier(1)
|
||||
.VolumeIdentifier =
|
||||
OriginalDefinition.Device(1)
|
||||
.MediaFile(2)
|
||||
.VolumeIdentifier(1)
|
||||
.VolumeIdentifier;
|
||||
|
||||
dsply 'PASS Device 1 Media File 2 Volume 1';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 1 Media File 2 Volume 1';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
if MediaDefinition.Device(1)
|
||||
.MediaFile(2)
|
||||
.VolumeIdentifier(2)
|
||||
.VolumeIdentifier =
|
||||
OriginalDefinition.Device(1)
|
||||
.MediaFile(2)
|
||||
.VolumeIdentifier(2)
|
||||
.VolumeIdentifier;
|
||||
|
||||
dsply 'PASS Device 1 Media File 2 Volume 2';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 1 Media File 2 Volume 2';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
//=====================================================================
|
||||
// Device 2
|
||||
//=====================================================================
|
||||
|
||||
dsply '----------------------------------------';
|
||||
dsply 'Device 2';
|
||||
|
||||
|
||||
if MediaDefinition.Device(2).DeviceName =
|
||||
OriginalDefinition.Device(2).DeviceName;
|
||||
|
||||
dsply 'PASS Device 2 DeviceName';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 2 DeviceName';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
if MediaDefinition.Device(2).NumberOfMediaFiles =
|
||||
OriginalDefinition.Device(2).NumberOfMediaFiles;
|
||||
|
||||
dsply 'PASS Device 2 NumberOfMediaFiles';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 2 NumberOfMediaFiles';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
//=====================================================================
|
||||
// Device 2 / Media File 1
|
||||
//=====================================================================
|
||||
|
||||
dsply 'Media File 1';
|
||||
|
||||
|
||||
if MediaDefinition.Device(2)
|
||||
.MediaFile(1)
|
||||
.SequenceNumber =
|
||||
OriginalDefinition.Device(2)
|
||||
.MediaFile(1)
|
||||
.SequenceNumber;
|
||||
|
||||
dsply 'PASS Device 2 Media File 1 SequenceNumber';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 2 Media File 1 SequenceNumber';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
if MediaDefinition.Device(2)
|
||||
.MediaFile(1)
|
||||
.StartingPositionInFile =
|
||||
OriginalDefinition.Device(2)
|
||||
.MediaFile(1)
|
||||
.StartingPositionInFile;
|
||||
|
||||
dsply 'PASS Device 2 Media File 1 StartingPositionInFile';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 2 Media File 1 StartingPositionInFile';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
if MediaDefinition.Device(2)
|
||||
.MediaFile(1)
|
||||
.NumberOfVolumeIdentifiers =
|
||||
OriginalDefinition.Device(2)
|
||||
.MediaFile(1)
|
||||
.NumberOfVolumeIdentifiers;
|
||||
|
||||
dsply 'PASS Device 2 Media File 1 NumberOfVolumes';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 2 Media File 1 NumberOfVolumes';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
if MediaDefinition.Device(2)
|
||||
.MediaFile(1)
|
||||
.VolumeIdentifier(1)
|
||||
.VolumeIdentifier =
|
||||
OriginalDefinition.Device(2)
|
||||
.MediaFile(1)
|
||||
.VolumeIdentifier(1)
|
||||
.VolumeIdentifier;
|
||||
|
||||
dsply 'PASS Device 2 Media File 1 Volume 1';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 2 Media File 1 Volume 1';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
if MediaDefinition.Device(2)
|
||||
.MediaFile(1)
|
||||
.VolumeIdentifier(2)
|
||||
.VolumeIdentifier =
|
||||
OriginalDefinition.Device(2)
|
||||
.MediaFile(1)
|
||||
.VolumeIdentifier(2)
|
||||
.VolumeIdentifier;
|
||||
|
||||
dsply 'PASS Device 2 Media File 1 Volume 2';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 2 Media File 1 Volume 2';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
//=====================================================================
|
||||
// Device 2 / Media File 2
|
||||
//=====================================================================
|
||||
|
||||
dsply 'Media File 2';
|
||||
|
||||
|
||||
if MediaDefinition.Device(2)
|
||||
.MediaFile(2)
|
||||
.SequenceNumber =
|
||||
OriginalDefinition.Device(2)
|
||||
.MediaFile(2)
|
||||
.SequenceNumber;
|
||||
|
||||
dsply 'PASS Device 2 Media File 2 SequenceNumber';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 2 Media File 2 SequenceNumber';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
if MediaDefinition.Device(2)
|
||||
.MediaFile(2)
|
||||
.StartingPositionInFile =
|
||||
OriginalDefinition.Device(2)
|
||||
.MediaFile(2)
|
||||
.StartingPositionInFile;
|
||||
|
||||
dsply 'PASS Device 2 Media File 2 StartingPositionInFile';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 2 Media File 2 StartingPositionInFile';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
if MediaDefinition.Device(2)
|
||||
.MediaFile(2)
|
||||
.NumberOfVolumeIdentifiers =
|
||||
OriginalDefinition.Device(2)
|
||||
.MediaFile(2)
|
||||
.NumberOfVolumeIdentifiers;
|
||||
|
||||
dsply 'PASS Device 2 Media File 2 NumberOfVolumes';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 2 Media File 2 NumberOfVolumes';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
if MediaDefinition.Device(2)
|
||||
.MediaFile(2)
|
||||
.VolumeIdentifier(1)
|
||||
.VolumeIdentifier =
|
||||
OriginalDefinition.Device(2)
|
||||
.MediaFile(2)
|
||||
.VolumeIdentifier(1)
|
||||
.VolumeIdentifier;
|
||||
|
||||
dsply 'PASS Device 2 Media File 2 Volume 1';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 2 Media File 2 Volume 1';
|
||||
|
||||
endif;
|
||||
|
||||
|
||||
if MediaDefinition.Device(2)
|
||||
.MediaFile(2)
|
||||
.VolumeIdentifier(2)
|
||||
.VolumeIdentifier =
|
||||
OriginalDefinition.Device(2)
|
||||
.MediaFile(2)
|
||||
.VolumeIdentifier(2)
|
||||
.VolumeIdentifier;
|
||||
|
||||
dsply 'PASS Device 2 Media File 2 Volume 2';
|
||||
|
||||
else;
|
||||
|
||||
dsply 'FAIL Device 2 Media File 2 Volume 2';
|
||||
|
||||
endif;
|
||||
endfor;
|
||||
|
||||
|
||||
//=====================================================================
|
||||
@@ -666,8 +435,6 @@ endif;
|
||||
dsply '----------------------------------------';
|
||||
dsply 'Parser test completed';
|
||||
dsply '----------------------------------------';
|
||||
|
||||
|
||||
//=====================================================================
|
||||
// End
|
||||
//=====================================================================
|
||||
|
||||
Reference in New Issue
Block a user