-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #21. Remove empty variable type declarations.
- Loading branch information
Showing
6 changed files
with
148 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/TcBlackTests/TcPouTestData/FB_ExpectedWithEmptyVars.TcPOU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.3"> | ||
<POU Name="FB_WithEmptyVars" Id="{106fe56b-b616-4a50-9a9f-10b6fa9ebaf9}" SpecialFunc="None"> | ||
<Declaration><![CDATA[FUNCTION_BLOCK FB_WithEmptyVars | ||
VAR_INPUT | ||
OneInput : REAL; | ||
END_VAR | ||
]]></Declaration> | ||
<Implementation> | ||
<ST><![CDATA[]]></ST> | ||
</Implementation> | ||
<Method Name="DoesSomething" Id="{9b942f00-b876-4ffe-b4c8-ac0a0f43615a}"> | ||
<Declaration><![CDATA[METHOD DoesSomething : BOOL | ||
]]></Declaration> | ||
<Implementation> | ||
<ST><![CDATA[]]></ST> | ||
</Implementation> | ||
</Method> | ||
<Property Name="SomeProperty" Id="{ff352683-7d51-441b-a700-2f80c7229c20}"> | ||
<Declaration><![CDATA[PROPERTY SomeProperty : REAL | ||
]]></Declaration> | ||
<Get Name="Get" Id="{0498394d-8554-4775-8a47-1f6f5f4e3612}"> | ||
<Declaration><![CDATA[]]></Declaration> | ||
<Implementation> | ||
<ST><![CDATA[]]></ST> | ||
</Implementation> | ||
</Get> | ||
<Set Name="Set" Id="{ab0d6451-72bc-4e52-bc8c-978a54b39b98}"> | ||
<Declaration><![CDATA[]]></Declaration> | ||
<Implementation> | ||
<ST><![CDATA[]]></ST> | ||
</Implementation> | ||
</Set> | ||
</Property> | ||
</POU> | ||
</TcPlcObject> |
45 changes: 45 additions & 0 deletions
45
src/TcBlackTests/TcPouTestData/FB_InputWithEmptyVars.TcPOU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4024.3"> | ||
<POU Name="FB_WithEmptyVars" Id="{106fe56b-b616-4a50-9a9f-10b6fa9ebaf9}" SpecialFunc="None"> | ||
<Declaration><![CDATA[FUNCTION_BLOCK FB_WithEmptyVars | ||
VAR_INPUT | ||
OneInput : REAL; | ||
END_VAR | ||
VAR_OUTPUT | ||
END_VAR | ||
VAR | ||
END_VAR | ||
]]></Declaration> | ||
<Implementation> | ||
<ST><![CDATA[]]></ST> | ||
</Implementation> | ||
<Method Name="DoesSomething" Id="{9b942f00-b876-4ffe-b4c8-ac0a0f43615a}"> | ||
<Declaration><![CDATA[METHOD DoesSomething : BOOL | ||
VAR_INPUT | ||
END_VAR | ||
]]></Declaration> | ||
<Implementation> | ||
<ST><![CDATA[]]></ST> | ||
</Implementation> | ||
</Method> | ||
<Property Name="SomeProperty" Id="{ff352683-7d51-441b-a700-2f80c7229c20}"> | ||
<Declaration><![CDATA[PROPERTY SomeProperty : REAL]]></Declaration> | ||
<Get Name="Get" Id="{0498394d-8554-4775-8a47-1f6f5f4e3612}"> | ||
<Declaration><![CDATA[VAR | ||
END_VAR | ||
]]></Declaration> | ||
<Implementation> | ||
<ST><![CDATA[]]></ST> | ||
</Implementation> | ||
</Get> | ||
<Set Name="Set" Id="{ab0d6451-72bc-4e52-bc8c-978a54b39b98}"> | ||
<Declaration><![CDATA[VAR | ||
END_VAR | ||
]]></Declaration> | ||
<Implementation> | ||
<ST><![CDATA[]]></ST> | ||
</Implementation> | ||
</Set> | ||
</Property> | ||
</POU> | ||
</TcPlcObject> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters