Skip to content

Commit f337232

Browse files
committed
Removed library namespaces.
1 parent d054c44 commit f337232

34 files changed

Lines changed: 781 additions & 782 deletions

TcUnit/TcUnit/DUTs/ST_AdsLogStringMessage.TcDUT

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
TYPE ST_AdsLogStringMessage :
66
STRUCT
77
MsgCtrlMask : DWORD;
8-
MsgFmtStr : Tc2_System.T_MaxString;
9-
StrArg : Tc2_System.T_MaxString;
8+
MsgFmtStr : T_MaxString;
9+
StrArg : T_MaxString;
1010
END_STRUCT
1111
END_TYPE]]></Declaration>
1212
</DUT>

TcUnit/TcUnit/DUTs/ST_AssertArrayResult.TcDUT

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ STRUCT
77
ExpectedsTypeClass : IBaseLibrary.TypeClass; // The data type of the expecteds-array
88
ActualsSize : UDINT; // Size in bytes of the actuals-array
99
ActualsTypeClass : IBaseLibrary.TypeClass; // The data type of the actuals-array
10-
Message : Tc2_System.T_MaxString;
11-
TestInstancePath : Tc2_System.T_MaxString;
10+
Message : T_MaxString;
11+
TestInstancePath : T_MaxString;
1212
END_STRUCT
1313
END_TYPE]]></Declaration>
1414
</DUT>

TcUnit/TcUnit/DUTs/ST_AssertResult.TcDUT

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
STRUCT
66
Expected : U_ExpectedOrActual;
77
Actual : U_ExpectedOrActual;
8-
Message : Tc2_System.T_MaxString;
9-
TestInstancePath : Tc2_System.T_MaxString;
8+
Message : T_MaxString;
9+
TestInstancePath : T_MaxString;
1010
END_STRUCT
1111
END_TYPE]]></Declaration>
1212
</DUT>

