xunit/xunit

xUnit1010: Invalid literal causes invalid reporting

Closed

#3,569 opened on May 5, 2026

 (5 comments) (0 reactions) (0 assignees)C# (761 forks)batch import
AnalyzersBuggood first issuehelp wanted

Repository metrics

Stars
 (3,873 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Hello! I get xUnit1010 error when parameters in test decimal and Enum.

Simple code:

public enum MyEnum
{
    Value1,
    Value2,
    Value3
}

public class UnitTest1
{
    [Theory]
    [InlineData(1.1m, MyEnum.Value1)]
    public void Test1(decimal param1, MyEnum param2)
    {
        Assert.True(true);
    }
}

Error displays on enum parameter but text referenced to first:

The value is not convertible to the method parameter 'param1' of type 'decimal'. Use a compatible data value.

Contributor guide