Skip to content

Consider deprecating NUnitEqualityComparer.AreEqual optional bool parameter #3410

Closed
@stevenaw

Description

@stevenaw

The NUnitEqualityComparer contains an optional parameter in the public API to specify if the comparison is top-level or not.

public bool AreEqual(object x, object y, ref Tolerance tolerance, bool topLevelComparison = true)

This has been converted to separate overloads in a subsequent PR. #3406

That PR also gets the code to the point where the boolean parameter could be calculated (but doing so could break consumers who explicitly pass false).

We can't just remove it outright, since it's a part of the public API and could be used by consumers (ex: a custom wrapper over the comparer), but I think we should consider marking the overload with the bool as obsolete, to be removed in a later version.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions