You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When running a Test with first an AssertEquals_String with an Empty String and then an AssertEquals_Real a runtime Error can occur. This probably happens because TcUnit is checking all prior assertions which leads to the String being interpreted as a Real which can lead to a Invalid Real and a crash follows. As this check happens with the union of the expected and actual value, the crash also depends on both expected and actual value of the string. My observation is that, one has to be a NaN and the other one has to be really empty for the crash to happen.
To Reproduce
Reproducing the problem is difficult, probably because it is depended on the old data in the memory area allocated to the T_MaxString. But if you do first an AssertEquals_String with an Empty String and then an AssertEquals_Real the runtime Error can occur. Maybe if you write directly to the memory area of the string a more deterministic crash can be achieved.
Expected behavior
The assertion of the Real should not be dependent on asserting a String before.
Screenshots
The picture shows the NaN when the String is interpreted as a Real.
Software versions
TcUnit 1.3.0,
TwinCAT XAE version 55
Run environment
Desktop development machine
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
When running a Test with first an AssertEquals_String with an Empty String and then an AssertEquals_Real a runtime Error can occur. This probably happens because TcUnit is checking all prior assertions which leads to the String being interpreted as a Real which can lead to a Invalid Real and a crash follows. As this check happens with the union of the expected and actual value, the crash also depends on both expected and actual value of the string. My observation is that, one has to be a NaN and the other one has to be really empty for the crash to happen.
To Reproduce
Reproducing the problem is difficult, probably because it is depended on the old data in the memory area allocated to the T_MaxString. But if you do first an AssertEquals_String with an Empty String and then an AssertEquals_Real the runtime Error can occur. Maybe if you write directly to the memory area of the string a more deterministic crash can be achieved.
Expected behavior
The assertion of the Real should not be dependent on asserting a String before.
Screenshots
The picture shows the NaN when the String is interpreted as a Real.
Software versions
TcUnit 1.3.0,
TwinCAT XAE version 55
Run environment
Desktop development machine
Additional context
The text was updated successfully, but these errors were encountered: