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

Simplify some region analysis tests #28273

Open
gafter opened this issue Jul 3, 2018 · 0 comments
Open

Simplify some region analysis tests #28273

gafter opened this issue Jul 3, 2018 · 0 comments
Labels
Area-Compilers Test Test failures in roslyn-CI
Milestone

Comments

@gafter
Copy link
Member

gafter commented Jul 3, 2018

In a recent code review @jcouv suggested, seeing reams of code like this:

            Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared));
            Assert.Equal(null, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned));
            Assert.Equal(null, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured));
            Assert.Equal(null, GetSymbolNamesJoined(dataFlowAnalysisResults.CapturedInside));
            Assert.Equal(null, GetSymbolNamesJoined(dataFlowAnalysisResults.CapturedOutside));

Not related to this PR: consider adding a helper method in this test file to do the assert plus the GetSymbolNamesJoined, so that GetSymbolNamesJoined doesn't have to be repeated.

It could look like: ValidateSymbolNames("x", dataFlowAnalysisResults.VariablesDeclared)

@gafter gafter added Area-Compilers Test Test failures in roslyn-CI labels Jul 3, 2018
@gafter gafter added this to the 16.0 milestone Jul 3, 2018
@gafter gafter self-assigned this Jul 3, 2018
@gafter gafter modified the milestones: 16.0, Unknown Sep 7, 2018
@gafter gafter removed their assignment Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Test Test failures in roslyn-CI
Projects
None yet
Development

No branches or pull requests

1 participant