Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@hughbe
Copy link

@hughbe hughbe commented Feb 29, 2016

This commit moves the tests for System.Text.RegularExpressions to use
xunit, instead of Console.WriteLine and really obfuscated error messages.
I have not added or removed any tests. I did, however, remove some obsolete test code for branches that would never occur.

Already, this test suite looks nicer. There is more to be done, however:
If/when this is merged, I will submit another PR consolidating common test code, and further modernizations including:

  • Renaming tests and test files to make sense
  • Splitting test data and test code
  • Consolidating tests into various helper methods.

This PR contributes to #516 and #915

This commit moves the tests for System.Text.RegularExpressions to use
xunit, instead of Console.WriteLine and really obfuscated error
messages.
I have not added or removed any tests.
++iCountErrors;
Console.WriteLine("Error Err_8888yyy! strLoc==" + strLoc + ", exc_general==" + exc_general.ToString());
Assert.True(s_regexTests[i].Run());
}
Copy link
Member

Choose a reason for hiding this comment

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

Seems like this RegexTestClass thing can be unraveled in the future, but for now, should this be a theory? e.g.

[Theory]
[MemberData(nameof(CharacterClassSubtractionTestCases))]
public void CharacterClassSubtraction(RegexTestCase case)
{
    case.Run();
}

?

@stephentoub
Copy link
Member

Thanks, @hughbe. What you've done here is a definite improvement over what was there before. Thanks! I do think there's more cleanup to be done; up to you whether you want to do that as part of this PR, or leave it for you / someone else for a future time.

@hughbe
Copy link
Author

hughbe commented Mar 18, 2016

Yeah, I've got a lot more cleanup to do here!
I've already done it, and just waiting on merging this one before submitting that

stephentoub added a commit that referenced this pull request Mar 18, 2016
Move System.Text.RegularExpressions tests to xunit
@stephentoub stephentoub merged commit 8ec3d77 into dotnet:master Mar 18, 2016
@hughbe hughbe deleted the regex-test-cleanup branch March 18, 2016 22:00
@karelz karelz modified the milestone: 1.0.0-rtm Dec 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants