Skip to content

Bad test input in UpgradeToRegexGeneratorAnalyzerTests #72544

@Youssef1313

Description

@Youssef1313

Description

var regex = new Regex(timeout: TimeSpan.FromSeconds(10), pattern: """");

None of the constructors has a "timeout" parameter. I believe the test wanted to refer to this constructor, but the parameter was misspelled. I'm not sure though if the lack of options parameter is an intentional error scenario to test.

public Regex (string pattern, System.Text.RegularExpressions.RegexOptions options, TimeSpan matchTimeout);

@joperezr What was the intention here?

I discovered this while enabling validation of compiler diagnostics in tests.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions