Skip to content

Introduce test helpers and add DataFlowTypeExtensions#1890

Merged
marek-safar merged 4 commits intodotnet:mainfrom
vitek-karas:TestHelpers
Mar 13, 2021
Merged

Introduce test helpers and add DataFlowTypeExtensions#1890
marek-safar merged 4 commits intodotnet:mainfrom
vitek-karas:TestHelpers

Conversation

@vitek-karas
Copy link
Member

Several of the DataFlow tests use the RequirePublicMethods or similar methods to perform validation. These methods are always the same, so there no reason to duplicate them across tests.

In the infra I added an exception that the Expectation assembly can contain non-attribute classes if they're in the Helper namespace.

It's cumbersome to add these helpers into the TestCases because each test case would have to add an explicit compilation attribute to include the source file in the test compilation.

If there are too many helpers, we might consider creating a new assembly for them instead.

Several of the DataFlow tests use the `RequirePublicMethods` or similar methods to perform validation. These methods are always the same, so there no reason to duplicate them across tests.
@marek-safar marek-safar merged commit a4bc38f into dotnet:main Mar 13, 2021
@vitek-karas vitek-karas deleted the TestHelpers branch March 13, 2021 21:45
agocke pushed a commit to dotnet/runtime that referenced this pull request Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants