Skip to content

Should().BeEquivalentTo() failing with tuples containing arrays #999

@dogfoodsilo4

Description

@dogfoodsilo4

Hi,

Using version 5.6, I stumbled across this anomaly. It is not a major issue (I've worked around it) but I wanted to highlight it and understand the cause.

The following comparison fails:

 var a = new Tuple<string, bool, int[]>("Hello", true, new int[] { 1, 2, 3 });
 var b = new Tuple<string, bool, int[]>("Hello", true, new int[] { 1, 2, 3 });
 a.Should().BeEquivalentTo(b);

...with the error:

Expected a to be (Hello, True, System.Int32[]), but found (Hello, True, System.Int32[]).

If I find some time, I'll take a look at the source code myself.

Ta.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions