[r78]: / trunk / Library / POUs / FB_CfUnitRunner / RunTestSuiteTests / svnobj  Maximize  Restore  History

Download this file

36 lines (34 with data), 7.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
METHOD RunTestSuiteTests
VAR
    Counter : UINT := 0;
    BusyPrinting : BOOL;
	
       as we don't consider the tests to be completely finished until all test suites have executed completely.
       are finished (which might take many cycles), do we gather correct statistics *)
    AmountOfTestSuitesFinished_Temp : UINT := 0;
    AmountOfTestCases_Temp : UINT := 0;
    AmountOfFailedTestCases_Temp : UINT := 0;
    AmountOfSuccessfulTestCases_Temp : UINT := 0;
IF NOT AllTestSuitesFinished THEN
    IF GVL_CfUnit.AmountOfInitializedTestSuites = 0 THEN
        AllTestSuitesFinished := TRUE;
    ELSIF GVL_CfUnit.AmountOfInitializedTestSuites > 0 THEN
            IF GVL_CfUnit.TestSuiteAddresses[Counter]^.AllTestsFinished() THEN
                AmountOfTestCases_Temp := GVL_CfUnit.TestSuiteAddresses[Counter]^.GetAmountOfTests() + AmountOfTestCases_Temp;
                AmountOfSuccessfulTestCases_Temp := GVL_CfUnit.TestSuiteAddresses[Counter]^.GetAmountOfSuccessfulTests() + AmountOfSuccessfulTestCases_Temp;
            ELSE
                RunnableTestSuiteResults[Counter] := GVL_CfUnit.CurrentTestSuiteBeingCalled^.GetRunState();
            END_IF
        END_FOR
            AmountOfTestSuitesFinished := AmountOfTestSuitesFinished_Temp;
            AmountOfTestCases := AmountOfTestCases_Temp;
            AmountOfSuccessfulTestCases := AmountOfSuccessfulTestCases_Temp;
            AllTestSuitesFinished := TRUE;
        END_IF
    END_IF
END_IF'
IF AllTestSuitesFinished THEN
    IF NOT DonePrintingTestResults THEN
                                 AmountOfTestCases := AmountOfTestCases,
                                 AmountOfFailedTestCases := AmountOfFailedTestCases,
                                 Busy => BusyPrinting);
        DonePrintingTestResults := NOT BusyPrinting;