Diff of /trunk/Library/POUs/FB_CdsTestResultLogger/LogTestSuiteResults/svnobj [r377] .. [r378]  Maximize  Restore

Switch to side-by-side view

--- a/trunk/Library/POUs/FB_CdsTestResultLogger/LogTestSuiteResults/svnobj
+++ b/trunk/Library/POUs/FB_CdsTestResultLogger/LogTestSuiteResults/svnobj
@@ -1,5 +1,6 @@
-Gx_l€B!0…jüo'7“ò˜1ÙÐESystem.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
rCfUnitTestResults REF= TestResults.GetTestSuiteResults();äIF PrintingTestSuiteResultNumber <= GVL_CfUnit.NumberOfInitializedTestSuites AND NOT PrintedTestSuitesResults THENò    PrintingTestSuiteTrigger(CLK := GVL_CfUnit.TestSuiteAddresses[PrintingTestSuiteResultNumber]^.AreAllTestsFinished());L    IF PrintingTestSuiteTrigger.Q THENv        StringToPrint := CONCAT(STR1 := '| Test suite ID=',¢                                             STR2 := UINT_TO_STRING(CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].Identity));l        StringToPrint := CONCAT(STR1 := StringToPrint,‚                                             STR2 :=  ' $'%s$'');Z                                             T        (* Print test suite name and ID *)¢        WRITE_DEVICE_LOG(MsgCtrlMask := UDINT_TO_DWORD(CmpLog.LogClass.LOG_INFO),Ž                                            MsgFmtStr := StringToPrint,ü                                            StrArg := CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].Name);Ž        (* Print number of tests/number of failed test in test suite *)`        StringToPrint := CONCAT(STR1 := '| ID=',ˆ                                STR2 := UINT_TO_STRING(CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].Identity));z                                STR2 := ' number of tests=');’                                STR2 := UINT_TO_STRING(CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].NumberOfTests)); Š                                STR2 := ', number of failed tests=');!¸                                             STR2 := UINT_TO_STRING(CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].NumberOfFailedTests));"j                          MsgFmtStr := StringToPrint,#P                          StrArg := '');$       %n        (* Iterate and print all tests in test suite *)&†        FOR TestsInTestSuiteCounter := 1 TO CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].NumberOfTests BY 1 DO'B            (* Print test name *)(ª            WRITE_DEVICE_LOG(MsgCtrlMask := UDINT_TO_DWORD(CmpLog.LogClass.LOG_INFO),)v                             MsgFmtStr := '| Test name=%s',*¸                             StrArg := CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].TestName);+N            (* Print test class name *),‚                             MsgFmtStr := '| Test class name=%s',-                             StrArg := CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].TestClassName);.@                                /            (* Print test result/status (SUCCESS, FAILED, SKIPPED) + number of assertions made *)0–            IF CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].TestIsFailed THEN1¸                StringToPrint := CONCAT(STR1 := '| Test status=', STR2 := TEST_STATUS_FAIL);2ž            ELSIF CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].TestIsSkipped THEN3¸                StringToPrint := CONCAT(STR1 := '| Test status=', STR2 := TEST_STATUS_SKIP);4             ELSE5¸                StringToPrint := CONCAT(STR1 := '| Test status=', STR2 := TEST_STATUS_PASS);6			END_IF7            8¶            StringToPrint := CONCAT(STR1 := StringToPrint, STR2 := ', number of asserts=');9„            StringToPrint := CONCAT(STR1 := StringToPrint, STR2 :=:ú                                                 UINT_TO_STRING(CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].NumberOfAsserts));;p                             MsgFmtStr := StringToPrint,<V                             StrArg := '');=~            (* Print assertion/failure message (if existing) *)>º            IF LEN(STR := CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].FailureMessage) > 0 THEN?²                WRITE_DEVICE_LOG(MsgCtrlMask := UDINT_TO_DWORD(CmpLog.LogClass.LOG_INFO),@’                                 MsgFmtStr := '| Test assert message=%s',AÌ                                 StrArg := CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].FailureMessage);B$            END_IFCx            (* Print assertion/failure type (if existing) *)DØ            IF CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].FailureType <> E_AssertionType.Type_UNDEFINED THENEŒ                                 MsgFmtStr := '| Test assert type=%s',F¦                                 StrArg := F_AssertionTypeToString(AssertionType :=G´                                 CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].FailureType));H        END_FORI°        IF PrintingTestSuiteResultNumber = GVL_CfUnit.NumberOfInitializedTestSuites THENJZ            PrintedTestSuitesResults := TRUE;K        ELSELž            PrintingTestSuiteResultNumber := PrintingTestSuiteResultNumber + 1;M        END_IFN€        PrintingTestSuiteTrigger(CLK := FALSE); // Reset triggerO    END_IFPEND_IFQ€(* Log end results once all test suites have finished running *)R¾IF PrintingTestSuiteResultNumber = GVL_CfUnit.NumberOfInitializedTestSuites AND NOT PrintedFinalTestResults AND TestResults.GetAreTestResultsAvailable() THEN  Sœ    WRITE_DEVICE_LOG(MsgCtrlMask := UDINT_TO_DWORD(CmpLog.LogClass.LOG_ERROR),TT                        MsgFmtStr := '%s',U¤                        StrArg := '| ==========TESTS FINISHED RUNNING==========');Vr                        MsgFmtStr := '| Test suites: %s',W°                        StrArg := UINT_TO_STRING(CfUnitTestResults.NumberOfTestSuites));Xf                        MsgFmtStr := '| Tests: %s',Y®                        StrArg := UINT_TO_STRING(CfUnitTestResults.NumberOfTestCases));Z|                        MsgFmtStr := '| Successful tests: %s',[                        StrArg := UINT_TO_STRING(CfUnitTestResults.NumberOfSuccessfulTestCases));\t                        MsgFmtStr := '| Failed tests: %s',]º                        StrArg := UINT_TO_STRING(CfUnitTestResults.NumberOfFailedTestCases));^œ                        StrArg := '| ======================================');_H    PrintedFinalTestResults := TRUE;`InterfaceaL{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}bBMETHOD PUBLIC LogTestSuiteResultscVARdr    CfUnitTestResults : REFERENCE TO ST_TestSuiteResults;eB    StringToPrint : T_MaxString; f²    TestsInTestSuiteCounter : UINT(1..GVL_Param_CfUnit.MaxNumberOfTestsForEachTestSuite);gEND_VARhVAR CONSTANTiP    TEST_STATUS_SKIP : STRING := 'SKIP';jP    TEST_STATUS_PASS : STRING := 'PASS';kP    TEST_STATUS_FAIL : STRING := 'FAIL';ÐÐÐEkÐÐ	
+Gx_lC!0…jüoA7MV©„þü²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
rCfUnitTestResults REF= TestResults.GetTestSuiteResults();äIF PrintingTestSuiteResultNumber <= GVL_CfUnit.NumberOfInitializedTestSuites AND NOT PrintedTestSuitesResults THENò    PrintingTestSuiteTrigger(CLK := GVL_CfUnit.TestSuiteAddresses[PrintingTestSuiteResultNumber]^.AreAllTestsFinished());L    IF PrintingTestSuiteTrigger.Q THENv        StringToPrint := CONCAT(STR1 := '| Test suite ID=',¢                                             STR2 := UINT_TO_STRING(CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].Identity));l        StringToPrint := CONCAT(STR1 := StringToPrint,‚                                             STR2 :=  ' $'%s$'');Z                                             T        (* Print test suite name and ID *)¢        WRITE_DEVICE_LOG(MsgCtrlMask := UDINT_TO_DWORD(CmpLog.LogClass.LOG_INFO),Ž                                            MsgFmtStr := StringToPrint,ü                                            StrArg := CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].Name);Ž        (* Print number of tests/number of failed test in test suite *)`        StringToPrint := CONCAT(STR1 := '| ID=',ˆ                                STR2 := UINT_TO_STRING(CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].Identity));z                                STR2 := ' number of tests=');’                                STR2 := UINT_TO_STRING(CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].NumberOfTests)); Š                                STR2 := ', number of failed tests=');!¸                                             STR2 := UINT_TO_STRING(CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].NumberOfFailedTests));"j                          MsgFmtStr := StringToPrint,#P                          StrArg := '');$       %n        (* Iterate and print all tests in test suite *)&†        FOR TestsInTestSuiteCounter := 1 TO CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].NumberOfTests BY 1 DO'B            (* Print test name *)(ª            WRITE_DEVICE_LOG(MsgCtrlMask := UDINT_TO_DWORD(CmpLog.LogClass.LOG_INFO),)v                             MsgFmtStr := '| Test name=%s',*¸                             StrArg := CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].TestName);+N            (* Print test class name *),‚                             MsgFmtStr := '| Test class name=%s',-                             StrArg := CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].TestClassName);.@                                /            (* Print test result/status (SUCCESS, FAILED, SKIPPED) + number of assertions made *)0–            IF CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].TestIsFailed THEN1¸                StringToPrint := CONCAT(STR1 := '| Test status=', STR2 := TEST_STATUS_FAIL);2ž            ELSIF CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].TestIsSkipped THEN3¸                StringToPrint := CONCAT(STR1 := '| Test status=', STR2 := TEST_STATUS_SKIP);4             ELSE5¸                StringToPrint := CONCAT(STR1 := '| Test status=', STR2 := TEST_STATUS_PASS);6			END_IF7            8¶            StringToPrint := CONCAT(STR1 := StringToPrint, STR2 := ', number of asserts=');9„            StringToPrint := CONCAT(STR1 := StringToPrint, STR2 :=:ú                                                 UINT_TO_STRING(CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].NumberOfAsserts));;p                             MsgFmtStr := StringToPrint,<V                             StrArg := '');=~            (* Print assertion/failure message (if existing) *)>º            IF LEN(STR := CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].FailureMessage) > 0 THEN?²                WRITE_DEVICE_LOG(MsgCtrlMask := UDINT_TO_DWORD(CmpLog.LogClass.LOG_INFO),@’                                 MsgFmtStr := '| Test assert message=%s',AÌ                                 StrArg := CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].FailureMessage);B$            END_IFCx            (* Print assertion/failure type (if existing) *)DØ            IF CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].FailureType <> E_AssertionType.Type_UNDEFINED THENEŒ                                 MsgFmtStr := '| Test assert type=%s',F¦                                 StrArg := F_AssertionTypeToString(AssertionType :=G´                                 CfUnitTestResults.TestSuiteResults[PrintingTestSuiteResultNumber].TestCaseResults[TestsInTestSuiteCounter].FailureType));H        END_FORI°        IF PrintingTestSuiteResultNumber = GVL_CfUnit.NumberOfInitializedTestSuites THENJZ            PrintedTestSuitesResults := TRUE;K        ELSELž            PrintingTestSuiteResultNumber := PrintingTestSuiteResultNumber + 1;M        END_IFN€        PrintingTestSuiteTrigger(CLK := FALSE); // Reset triggerO    END_IFPEND_IFQ€(* Log end results once all test suites have finished running *)R¾IF PrintingTestSuiteResultNumber = GVL_CfUnit.NumberOfInitializedTestSuites AND NOT PrintedFinalTestResults AND TestResults.GetAreTestResultsAvailable() THEN  Sœ    WRITE_DEVICE_LOG(MsgCtrlMask := UDINT_TO_DWORD(CmpLog.LogClass.LOG_ERROR),TT                        MsgFmtStr := '%s',U¤                        StrArg := '| ==========TESTS FINISHED RUNNING==========');V
+					Wr                        MsgFmtStr := '| Test suites: %s',X°                        StrArg := UINT_TO_STRING(CfUnitTestResults.NumberOfTestSuites));Y						Zf                        MsgFmtStr := '| Tests: %s',[®                        StrArg := UINT_TO_STRING(CfUnitTestResults.NumberOfTestCases));\|                        MsgFmtStr := '| Successful tests: %s',]                        StrArg := UINT_TO_STRING(CfUnitTestResults.NumberOfSuccessfulTestCases));^t                        MsgFmtStr := '| Failed tests: %s',_º                        StrArg := UINT_TO_STRING(CfUnitTestResults.NumberOfFailedTestCases));`œ                        StrArg := '| ======================================');aH    PrintedFinalTestResults := TRUE;bInterfacecL{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}dBMETHOD PUBLIC LogTestSuiteResultseVARfr    CfUnitTestResults : REFERENCE TO ST_TestSuiteResults;gB    StringToPrint : T_MaxString; h²    TestsInTestSuiteCounter : UINT(1..GVL_Param_CfUnit.MaxNumberOfTestsForEachTestSuite);iEND_VARjVAR CONSTANTkP    TEST_STATUS_SKIP : STRING := 'SKIP';lP    TEST_STATUS_PASS : STRING := 'PASS';mP    TEST_STATUS_FAIL : STRING := 'FAIL';ÐÐÐEpÐÐ	
 ­”ÚÐ-
