tcunit / TcUnit

An unit testing framework for Beckhoff's TwinCAT 3
Other
273 stars 75 forks source link

Discrepancy between 4022 and 4024 in TIME_TO_STRING makes tests fail #80

Closed sagatowski closed 4 years ago

sagatowski commented 4 years ago

There is a discrepancy between of the output of TIME_TO_STRING between 4022 and 4024. This makes certain tests of the TcUnit-Verifier to fail. For example, one expected output of a test would be: FAILED TEST 'PRG_TEST.PrimitiveTypes@Test_TIME_Differ', EXP: T#754m15s10ms, ACT: T#694m13s244ms, MSG: Values differ

This is how it's printed it 4022. However, in 4024 it is printed: FAILED TEST 'PRG_TEST.PrimitiveTypes@Test_TIME_Differ', EXP: T#12h34m15s10ms, ACT: T#11h34m13s244ms, MSG: Values differ

Suggestion for solution is to accept both outputs in the .NET-verifier.

4022.30: FAILED TEST 'PRG_TEST.PrimitiveTypes@Test_TIME_Differ', EXP: T#754m15s10ms, ACT: T#694m13s244ms, MSG: Values differ FAILED TEST 'PRG_TEST.AnyPrimitiveTypes@Test_ANY_TIME_Differ', EXP: T#754m15s10ms, ACT: T#694m13s244ms, MSG: Values differ FAILED TEST 'PRG_TEST.AssertEveryFailedTestTwice@TwiceAssertCall', EXP: T#754m15s10ms, ACT: T#694m13s244ms, MSG: Not equal TIME

4024.4: FAILED TEST 'PRG_TEST.PrimitiveTypes@Test_TIME_Differ', EXP: T#12h34m15s10ms, ACT: T#11h34m13s244ms, MSG: Values differ
FAILED TEST 'PRG_TEST.AnyPrimitiveTypes@Test_ANY_TIME_Differ', EXP: T#12h34m15s10ms, ACT: T#11h34m13s244ms, MSG: Values differ
FAILED TEST 'PRG_TEST.AssertEveryFailedTestTwice@TwiceAssertCall', EXP: T#12h34m15s10ms, ACT: T#11h34m13s244ms, MSG: Not equal TIME

Another alternative is to make sure that the (.NET)-verifier to take into consideration which version of TwinCAT was used while developing the library, and run that version through the remote manager.

sagatowski commented 4 years ago

Solved in commit 30f72f7. Went with the solution to accept both (3.1.4020/4022 and 4024+-style) outputs in the .NET-verifier

sagatowski commented 4 years ago

TcUnit-Verifier tested with both TwinCAT 3.1.4024.4 and 3.1.4022.30.