1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | IF NOT FirstCycleExecuted THEN GetCurrentTaskIndex(); CurrentCycleCount := GetCurrentTaskIndex.CurTaskInfo.dwIECCycleCount; (* Is current cycle the same as the last call to this method? If not, reset the detection count *) IF CurrentCycleCount <> CycleCount THEN CopyDetectionCountAndResetDetectionCountInThisCycle(); FOR IteratorCounter := 1 TO TotalArrayAsserts BY 1 DO AssertArrayResultInstances[IteratorCounter].AssertArrayResult.ExpectedsTypeClass = ExpectedsTypeClass AND AssertArrayResultInstances[IteratorCounter].AssertArrayResult.ActualsTypeClass = ActualsTypeClass AND AssertArrayResultInstances[IteratorCounter].AssertArrayResult.TestInstancePath = TestInstancePath THEN AssertArrayResultInstances[IteratorCounter].DetectionCountThisCycle + 1; FoundOne := TRUE; AssertArrayResultInstances[IteratorCounter].DetectionCount THEN // This assert is new AdditionalIdenticalAssert := TRUE; END_IF EXIT; END_IF END_FOR (* If not found anything, create the first *) IF NOT FoundOne THEN (* No existing match found, create a new entry *) CreateAssertResultInstance(ExpectedsSize, ExpectedsTypeClass, ActualsSize, ActualsTypeClass, Message, TestInstancePath); (* An additional instance of this assert needs to be created *) ELSIF AdditionalIdenticalAssert THEN This method is called in every assert and returns whether this particular assert has already been called. times to any logging service. Because a test-suite can consist of several tests, and certain tests can require the keep track of which asserts we've already reported. The user of the framework should not need to care for any of To know what assert this is we need to check for the total combination of: - Test message - Test instance path - Expecteds size (in bytes) - Actuals size (in bytes) - Expecteds datatype - Actuals datatype |