Skip to content

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

@TobiasKnauss

Description

@TobiasKnauss

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions