[r15]: / trunk / Library / POUs / FB_TestSuite / AddTest / svnobj  Maximize  Restore  History

Download this file

69 lines (69 with data), 8.3 kB

Gx_lZ !0…jüoáHËæ´Qš`âSystem.StringL{f8a58466-d7f6-439f-bbb8-d4600e41d099}ImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocumentL{f3878285-8e4f-490b-bb1b-9acbb7eb04db}TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}	Id
longTagText
ŠGVL.IgnoreCurrentTest := FALSE; // Reset the ignore current test flagVTrimmedTestName := F_LTrim(in := TestName);dTrimmedTestName := F_RTrim(in := TrimmedTestName);nLowerCasedTestName := F_ToLCase(in := TrimmedTestName);V(* Check if this test should be disabled *)‚IF FIND(STR1 := LowerCasedTestName, STR2 := 'disabled_') = 1 THEND    GVL.IgnoreCurrentTest := TRUE;    RETURN;END_IFÊ//GetCurrentTaskIndex(); // Gets the task index of where this function block instance is being run inÎ(* Check if the test name already exists. Make sure there are no other tests with the same name already>   added for this test suite *)´//CycleCount := TwinCAT_SystemInfoVarList._TaskInfo[GetCurrentTaskIndex.index].CycleCount;// Replaced by;,GetCurrentTaskIndex();|CycleCount := GetCurrentTaskIndex.CurTaskInfo.dwIECCycleCount;´(* Iterate all the test names that up to this point have been added for this test suite *)bFOR IteratorCounter := 1 TO NumberOfTests BY 1 DO |    IF Tests[IteratorCounter].GetName() = TrimmedTestName THEN!\        TestWithThisNameAlreadyExists := TRUE;"¬        (* Check if a test with this name has already been called in this PLC cycle *)#‚        IF TestCycleCountIndex[IteratorCounter] = CycleCount THEN$T            GVL.IgnoreCurrentTest := TRUE;%ä            (* A test with this name already exists for this test suite and has already been called in this cycle.&®               Send a message notification, but only if we have not done so already. *)'†            TestDuplicateNameTrigger[IteratorCounter](CLK := TRUE);(ò            IF TestDuplicateNameTrigger[IteratorCounter].Q THEN // Rising edge detected. We have not reported this before)Æ                TestInstancePath := F_RemoveInstancePathAndProjectNameFromTestInstancePath(TestInstancePath := GVL.CurrentTestSuiteBeingCalled.GetInstancePath() );*°                ErrorMessage := 'Test with name $'%s$' already exists in test suite $'';+®                ErrorMessage := CONCAT(STR1 := ErrorMessage, STR2 := TestInstancePath);,–                ErrorMessage := CONCAT(STR1 := ErrorMessage, STR2 := '$'');-¢                FunctionCallResult := LOGSTR(msgCtrlMask := ADSLOG_MSGTYPE_ERROR,.ª                                                           msgFmtStr := ErrorMessage,/¬                                                           strArg := TrimmedTestName);0$            END_IF1        END_IF2v        TestCycleCountIndex[IteratorCounter] := CycleCount;3    END_IF4END_FOR5RIF NOT TestWithThisNameAlreadyExists THEN6T    (* Test has not been found. Add it. *)7x    Tests[IteratorCounter].SetName(Name := TrimmedTestName);8N    NumberOfTests := NumberOfTests + 1;9j    TestCycleCountIndex[NumberOfTests] := CycleCount;:Interface;L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}<*METHOD PUBLIC AddTest=VAR_INPUT>6    TestName : T_MaxString;?END_VAR@VARA6    IteratorCounter : UINT;B>    ErrorMessage : T_MaxString;CF    TestInstancePath : T_MaxString;D<    FunctionCallResult : DINT;E.    CycleCount : UDINT;Fd    TestWithThisNameAlreadyExists : BOOL := FALSE;GJ    LowerCasedTestName : T_MaxString;HD    TrimmedTestName : T_MaxString;ÐÐÐE4ÐÐ	
­ÚÐ-
ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­	ÚÐ-ÐÐ	
­
ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­
ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­FÚÐ-ÐÐ	
­GÚÐ-ÐÐ	
­AÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ-ÐÐ	
­ÚÐ- ÐÐ	
­ÚÐ-!ÐÐ	
­ÚÐ-"ÐÐ	
­ÚÐ-#ÐÐ	
­ÚÐ-$ÐÐ	
­ÚÐ-%ÐÐ	
­ÚÐ-&ÐÐ	
­ÚÐ-'ÐÐ	
­ ÚÐ-(ÐÐ	
­!ÚÐ-)ÐÐ	
­#ÚÐ-*ÐÐ	
­$ÚÐ-+ÐÐ	
­%ÚÐ-,ÐÐ	
­&ÚÐ--ÐÐ	
­'ÚÐ-.ÐÐ	
­(ÚÐ-/ÐÐ	
­)ÚÐ-0ÐÐ	
­*ÚÐ-1ÐÐ	
­+ÚÐ-2ÐÐ	
­,ÚÐ-3ÐÐ	
­-ÚÐ-4ÐÐ	
­.ÚÐ-ÐÐ	
­/ÚÐ-5ÐÐ	
­0ÚÐ-6ÐÐ	
­1ÚÐ-7ÐÐ	
­2ÚÐ-8ÐÐ	
­3ÚÐ-9ÐÐ	
­ÚÐ-Ð:;ÐEÐÐ	
­4ÚÐ-<ÐÐ	
­5ÚÐ-=ÐÐ	
­6ÚÐ->ÐÐ	
­7ÚÐ-?ÐÐ	
­8ÚÐ-@ÐÐ	
­9ÚÐ-AÐÐ	
­:ÚÐ-BÐÐ	
­;ÚÐ-CÐÐ	
­<ÚÐ-DÐÐ	
­=ÚÐ-EÐÐ	
­>ÚÐ-FÐÐ	
­?ÚÐ-GÐÐ	
­@ÚÐ-HÐÐ	
­ÚÐ-?