TcUnit/TcUnit/DUTs/ST_TestCaseResult.TcDUT

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<DUT Name="ST_TestCaseResult" Id="{9c511c0b-2edf-4938-bd37-33f5b59a1386}">
44
<Declaration><![CDATA[TYPE ST_TestCaseResult :
55
STRUCT
6-
TestName : Tc2_System.T_MaxString;
7-
TestClassName : Tc2_System.T_MaxString;
6+
TestName : T_MaxString;
7+
TestClassName : T_MaxString;
88
TestIsFailed : BOOL;
99
TestIsSkipped : BOOL;
10-
FailureMessage : Tc2_System.T_MaxString;
10+
FailureMessage : T_MaxString;
1111
FailureType : E_AssertionType;
1212
NumberOfAsserts : UINT;
1313
Duration : LREAL; // in seconds

TcUnit/TcUnit/DUTs/ST_TestSuiteResult.TcDUT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<DUT Name="ST_TestSuiteResult" Id="{46edf1c4-cab0-428e-8570-28c096b4eecf}">
44
<Declaration><![CDATA[TYPE ST_TestSuiteResult :
55
STRUCT
6-
Name : Tc2_System.T_MaxString; // Full class name
6+
Name : T_MaxString; // Full class name
77
Identity : UINT(0..GVL_Param_TcUnit.MaxNumberOfTestSuites); // Should be 0..GVL_Param_TcUnit.MaxNumberOfTestSuites-1 but gives unknown compiler error
88
NumberOfTests : UINT(0..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite);
99
NumberOfFailedTests : UINT(0..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite);

TcUnit/TcUnit/DUTs/U_ExpectedOrActual.TcDUT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ UNION
88
byteExpectedOrActual : BYTE;
99
dwordExpectedOrActual : DWORD;
1010
lwordExpectedOrActual : LWORD;
11-
stringExpectedOrActual : Tc2_System.T_MaxString;
11+
stringExpectedOrActual : T_MaxString;
1212
udintExpectedOrActual : UDINT;
1313
uintExpectedOrActual : UINT;
1414
usintExpectedOrActual : USINT;

TcUnit/TcUnit/GVLs/GVL_Param_TcUnit.TcGVL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ VAR_GLOBAL CONSTANT
2929
xUnitBufferSize : UDINT := 65535;
3030
3131
(* Default path and filename for the xunit testresults e.g.: for use with jenkins *)
32-
xUnitFilePath : Tc2_System.T_MaxString := 'C:\tcunit_xunit_testresults.xml';
32+
xUnitFilePath : T_MaxString := 'C:\tcunit_xunit_testresults.xml';
3333
3434
(* This is the maximum number of ADS-messages that can be stored for reporting at the same time.
3535
Having a size of 2000 means that it's possible to report up to ~400 test cases in one single

TcUnit/TcUnit/GVLs/GVL_TcUnit.TcGVL

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ VAR_GLOBAL
1313
CurrentTestSuiteBeingCalled : POINTER TO FB_TestSuite;
1414
1515
(* Current name of test being called *)
16-
CurrentTestNameBeingCalled : Tc2_System.T_MaxString;
16+
CurrentTestNameBeingCalled : T_MaxString;
1717
1818
(* Used to get the current cpu cycle counter to calculate the duration of tests and test suits, respectively *)
19-
GetCpuCounter : Tc2_System.GETCPUCOUNTER;
19+
GetCpuCounter : GETCPUCOUNTER;
2020
2121
(* Stores the CPU cycle count with 100ns precision since the first entry into one of the Run methods (RUN, RUN_IN_SEQUENCE) *)
2222
StartedAt : LWORD;

TcUnit/TcUnit/ITFs/I_AssertMessageFormatter.TcIO

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
<Method Name="LogAssertFailure" Id="{35efab01-6ac8-46a5-a5e1-adb4f1f5f9b2}">
77
<Declaration><![CDATA[METHOD LogAssertFailure
88
VAR_INPUT
9-
Expected : Tc2_System.T_MaxString;
10-
Actual : Tc2_System.T_MaxString;
11-
Message : Tc2_System.T_MaxString;
12-
TestInstancePath : Tc2_System.T_MaxString;
9+
Expected : T_MaxString;
10+
Actual : T_MaxString;
11+
Message : T_MaxString;
12+
TestInstancePath : T_MaxString;
1313
END_VAR]]></Declaration>
1414
</Method>
1515
</Itf>

TcUnit/TcUnit/POUs/FB_AdjustAssertFailureMessageToMax253CharLength.TcPOU

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
*)
88
FUNCTION_BLOCK FB_AdjustAssertFailureMessageToMax253CharLength
99
VAR_INPUT
10-
MsgFmtString : Tc2_System.T_MaxString; // Test instance path
11-
StringArg : Tc2_System.T_MaxString; // Test message
10+
MsgFmtString : T_MaxString; // Test instance path
11+
StringArg : T_MaxString; // Test message
1212
END_VAR
1313
VAR_OUTPUT
14-
MsgFmtStringProcessed : Tc2_System.T_MaxString;
15-
StringArgProcessed : Tc2_System.T_MaxString;
14+
MsgFmtStringProcessed : T_MaxString;
15+
StringArgProcessed : T_MaxString;
1616
END_VAR
1717
VAR
18-
MsgFmtStringTemp : Tc2_System.T_MaxString;
18+
MsgFmtStringTemp : T_MaxString;
1919
TestNameTooLong : STRING := '...TestName too long';
2020
TestMsgTooLong : STRING := '...TestMsg too long';
2121
END_VAR
@@ -26,24 +26,24 @@ END_VAR]]></Declaration>
2626
<ST><![CDATA[// Check if any of the two strings are too long (or the combination of them)
2727
2828
// All OK
29-
IF (Tc2_Standard.LEN(STR := MsgFmtString) + LEN(STR := StringArg)) <= MSG_FMT_STRING_MAX_NUMBER_OF_CHARACTERS THEN
29+
IF (LEN(STR := MsgFmtString) + LEN(STR := StringArg)) <= MSG_FMT_STRING_MAX_NUMBER_OF_CHARACTERS THEN
3030
MsgFmtStringProcessed := MsgFmtString;
3131
StringArgProcessed := StringArg;
3232
// If test instance path is longer than 253 chars, shorten it down to 253 characters and additionally with the length of the '...TestName too long'. Add the text '...TestName too long' to the test instance path. Leave no characters for the message.
33-
ELSIF Tc2_Standard.LEN(STR := MsgFmtString) > MSG_FMT_STRING_MAX_NUMBER_OF_CHARACTERS THEN
34-
MsgFmtStringTemp := Tc2_Standard.LEFT(STR := MsgFmtString, SIZE := (MSG_FMT_STRING_MAX_NUMBER_OF_CHARACTERS - Tc2_Standard.LEN(STR := TestNameTooLong)));
35-
MsgFmtStringProcessed := Tc2_Standard.CONCAT(STR1 := MsgFmtStringTemp, STR2 := TestNameTooLong);
33+
ELSIF LEN(STR := MsgFmtString) > MSG_FMT_STRING_MAX_NUMBER_OF_CHARACTERS THEN
34+
MsgFmtStringTemp := LEFT(STR := MsgFmtString, SIZE := (MSG_FMT_STRING_MAX_NUMBER_OF_CHARACTERS - LEN(STR := TestNameTooLong)));
35+
MsgFmtStringProcessed := CONCAT(STR1 := MsgFmtStringTemp, STR2 := TestNameTooLong);
3636
StringArgProcessed := '';
3737
// If test message is too long (so we cant fit the text "...TestMsg too long" to the end of it) , shorten it (so that we can fit the text)
38-
ELSIF (MSG_FMT_STRING_MAX_NUMBER_OF_CHARACTERS - Tc2_Standard.LEN(STR := TestMsgTooLong)) >= Tc2_Standard.LEN(STR := MsgFmtString) THEN
38+
ELSIF (MSG_FMT_STRING_MAX_NUMBER_OF_CHARACTERS - LEN(STR := TestMsgTooLong)) >= LEN(STR := MsgFmtString) THEN
3939
MsgFmtStringProcessed := MsgFmtString;
40-
StringArgProcessed := Tc2_Standard.LEFT(STR := StringArg,
41-
SIZE := (MSG_FMT_STRING_MAX_NUMBER_OF_CHARACTERS - Tc2_Standard.LEN(STR := TestMsgTooLong) - Tc2_Standard.LEN(STR := MsgFmtStringProcessed)));
42-
StringArgProcessed := Tc2_Standard.CONCAT(STR1 := StringArgProcessed, STR2 := TestMsgTooLong);
40+
StringArgProcessed := LEFT(STR := StringArg,
41+
SIZE := (MSG_FMT_STRING_MAX_NUMBER_OF_CHARACTERS - LEN(STR := TestMsgTooLong) - LEN(STR := MsgFmtStringProcessed)));
42+
StringArgProcessed := CONCAT(STR1 := StringArgProcessed, STR2 := TestMsgTooLong);
4343
// If test instance path is too long (length is between 233 and 253 characters long), shorten it and add the text '...TestName too long'. Leave no characters for the message
4444
ELSE
45-
MsgFmtStringTemp := Tc2_Standard.LEFT(STR := MsgFmtString, SIZE := (MSG_FMT_STRING_MAX_NUMBER_OF_CHARACTERS - Tc2_Standard.LEN(STR := TestNameTooLong)));
46-
MsgFmtStringProcessed := Tc2_Standard.CONCAT(STR1 := MsgFmtStringTemp, STR2 := TestNameTooLong);
45+
MsgFmtStringTemp := LEFT(STR := MsgFmtString, SIZE := (MSG_FMT_STRING_MAX_NUMBER_OF_CHARACTERS - LEN(STR := TestNameTooLong)));
46+
MsgFmtStringProcessed := CONCAT(STR1 := MsgFmtStringTemp, STR2 := TestNameTooLong);
4747
StringArgProcessed := '';
4848
END_IF]]></ST>
4949
</Implementation>

0 commit comments

Comments
 (0)