Skip to content

Commit

Permalink
Started working on issue #17, it's quite tricky.
Browse files Browse the repository at this point in the history
  • Loading branch information
sagatowski committed Dec 20, 2018
1 parent 19f6a05 commit 53f2b25
Show file tree
Hide file tree
Showing 5 changed files with 300 additions and 71 deletions.
12 changes: 12 additions & 0 deletions TcUnit/TcUnit/DUTs/ST_AssertResultInstances.TcDUT
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4022.16">
<DUT Name="ST_AssertResultInstances" Id="{018c91ab-7038-42ef-b6e4-5007ea06204f}">
<Declaration><![CDATA[TYPE ST_AssertResultInstances :
STRUCT
AssertResult : ST_AssertResult;
DetectionCount : UINT; // Amount of instances of the "AssertResult"
DetectionCountThisCycle : UINT; // Amount of instance of the "AssertResult" in this specific PLC-cycle
END_STRUCT
END_TYPE]]></Declaration>
</DUT>
</TcPlcObject>
2 changes: 1 addition & 1 deletion TcUnit/TcUnit/GVLs/GVL.TcGVL
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Declaration><![CDATA[{attribute 'no_assign'}
{attribute 'qualified_only'}
VAR_GLOBAL
AssertResultStatic : FB_AssertResultStatic;
//AssertResultStatic : FB_AssertResultStatic;
TcUnitRunner : FB_TcUnitRunner;
(* Indication of whether the last instantiated test suite has an assert instance created *)
Expand Down
2 changes: 1 addition & 1 deletion TcUnit/TcUnit/POUs/FB_Assert.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{attribute 'call_after_init'}
FUNCTION_BLOCK FB_Assert
VAR
AssertResults : FB_AssertResultStatic := GVL.AssertResultStatic;
AssertResults : FB_AssertResultStatic;// := GVL.AssertResultStatic;
(* Prints the failed asserts to ADS so that Visual Studio can display the assert message.
This assert formatter can be replaced with something else than ADS *)
Expand Down
Loading

0 comments on commit 53f2b25

Please sign in to comment.