Declaration source
{attribute 'no_assign'}
{attribute 'qualified_only'}
VAR_GLOBAL
TcUnitRunner : FB_TcUnitRunner;
(* Indication of whether the last instantiated test suite has an assert instance created *)
TestSuiteIsRegistered : BOOL;
(* Pointer to current test suite being called *)
CurrentTestSuiteBeingCalled : POINTER TO FB_TestSuite;
(* Current name of test being called *)
CurrentTestNameBeingCalled : T_MaxString;
(* Used to get the current cpu cycle counter to calculate the duration of tests and test suits, respectively *)
GetCpuCounter : GETCPUCOUNTER;
(* Stores the CPU cycle count with 100ns precision since the first entry into one of the Run methods (RUN, RUN_IN_SEQUENCE) *)
StartedAt : LWORD;
(* Duration it took for a complete run, in seconds *)
Duration : LREAL;
(* Whether or not the current test being called has finished running *)
CurrentTestIsFinished : BOOL;
(* This is a flag that indicates that the current test should be ignored, and
thus that all assertions under it should be ignored as well. A test can be ignored either
because the user has requested so, or because the test is a duplicate name *)
IgnoreCurrentTest : BOOL;
(* The assert function block instance should be 1:1 mapped to
the test suite instance path. *)
NumberOfInitializedTestSuites : UINT := 0;
TestSuiteAddresses : ARRAY[1..GVL_Param_TcUnit.MaxNumberOfTestSuites] OF POINTER TO FB_TestSuite;
(* If the user is utilizing the TEST_ORDERED(), we need to keep track of which ordered test is currently running.
We do this by defining an array, in where we can see which current TEST_ORDERED() is the one to be handled right now.
The below array is only used for TEST_ORDERED()-tests. *)
CurrentlyRunningOrderedTestInTestSuite : ARRAY[1..GVL_Param_TcUnit.MaxNumberOfTestSuites] OF UINT(1..GVL_Param_TcUnit.MaxNumberOfTestsForEachTestSuite);
(* Buffered ADS message queue for output to the error list *)
AdsMessageQueue : FB_AdsLogStringMessageFifoQueue;
END_VAR
VAR_GLOBAL CONSTANT
(* Multiply a value that is given in 100ns units by this value to
convert the value to seconds *)
HundredNanosecondToSecond : LREAL := 1.0 / 10000000.0;
END_VAR