Skip to content

Assert.Equal(float, float, float) introduced a source breaking change #2393

@ericstj

Description

@ericstj

The addition of this API: xunit/assert.xunit@8e86f1d

public static void Equal(float expected, float actual, float tolerance)

Created an ambiguity for code that was calling Assert.Equal(float, float, int)

Here's a sample error:

error CS0121: The call is ambiguous between the following methods or properties: 'Assert.Equal(double, double, int)' and 'Assert.Equal(float, float, float)'

This could be avoided by adding an overload for Assert.Equal(float, float, int) that calls Assert.Equal(double, double, int) if this break was unintentional.

Repro project: xunitAssert.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Assertion libraryxunit.v3.assertFeatureA request for a new featurehelp wantedA community-provided PR would be welcomed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions