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

Adding PCRE2 tests to increase Regex code coverage #73323

Merged
merged 3 commits into from
Aug 5, 2022

Conversation

joperezr
Copy link
Member

@joperezr joperezr commented Aug 3, 2022

Fixes #61893

This PR is adding all of the tests from the https://github.com/PCRE2Project/pcre2/testdata repo that can be parsed by our engine and don't rely on special syntax not supported by .NET (like [[:digit:]] syntax for example which we are able to parse, but it semantically means something different in our case)

I have already separately logged the issues I found in .NET while porting these (and most of them are already addressed by @stephentoub 😄). I also used Steve's technique for batching source-generator engine tests which helped bringing this single test execution from 2.3 minutes down to 1.1 seconds, which is why this test doesn't need to be moved to outerloop. In total, this is adding around 11K different tests into our test suite.

cc: @richlander since I'm updating one of our THIRD-PARTY-NOTICES file.

@ghost
Copy link

ghost commented Aug 3, 2022

Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #61893

This PR is adding all of the tests from the https://github.com/PCRE2Project/pcre2/testdata repo that can be parsed by our engine and don't rely on special syntax not supported by .NET (like [[:digit:]] syntax for example which we are able to parse, but it semantically means something different in our case)

I have already separately logged the issues I found in .NET while porting these (and most of them are already addressed by @stephentoub 😄). I also used Steve's technique for batching source-generator engine tests which helped bringing this single test execution from 2.3 minutes down to 1.1 seconds, which is why this test doesn't need to be moved to outerloop. In total, this is adding around 11K different tests into our test suite.

cc: @richlander since I'm updating one of our THIRD-PARTY-NOTICES file.

Author: joperezr
Assignees: -
Labels:

area-System.Text.RegularExpressions

Milestone: -

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent.

@danmoseley
Copy link
Member

Nice!

@joperezr
Copy link
Member Author

joperezr commented Aug 5, 2022

PR was green in the previous commit, and last one only addressed feedback on re-wording of comments, so I'll go ahead and merge now

@joperezr joperezr merged commit 7f31799 into dotnet:main Aug 5, 2022
@joperezr joperezr deleted the AddPCRETests branch August 5, 2022 19:33
@ghost ghost locked as resolved and limited conversation to collaborators Sep 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port pcre2 regex tests
4 participants