-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TcUnit now works with TwinCAT 4020 (as well as with 4022/4024), thoug…
…h some major changes needed to be done. Removed FB_AnyComparator as it was discovered that it's not possible to use ANY-types in VAR_INPUT double-stacked (call to a method/function with ANY-variables, and then again calling a method/function with ANY-variables inside of that as well). This fix also solved the issue with TwinCAT 4020. Solved the following issues: #28 - "TcUnit returns erroneous results with 4020.32" #73 - "Add tester for free function F_AnyToUnionValue()" #83 - "Add tests for WRITE_PROTECTED_ functions"
- Loading branch information
1 parent
135307a
commit c50dcd8
Showing
14 changed files
with
651 additions
and
363 deletions.
There are no files selected for viewing
157 changes: 157 additions & 0 deletions
157
TcUnit-Verifier/TcUnit-Verifier_DotNet/TcUnit-Verifier/FB_WriteProtectedFunctions.cs
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,157 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace TcUnit.Verifier | ||
{ | ||
class FB_WriteProtectedFunctions : TestFunctionBlockAssert | ||
{ | ||
public FB_WriteProtectedFunctions(IEnumerable<ErrorList.Error> errors, string testFunctionBlockInstance = null) | ||
: base(errors, testFunctionBlockInstance) | ||
{ | ||
Test_WRITE_PROTECTED_BOOL(); | ||
Test_WRITE_PROTECTED_BYTE(); | ||
Test_WRITE_PROTECTED_DATE(); | ||
Test_WRITE_PROTECTED_DATE_AND_TIME(); | ||
Test_WRITE_PROTECTED_DINT(); | ||
Test_WRITE_PROTECTED_DWORD(); | ||
Test_WRITE_PROTECTED_INT(); | ||
TEST_WRITE_PROTECTED_LINT(); | ||
Test_WRITE_PROTECTED_LREAL(); | ||
Test_WRITE_PROTECTED_LWORD(); | ||
Test_WRITE_PROTECTED_REAL(); | ||
Test_WRITE_PROTECTED_SINT(); | ||
Test_WRITE_PROTECTED_STRING(); | ||
Test_WRITE_PROTECTED_TIME(); | ||
Test_WRITE_PROTECTED_TIME_OF_DAY(); | ||
Test_WRITE_PROTECTED_UDINT(); | ||
Test_WRITE_PROTECTED_UINT(); | ||
Test_WRITE_PROTECTED_USINT(); | ||
Test_WRITE_PROTECTED_ULINT(); | ||
Test_WRITE_PROTECTED_WORD(); | ||
|
||
} | ||
|
||
private void Test_WRITE_PROTECTED_BOOL() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_BOOL"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_BYTE() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_BYTE"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_DATE() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_DATE"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_DATE_AND_TIME() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_DATE_AND_TIME"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_DINT() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_DINT"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_DWORD() { | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_DWORD"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_INT() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_INT"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void TEST_WRITE_PROTECTED_LINT() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@TEST_WRITE_PROTECTED_LINT"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_LREAL() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_LREAL"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_LWORD() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_LWORD"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_REAL() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_REAL"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_SINT() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_SINT"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_STRING() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_STRING"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_TIME() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_TIME"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_TIME_OF_DAY() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_TIME_OF_DAY"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_UDINT() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_UDINT"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_UINT() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_UINT"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_USINT() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_USINT"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_ULINT() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_ULINT"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
private void Test_WRITE_PROTECTED_WORD() | ||
{ | ||
string testMessage = "PRG_TEST." + _testFunctionBlockInstance + "@Test_WRITE_PROTECTED_WORD"; | ||
AssertDoesNotContainMessage(testMessage, EnvDTE80.vsBuildErrorLevel.vsBuildErrorLevelHigh); | ||
} | ||
|
||
} | ||
} |
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
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
Oops, something went wrong.