ÐÐ	
 ­“ÚÐ-ÐÐ	
 ­ÚÐ-ÐÐ	
@@ -90,31 +91,36 @@
 ­IÚÐ-SÐÐ	
 ­fÚÐ-TÐÐ	
 ­KÚÐ-UÐÐ	
+­ÉÚÐ-VÐÐ	
 ­LÚÐ-SÐÐ	
-­MÚÐ-VÐÐ	
-­NÚÐ-WÐÐ	
+­MÚÐ-WÐÐ	
+­NÚÐ-XÐÐ	
+­ÊÚÐ-YÐÐ	
 ­OÚÐ-SÐÐ	
-­PÚÐ-XÐÐ	
-­QÚÐ-YÐÐ	
+­PÚÐ-ZÐÐ	
+­QÚÐ-[ÐÐ	
+­ËÚÐ-YÐÐ	
 ­RÚÐ-SÐÐ	
-­SÚÐ-ZÐÐ	
-­TÚÐ-[ÐÐ	
+­SÚÐ-\ÐÐ	
+­TÚÐ-]ÐÐ	
+­ÌÚÐ-YÐÐ	
 ­UÚÐ-SÐÐ	
-­VÚÐ-\ÐÐ	
-­WÚÐ-]ÐÐ	
+­VÚÐ-^ÐÐ	
+­WÚÐ-_ÐÐ	
+­ÍÚÐ-YÐÐ	
 ­XÚÐ-SÐÐ	
 ­YÚÐ-TÐÐ	
-­ZÚÐ-^ÐÐ	
-­[ÚÐ-_ÐÐ	
-­ÚÐ-PÐ`aÐEÐÐ	
-­ÚÐ-bÐÐ	
-­žÚÐ-cÐÐ	
-­ÚÐ-dÐÐ	
-­ÚÐ-eÐÐ	
-­‘ÚÐ-fÐÐ	
-­\ÚÐ-gÐÐ	
-­–ÚÐ-hÐÐ	
-­—ÚÐ-iÐÐ	
-­˜ÚÐ-jÐÐ	
-­™ÚÐ-kÐÐ	
-­•ÚÐ-g+­ZÚÐ-`ÐÐ	
+­[ÚÐ-aÐÐ	
+­ÚÐ-PÐbcÐEÐÐ	
+­ÚÐ-dÐÐ	
+­žÚÐ-eÐÐ	
+­ÚÐ-fÐÐ	
+­ÚÐ-gÐÐ	
+­‘ÚÐ-hÐÐ	
+­\ÚÐ-iÐÐ	
+­–ÚÐ-jÐÐ	
+­—ÚÐ-kÐÐ	
+­˜ÚÐ-lÐÐ	
+­™ÚÐ-mÐÐ	
+­•ÚÐ-i