-
Notifications
You must be signed in to change notification settings - Fork 731
Closed
Milestone
Description
Description
Before #1202 we had an asymmetry in how we compared an enum and an int, as it worked in one direction, but not the other.
enum MyEnum
{
One = 1
}
[Fact]
public void when_comparing_an_enum_to_a_numeric_it_should_TODO()
{
MyEnum.One.As<object>().Should().Be(1);
// passes
}
[Fact]
public void when_comparing_a_numeric_to_an_enum_it_should_TODO()
{
1.As<object>().Should().Be(MyEnum.One);
// fails
}After #1202, none of them passes.
There were no tests covering these cases.
Should we allow comparing enums with numeric types?
Metadata
Metadata
Assignees
Labels
No labels