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
It seems that without specifying CollectionOrdering, IsEquivalent would use the Matching option.
However, it does not print the expected sequence when it fails.
For example:
[Test][Arguments(new[]{1,2,3},new[]{3,2,1},CollectionOrdering.Matching)]// case 0[Arguments(new[]{1,2,3},new[]{1,2,3,4},CollectionOrdering.Any)]// case 1[Arguments(new[]{1,2,3},new[]{3,2,1})]// case 2[Arguments(new[]{1,2,3},new[]{1,2,3,4})]// case 3publicasyncTaskIsEquivalent_Fail(int[]a,int[]b,CollectionOrdering?collectionOrdering=null)=>await(collectionOrderingisnull?Assert.That(a).IsEquivalentTo(b):Assert.That(a).IsEquivalentTo(b,collectionOrdering.Value));
case 0 starts with: AssertionException: Expected a to be equivalent to [3, 2, 1]
case 1 starts with: AssertionException: Expected a to be equivalent to [1, 2, 3, 4]
However, case 2 and 3 start with: AssertionException: Expected a to be equivalent to b
The text was updated successfully, but these errors were encountered:
Also, IsNotEquivalentTo doesn't accept CollectionOrdering, and it always use SequenceEqual to check. (same as CollectionOrdering.Matching)
I see in TUnit you have the same condition split into 2: positive & negative and are maintaining both (Is__ and IsNot__).
I think it's quite hard to maintain.
Is it not possible to separate the Not? For example, something like this would be nice:
It seems that without specifying
CollectionOrdering
,IsEquivalent
would use theMatching
option.However, it does not print the expected sequence when it fails.
For example:
case 0 starts with:
AssertionException: Expected a to be equivalent to [3, 2, 1]
case 1 starts with:
AssertionException: Expected a to be equivalent to [1, 2, 3, 4]
However, case 2 and 3 start with:
AssertionException: Expected a to be equivalent to b
The text was updated successfully, but these errors were encountered: