Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle BigIntegers arguments properly #850

Closed
adamsitnik opened this issue Aug 10, 2018 · 0 comments
Closed

Handle BigIntegers arguments properly #850

adamsitnik opened this issue Aug 10, 2018 · 0 comments
Assignees
Milestone

Comments

@adamsitnik
Copy link
Member

public class WithVeryBigInteger
{
    public IEnumerable<object> GetVeryBigInteger()
    {
        yield return BigInteger.Parse(new string(Enumerable.Repeat('1', 1000).ToArray()));
    }

    [Benchmark]
    [ArgumentsSource(nameof(GetVeryBigInteger))]
    public void Method(BigInteger passed)
}

Was producing following code:

__argField0 = 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111;

And following error: "Integral constant is too large"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant