Test refctored

This commit is contained in:
2026-09-08 16:18:56 +02:00
parent 3e32146290
commit 826c9f0ef9
+28 -32
View File
@@ -43,6 +43,10 @@ dcl-ds MediaDefinition
dcl-ds OriginalDefinition
likeds(MD_MediaDefinition_T);
dcl-s DeviceIndex int(10);
dcl-s MediaIndex int(10);
dcl-s VolumeIndex int(10);
//=====================================================================
//
@@ -119,21 +123,7 @@ 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 '----------------------------------------';
@@ -141,6 +131,10 @@ dsply 'Parser result';
dsply '----------------------------------------';
//=====================================================================
// General
//=====================================================================
if MediaDefinition.MediaDefinitionName =
OriginalDefinition.MediaDefinitionName;
@@ -250,9 +244,9 @@ for DeviceIndex = 1
%char(DeviceIndex));
//---------------------------------------------------------------
//------------------------------------------------------------------
// Device Name
//---------------------------------------------------------------
//------------------------------------------------------------------
if MediaDefinition.Device(DeviceIndex).DeviceName =
OriginalDefinition.Device(DeviceIndex).DeviceName;
@@ -270,9 +264,9 @@ for DeviceIndex = 1
endif;
//---------------------------------------------------------------
//------------------------------------------------------------------
// Number of Media Files
//---------------------------------------------------------------
//------------------------------------------------------------------
if MediaDefinition.Device(DeviceIndex).NumberOfMediaFiles =
OriginalDefinition.Device(DeviceIndex).NumberOfMediaFiles;
@@ -290,9 +284,9 @@ for DeviceIndex = 1
endif;
//=================================================================
//==================================================================
// Media Files
//=================================================================
//==================================================================
for MediaIndex = 1
to OriginalDefinition.Device(DeviceIndex).NumberOfMediaFiles;
@@ -301,9 +295,9 @@ for DeviceIndex = 1
%char(MediaIndex));
//-------------------------------------------------------------
//----------------------------------------------------------------
// Sequence Number
//-------------------------------------------------------------
//----------------------------------------------------------------
if MediaDefinition.Device(DeviceIndex)
.MediaFile(MediaIndex)
@@ -329,9 +323,9 @@ for DeviceIndex = 1
endif;
//-------------------------------------------------------------
// Starting Position
//-------------------------------------------------------------
//----------------------------------------------------------------
// Starting Position In File
//----------------------------------------------------------------
if MediaDefinition.Device(DeviceIndex)
.MediaFile(MediaIndex)
@@ -357,9 +351,9 @@ for DeviceIndex = 1
endif;
//-------------------------------------------------------------
// Number of Volumes
//-------------------------------------------------------------
//----------------------------------------------------------------
// Number Of Volume Identifiers
//----------------------------------------------------------------
if MediaDefinition.Device(DeviceIndex)
.MediaFile(MediaIndex)
@@ -372,7 +366,7 @@ for DeviceIndex = 1
%char(DeviceIndex) +
' Media File ' +
%char(MediaIndex) +
' NumberOfVolumes');
' NumberOfVolumeIdentifiers');
else;
@@ -380,14 +374,14 @@ for DeviceIndex = 1
%char(DeviceIndex) +
' Media File ' +
%char(MediaIndex) +
' NumberOfVolumes');
' NumberOfVolumeIdentifiers');
endif;
//=============================================================
//===============================================================
// Volume Identifiers
//=============================================================
//===============================================================
for VolumeIndex = 1
to OriginalDefinition.Device(DeviceIndex)
@@ -435,6 +429,8 @@ endfor;
dsply '----------------------------------------';
dsply 'Parser test completed';
dsply '----------------------------------------';
//=====================================================================
// End
//=====================================================================