recipe and pattern validation on Biorad imports
This commit is contained in:
parent
95763eb69b
commit
0c2a5770a9
@ -96,6 +96,7 @@ Declare function SRP_Sort_Array, Metrology_Services, obj_RDS_Test, obj_Test_P
|
||||
Declare function Work_Order_Services, SRP_JSON, Logging_Services, Environment_Services, SRP_Trim, Min, Max
|
||||
Declare function QA_Services, SRP_Join_Arrays, Get_Status, Obj_Clean_Insp, Datetime, SRP_Datetime
|
||||
Declare function Httpclient_Services, PM_Services, Signature_Services, SRP_Array, Math_Services
|
||||
Declare function Tool_Class_Services
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Metrology'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
@ -608,7 +609,6 @@ end service
|
||||
|
||||
|
||||
Service ImportBioRadData(RunData, FileName)
|
||||
|
||||
Machine = 'BioRad'
|
||||
IsProdTest = False$
|
||||
ParseArray = ''
|
||||
@ -685,7 +685,6 @@ Service ImportBioRadData(RunData, FileName)
|
||||
If IsProdTest EQ True$ then Metrology_Services('LogResults',RDSKeyID,Machine,'HgCV','Product test recognized. Recipe name: ':ScanRecipe)
|
||||
end
|
||||
// -------------------------------------------------------------------------------------------------------------
|
||||
|
||||
CassNo = RDSRec<RDS_CASS_NO$>
|
||||
WorkOrder = Work_Order_Services('GetWorkOrder', WorkOrderNo, False$)
|
||||
GoSub ParseWorkOrder
|
||||
@ -694,6 +693,12 @@ Service ImportBioRadData(RunData, FileName)
|
||||
RunDataZone = Metrology_Services('FormatZoneKeyID', RunDataZone) ; // 1, 2
|
||||
RunDataLayer = Metrology_Services('FormatLayerKeyID', RunDataLayer) ; // L1, L2, 2
|
||||
|
||||
ZoneForValidation = RunDataZone
|
||||
LayerForValidation = RunDataLayer
|
||||
If LayerForValidation EQ '' then
|
||||
LayerForValidation = 'L1'
|
||||
end
|
||||
|
||||
CalculatedZone = Metrology_Services('GetCalculatedZone', RDSKeyID, IsEpiPro, RunDataZone)
|
||||
If RunDataZone NE CalculatedZone then
|
||||
Error_Services('Add', 'Entered Zone [' : RunDataZone : '] and calculated Zone [' : CalculatedZone : '] do not match.')
|
||||
@ -851,7 +856,29 @@ Service ImportBioRadData(RunData, FileName)
|
||||
SigProfFound = True$
|
||||
UnloadSigned = Signature_Services('GetStageSummary', WoMatKey, 'UNLOAD')<2>
|
||||
IF (Stage EQ 'UNLOAD' AND UnloadSigned EQ True$) OR Stage NE 'UNLOAD' then
|
||||
If WOMatQARec<WO_MAT_QA_RESULT$, Pos> EQ '' OR IsViewerFile then
|
||||
// verify recipe is correct
|
||||
WoMatQaRecipe = WOMatQARec<WO_MAT_QA_RECIPE$, Pos>
|
||||
WoMatQaRecipeMatchesScanRecipe = ScanRecipe _EQC WoMatQaRecipe
|
||||
If WoMatQaRecipeMatchesScanRecipe EQ False$ then
|
||||
ErrMsg = 'Scan recipe [ ' : ScanRecipe : ' ] does not match WoMatQa recipe [ ' : WoMatQaRecipe : ' ] for RDS [ ' : RDSKeyID : ' ] layer [ ' : CalculatedLayer : ' ].'
|
||||
Error_Services('Add', ErrMsg)
|
||||
Metrology_Services('LogResults', RDSKeyID, Machine, 'UID001', Service : ' : ' : Error_Services('GetMessage'))
|
||||
end
|
||||
|
||||
// verify number of points is correct
|
||||
WoMatQaToolClass = WOMatQARec<WO_MAT_QA_TOOL_CLASS$, Pos>
|
||||
WoMatQaRecipePattern = WOMatQARec<WO_MAT_QA_RECIPE_PATTERN$, Pos>
|
||||
NumDataPointsInSpec = Tool_Class_Services('GetNumberOfPointsForPattern', WoMatQaToolClass, WoMatQaRecipePattern)
|
||||
WoMatQaRecipePatternNumPointsMatchesScanNumDataPoints = NumDataPointsInSpec EQ NumDataPoints
|
||||
|
||||
If WoMatQaRecipePatternNumPointsMatchesScanNumDataPoints EQ False$ then
|
||||
ErrMsg = 'Scan data point count [ ' : NumDataPoints : ' ] does not match WoMatQa recipe pattern data point count [ ' : NumDataPointsInSpec : ' ] for RDS [ ' : RDSKeyID : ' ] layer [ ' : CalculatedLayer : ' ].'
|
||||
Error_Services('Add', ErrMsg)
|
||||
Metrology_Services('LogResults', RDSKeyID, Machine, 'UID001', Service : ' : ' : Error_Services('GetMessage'))
|
||||
end
|
||||
|
||||
If (WOMatQARec<WO_MAT_QA_RESULT$, Pos> EQ '' OR IsViewerFile) then
|
||||
If WoMatQaRecipeMatchesScanRecipe and WoMatQaRecipePatternNumPointsMatchesScanNumDataPoints then
|
||||
WOMatQARec<WO_MAT_QA_RESULT$, Pos> = Average
|
||||
WOMatQARec<WO_MAT_QA_MIN_RESULT$, Pos> = Oconv(Iconv(Min, 'MD3'), 'MD3')
|
||||
WOMatQARec<WO_MAT_QA_MAX_RESULT$, Pos> = Oconv(Iconv(Max, 'MD3'), 'MD3')
|
||||
@ -873,6 +900,7 @@ Service ImportBioRadData(RunData, FileName)
|
||||
WOMatQARec<WO_MAT_QA_SIG$, Pos> = ''
|
||||
WOMatQARec<WO_MAT_QA_SIG_DTM$, Pos> = ''
|
||||
Database_Services('WriteDataRow', 'WO_MAT_QA', WOMatQAID, WOMatQARec, True$, False$, True$)
|
||||
end
|
||||
end else
|
||||
Metrology_Services('LogResults', RDSKeyID, Machine, 'UID001', Service : ' : UID001 - Data for this metrology test already exists and is not from the metrology viewer.')
|
||||
end
|
||||
@ -890,7 +918,36 @@ Service ImportBioRadData(RunData, FileName)
|
||||
end
|
||||
Case Otherwise$
|
||||
// If not an above case, then the run is a conventional THICK_ONLY RDS metrology test.
|
||||
|
||||
RDSLayerKeyID = RDSKeyID : '*' : LayerForValidation
|
||||
RDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', RDSLayerKeyID)
|
||||
If Error_Services('NoError') then
|
||||
RDSTestKeyIDs = RDSLayerRec<RDS_LAYER_RDS_TEST_KEYS$>
|
||||
|
||||
// Verify the scan recipe matches the spec recipe
|
||||
RecipeMatches = Metrology_Services('ScanRecipeMatchesRdsTestSpecThickMrecipe', RDSKeyID, LayerForValidation, ScanRecipe, RDSTestKeyIDs, ZoneForValidation)
|
||||
If RecipeMatches EQ False$ then
|
||||
ErrMsg = 'Scan recipe [ ' : ScanRecipe : ' ] does not match RDS Test recipe for RDS [ ' : RDSKeyID : ' ] layer [ ' : CalculatedLayer : ' ] zone [ ' : CalculatedZone : ' ].'
|
||||
Error_Services('Add', ErrMsg)
|
||||
Metrology_Services('LogResults', RDSKeyID, Machine, 'UID001', Service : ' : ' : Error_Services('GetMessage'))
|
||||
end
|
||||
|
||||
// Verfiy the scan number of points matches the spec number of points
|
||||
NumPointsMatches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', RDSKeyID, LayerForValidation, NumDataPoints, RDSTestKeyIDs, 'FTIR', ZoneForValidation)
|
||||
If NumPointsMatches EQ False$ then
|
||||
ErrMsg = 'Scan data point count [ ' : NumDataPoints : ' ] does not match RDS Test recipe pattern data point count for RDS [ ' : RDSKeyID : ' ] layer [ ' : CalculatedLayer : ' ] zone [ ' : CalculatedZone : ' ].'
|
||||
Error_Services('Add', ErrMsg)
|
||||
Metrology_Services('LogResults', RDSKeyID, Machine, 'UID001', Service : ' : ' : Error_Services('GetMessage'))
|
||||
end
|
||||
|
||||
If RecipeMatches and NumPointsMatches then
|
||||
GoSub LoadRunDataToDatabase
|
||||
end
|
||||
end else
|
||||
ErrMsg = 'RDS Test scan failed for RDS [' : RDSKeyID : '] layer [' : LayerForValidation : '], because unable to get RDS_LAYER record [' : RDSLayerKeyID : ']'
|
||||
Error_Services('Add', ErrMsg)
|
||||
Metrology_Services('LogResults', RDSKeyID, Machine, 'UID001', Service : ' : ' : Error_Services('GetMessage'))
|
||||
end
|
||||
End Case
|
||||
end else
|
||||
Error_Services('Add', 'Data type / Spec not found for Layer [' : RunDataLayer : '].')
|
||||
@ -2416,6 +2473,88 @@ Service GetIQSViolations()
|
||||
end
|
||||
end service
|
||||
|
||||
Service ScanRecipeMatchesRdsTestSpecThickMrecipe(RdsNo, RecipeLayer, RecipeInScan, RdsTestKeysFromRdsLayer, Zone='')
|
||||
If Unassigned(RecipeLayer) or RecipeLayer EQ '' then
|
||||
RecipeLayer = 'L1'
|
||||
end
|
||||
|
||||
MatchFound = False$
|
||||
ValidArgs = Assigned(RdsNo) and RdsNo NE '' and Assigned(RecipeInScan) and RecipeInScan NE ''
|
||||
ValidArgs = ValidArgs and Assigned(RdsTestKeysFromRdsLayer) and Dcount(RdsTestKeysFromRdsLayer, @VM) GT 0
|
||||
If ValidArgs then
|
||||
For Each RDSTestKeyID in RdsTestKeysFromRdsLayer using @VM setting mkPos
|
||||
RdsTestRec = Database_Services('ReadDataRow', 'RDS_TEST', RDSTestKeyID)
|
||||
If Error_Services('NoError') then
|
||||
RdsTestRdsNo = RdsTestRec<RDS_TEST_RDS_NO$>
|
||||
If RdsNo EQ RdsTestRdsNo then
|
||||
RdsTestRecLayer = RdsTestRec<RDS_TEST_LS_ID$>
|
||||
If RecipeLayer EQ RdsTestRecLayer then
|
||||
Continue = True$
|
||||
If Zone NE '' then
|
||||
RdsTestRecZone = RdsTestRec<RDS_TEST_ZONE$>
|
||||
If RdsTestRecZone NE Zone then
|
||||
Continue = False$
|
||||
end
|
||||
end
|
||||
If Continue then
|
||||
SpecThickMrecipe = RdsTestRec<RDS_TEST_SPEC_THICK_MRECIPE$>
|
||||
If RecipeInScan _EQC SpecThickMrecipe then
|
||||
MatchFound = True$
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Until MatchFound
|
||||
Next RDSTestKeyID
|
||||
end
|
||||
|
||||
Response = MatchFound
|
||||
end service
|
||||
|
||||
Service ScanNumDataPointsMatchesRdsTestSpecThickMPattern(RdsNo, RecipeLayer, ScanNumDataPoints, RdsTestKeysFromRdsLayer, ToolClass, Zone='')
|
||||
If Unassigned(RecipeLayer) or RecipeLayer EQ '' then
|
||||
RecipeLayer = 'L1'
|
||||
end
|
||||
|
||||
MatchFound = False$
|
||||
|
||||
ValidArgs = Assigned(RdsNo) and RdsNo NE '' and Assigned(ScanNumDataPoints) and Num(ScanNumDataPoints)
|
||||
ValidArgs = ValidArgs and Assigned(RdsTestKeysFromRdsLayer) and Dcount(RdsTestKeysFromRdsLayer, @VM) GT 0
|
||||
ValidArgs = ValidArgs and Assigned(ToolClass) and ToolClass NE ''
|
||||
|
||||
If ValidArgs then
|
||||
For Each RDSTestKeyID in RdsTestKeysFromRdsLayer using @VM setting mkPos
|
||||
RdsTestRec = Database_Services('ReadDataRow', 'RDS_TEST', RDSTestKeyID)
|
||||
If Error_Services('NoError') then
|
||||
RdsTestRdsNo = RdsTestRec<RDS_TEST_RDS_NO$>
|
||||
If RdsNo EQ RdsTestRdsNo then
|
||||
RdsTestRecLayer = RdsTestRec<RDS_TEST_LS_ID$>
|
||||
If RecipeLayer EQ RdsTestRecLayer then
|
||||
Continue = True$
|
||||
If Zone NE '' then
|
||||
RdsTestRecZone = RdsTestRec<RDS_TEST_ZONE$>
|
||||
If RdsTestRecZone NE Zone then
|
||||
Continue = False$
|
||||
end
|
||||
end
|
||||
If Continue then
|
||||
SpecPatternName = RdsTestRec<RDS_TEST_SPEC_THICK_MPATTERN$>
|
||||
SpecNumDataPoints = Tool_Class_Services('GetNumberOfPointsForPattern', ToolClass, SpecPatternName)
|
||||
If ScanNumDataPoints EQ SpecNumDataPoints then
|
||||
MatchFound = True$
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Until MatchFound
|
||||
Next RDSTestKeyID
|
||||
end
|
||||
|
||||
Response = MatchFound
|
||||
end service
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -2877,3 +3016,4 @@ return
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,9 +1,12 @@
|
||||
Compile function Test_MetrologyServices(@Test)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
Declare function Metrology_Services
|
||||
$Insert LOGICAL
|
||||
|
||||
// TODO: Code to run before each test goes here
|
||||
Declare subroutine Metrology_Services, Error_Services
|
||||
Declare function Metrology_Services, Error_Services
|
||||
|
||||
Error_Services('Clear')
|
||||
|
||||
GotoTest
|
||||
|
||||
@ -15,44 +18,164 @@ Return TestResult or 1
|
||||
// TESTS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Test GetCalculatedLayerEpiProWithoutWoIsEpiProOrScannedLayerShouldReturnL2
|
||||
// GetCalculatedLayer(RDSKeyID, Machine, RunDataZone, WoIsEpiPro, ScannedLayer)
|
||||
//-----------------------------------------------------------------------------
|
||||
// GetCalculatedLayer Tests
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Test GetCalculatedLayerEpiProWithoutWoIsEpiProOrScannedLayerShouldReturnL2
|
||||
CalculatedLayer = Metrology_Services('GetCalculatedLayer', 649130, 'BioRad', 2)
|
||||
Assert CalculatedLayer equals 2
|
||||
end test
|
||||
|
||||
Test GetCalculatedLayerEpiProShouldReturnL2
|
||||
// GetCalculatedLayer(RDSKeyID, Machine, RunDataZone, WoIsEpiPro, ScannedLayer)
|
||||
|
||||
CalculatedLayer = Metrology_Services('GetCalculatedLayer', 649130, 'BioRad', 2, 1, 1)
|
||||
Assert CalculatedLayer equals 2
|
||||
end test
|
||||
|
||||
Test GetCalculatedLayerSingleLayerNonEpiProWithoutWoIsEpiProOrScannedLayerShouldReturnL1
|
||||
// GetCalculatedLayer(RDSKeyID, Machine, RunDataZone, WoIsEpiPro, ScannedLayer)
|
||||
|
||||
CalculatedLayer = Metrology_Services('GetCalculatedLayer', 648685, 'BioRad', '')
|
||||
Assert CalculatedLayer equals 'L1'
|
||||
end test
|
||||
|
||||
Test GetCalculatedLayerSingleLayerNonEpiProShouldReturnL1
|
||||
// GetCalculatedLayer(RDSKeyID, Machine, RunDataZone, WoIsEpiPro, ScannedLayer)
|
||||
|
||||
CalculatedLayer = Metrology_Services('GetCalculatedLayer', 648685, 'BioRad', '', 0, 1)
|
||||
Assert CalculatedLayer equals 'L1'
|
||||
end test
|
||||
|
||||
Test GetCalculatedLayerMultiLayerNonEpiProWithoutWoIsEpiProOrScannedLayerShouldReturn2
|
||||
// GetCalculatedLayer(RDSKeyID, Machine, RunDataZone, WoIsEpiPro, ScannedLayer)
|
||||
|
||||
CalculatedLayer = Metrology_Services('GetCalculatedLayer', 649834, 'BioRad', '')
|
||||
Assert CalculatedLayer equals 2
|
||||
end test
|
||||
|
||||
Test GetCalculatedLayerMultiLayerNonEpiProShouldReturnL1
|
||||
// GetCalculatedLayer(RDSKeyID, Machine, RunDataZone, WoIsEpiPro, ScannedLayer)
|
||||
|
||||
CalculatedLayer = Metrology_Services('GetCalculatedLayer', 649834, 'BioRad', '', 0, 'L1')
|
||||
Assert CalculatedLayer equals 'L1'
|
||||
end test
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ScanRecipeMatchesRdsTestSpecThickMrecipe Tests
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Test ScanRecipeMatchesRdsTestSpecThickMrecipeWithEmptyRdsNoShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanRecipeMatchesRdsTestSpecThickMrecipe', '', 'peach', 'mango', 'banana':@VM:'apple')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanRecipeMatchesRdsTestSpecThickMrecipeWithEmptyRecipeLayerShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanRecipeMatchesRdsTestSpecThickMrecipe', 'peach', '', 'mango', 'banana':@VM:'apple')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanRecipeMatchesRdsTestSpecThickMrecipeWithEmptyScanRecipeShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanRecipeMatchesRdsTestSpecThickMrecipe', 'peach', 'mango', '', 'banana':@VM:'apple')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanRecipeMatchesRdsTestSpecThickMrecipeWithEmptyRdsTestKeysShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanRecipeMatchesRdsTestSpecThickMrecipe', 'peach', 'apple', 'banana', '')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanRecipeMatchesRdsTestSpecThickMrecipeWithWrongRdsNoShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanRecipeMatchesRdsTestSpecThickMrecipe', 'peach', 'L2', 'Thin8inch', '1722576')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanRecipeMatchesRdsTestSpecThickMrecipeWithWrongLayerShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanRecipeMatchesRdsTestSpecThickMrecipe', '650214', 'L2', 'Thin8inch', '1722576')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanRecipeMatchesRdsTestSpecThickMrecipeWithWrongRecipeShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanRecipeMatchesRdsTestSpecThickMrecipe', '650214', 'L1', 'banana', '1722576')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanRecipeMatchesRdsTestSpecThickMrecipeWithWrongRdsTestKeysShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanRecipeMatchesRdsTestSpecThickMrecipe', '650214', 'L1', 'Thin8inch', '1722578')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanRecipeMatchesRdsTestSpecThickMrecipeWithCorrectArgsShouldReturnTrue
|
||||
Matches = Metrology_Services('ScanRecipeMatchesRdsTestSpecThickMrecipe', '650214', 'L1', 'Thin8inch', '1722576')
|
||||
Assert Matches equals True$
|
||||
end test
|
||||
|
||||
Test ScanRecipeMatchesRdsTestSpecThickMrecipeEpiProWithWrongZoneShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanRecipeMatchesRdsTestSpecThickMrecipe', '650028', '2', '6inTHICK', '1722253':@VM:'1722259', 4)
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanRecipeMatchesRdsTestSpecThickMrecipeEpiProWithCorrectArgsShouldReturnTrue
|
||||
Matches = Metrology_Services('ScanRecipeMatchesRdsTestSpecThickMrecipe', '650028', '2', '6inTHICK', '1722253':@VM:'1722259', 2)
|
||||
Assert Matches equals True$
|
||||
end test
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// ScanNumDataPointsMatchesRdsTestSpecThickMPattern Tests
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternWithEmptyRdsNoShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', '', 'peach', 5, 'banana':@VM:'apple', 'mango')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternWithEmptyRecipeLayerShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', 'peach', '', 5, 'banana':@VM:'apple', 'mango')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternWithStringScanNumDataPointsShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', 'peach', 'mango', 'potato', 'banana':@VM:'apple', 'pineapple')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternWithEmptyRdsTestKeysShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', 'peach', 'apple', 5, '', 'banana')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternWithEmptyToolClassShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', 'peach', 'apple', 5, 'banana':@VM:'apple', '')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternWithWrongRdsNoShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', 'peach', 'L2', 10, '1722576', 'FTIR')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternWithWrongLayerShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', '650214', 'L2', 10, '1722576', 'FTIR')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternWithWrongScanNumDataPointsShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', '650214', 'L1', 5, '1722576', 'FTIR')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternWithWrongRdsTestKeysShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', '650214', 'L1', 10, '1722578', 'FTIR')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternWithWrongToolClassShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', '650214', 'L1', 10, '1722576', 'banana')
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternWithCorrectArgsShouldReturnTrue
|
||||
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', '650214', 'L1', 10, '1722576', 'FTIR')
|
||||
Assert Matches equals True$
|
||||
end test
|
||||
|
||||
Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternEpiProWithWrongZoneShouldReturnFalse
|
||||
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', '650028', '2', 9, '1722253':@VM:'1722259', 'FTIR', 4)
|
||||
Assert Matches equals False$
|
||||
end test
|
||||
|
||||
Test ScanNumDataPointsMatchesRdsTestSpecThickMPatternEpiProWithCorrectArgsShouldReturnTrue
|
||||
Matches = Metrology_Services('ScanNumDataPointsMatchesRdsTestSpecThickMPattern', '650028', '2', 9, '1722253':@VM:'1722259', 'FTIR', 2)
|
||||
Assert Matches equals True$
|
||||
end test
|
||||
|
43
LSL2/STPROC/TEST_TOOL_CLASS_SERVICES.txt
Normal file
43
LSL2/STPROC/TEST_TOOL_CLASS_SERVICES.txt
Normal file
@ -0,0 +1,43 @@
|
||||
Compile function Test_Tool_Class_Services(@Test)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert LOGICAL
|
||||
|
||||
Declare function Tool_Class_Services, Error_Services
|
||||
Declare subroutine Tool_Class_Services, Error_Services
|
||||
|
||||
Error_Services('Clear')
|
||||
|
||||
GotoTest
|
||||
|
||||
Return TestResult or 1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// TESTS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Test GetNumberOfPointsForPatternWithEmptyToolClassShouldThrowError
|
||||
Tool_Class_Services('GetNumberOfPointsForPattern', '' , 'super cool pattern')
|
||||
Assert Error_Services('HasError') equals True$
|
||||
End Test
|
||||
|
||||
Test GetNumberOfPointsForPatternWithEmptyPatternNameShouldThrowError
|
||||
Tool_Class_Services('GetNumberOfPointsForPattern', 'best tool class ever' , '')
|
||||
Assert Error_Services('HasError') equals True$
|
||||
End Test
|
||||
|
||||
Test GetNumberOfPointsForPatternWithInvalidToolClassShouldThrowError
|
||||
Tool_Class_Services('GetNumberOfPointsForPattern', 'bestToolClassEver' , '10PT_5mm')
|
||||
Assert Error_Services('HasError') equals True$
|
||||
End Test
|
||||
|
||||
Test GetNumberOfPointsForPatternWithInvalidPatternNameShouldThrowError
|
||||
Tool_Class_Services('GetNumberOfPointsForPattern', 'FTIR' , 'superCoolPattern')
|
||||
Assert Error_Services('HasError') equals True$
|
||||
End Test
|
||||
|
||||
Test GetNumberOfPointsForPatternWithValidArgsShouldReturnCorrectNumberOfPoints
|
||||
ExpectedNumberOfPoints = 10
|
||||
ActualNumberOfPoints = Tool_Class_Services('GetNumberOfPointsForPattern', 'FTIR' , '10PT_5mm')
|
||||
Assert ActualNumberOfPoints equals ExpectedNumberOfPoints
|
||||
End Test
|
50
LSL2/STPROC/TOOL_CLASS_SERVICES.txt
Normal file
50
LSL2/STPROC/TOOL_CLASS_SERVICES.txt
Normal file
@ -0,0 +1,50 @@
|
||||
Compile function Tool_Class_Services(@Service, @Params)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
$insert LOGICAL
|
||||
$Insert SERVICE_SETUP
|
||||
|
||||
$Insert TOOL_CLASS_EQUATES
|
||||
|
||||
Declare subroutine Error_Services
|
||||
Declare function Error_Services, Database_Services
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service GetNumberOfPointsForPattern(ToolClass, PatternName)
|
||||
If Unassigned(ToolClass) or ToolClass EQ '' then
|
||||
Error_Services('Add', 'invalid tool class')
|
||||
end
|
||||
|
||||
If Error_Services('NoError') then
|
||||
If Unassigned(PatternName) or PatternName EQ '' then
|
||||
Error_Services('Add', 'invalid pattern name')
|
||||
end
|
||||
end
|
||||
|
||||
If Error_Services('NoError') then
|
||||
ToolClassRecord = Database_Services('ReadDataRow', 'TOOL_CLASS', ToolClass)
|
||||
If Error_Services('HasError') then
|
||||
Error_Services('Add', 'tool class record not found')
|
||||
end
|
||||
If Error_Services('NoError') then
|
||||
Locate PatternName in ToolClassRecord<TOOL_CLASS_PATTERN$> using @VM Setting idx then
|
||||
Response = ToolClassRecord<TOOL_CLASS_PATTERN_SIZE$, idx>
|
||||
end
|
||||
|
||||
NumberOfPatterns = DCount(ToolClassRecord<TOOL_CLASS_PATTERN$>, @VM)
|
||||
If idx GT NumberOfPatterns then
|
||||
Error_Services('Add', 'pattern name not found')
|
||||
end
|
||||
PatternSizeCount = DCount(ToolClassRecord<TOOL_CLASS_PATTERN_SIZE$>, @VM)
|
||||
If idx GT PatternSizeCount then
|
||||
Error_Services('Add', 'number of points not found')
|
||||
end
|
||||
end
|
||||
end
|
||||
End Service
|
Loading…
x
Reference in New Issue
Block a user