Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: In AssertEquals(), still display the values even if the value type or string length is different #251

Open
TobiasKnauss opened this issue Oct 4, 2024 · 0 comments

Comments

@TobiasKnauss
Copy link

Feature Request
When calling AssertEquals() with two different data types, the assert message says that the types are different. Actually it does only say EXP = , ACT = ; and if you don't look closely (e.g. with UINT and DINT), you wonder why you don't see the values. And addtitional message "types different" would be nice.
And when comparing strings of different lengths, the assert message tells the length of the strings.

Expected behavior
It would be nice if the assert message also tells information about the actual values, no matter if the types are different. It could be:
EXP = DINT := 4, ACT = UINT := 4, types different or something similar.

And for STRING, the assert message should also display the EXP and ACT strings, so that you can immediately see where the strings are different. Otherwise the investigation becomes difficult. It could be:
EXP = Len 1 := 'A', ACT = Len 2 := 'BB', length different or something similar.

I would not change the current texts of EXP = DINT and others, I just chose my own because I don't remember the built-in texts any more and I don't want to create a test just to find them.

Software versions
TcUnit 1.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant