Skip to content

Commit

Permalink
Simplify testing and cover code fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed May 19, 2021
1 parent a965593 commit 3163cdf
Showing 1 changed file with 20 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,24 @@ private void Bar()
while (x == 0)
{
x = 1;
} while (x == 0)
[|}|] while (x == 0)
{
x = 1;
}
}
}";

var fixedCode = @"public class Foo
{
private void Bar()
{
var x = 0;
while (x == 0)
{
x = 1;
}
while (x == 0)
{
x = 1;
}
Expand All @@ -383,10 +400,7 @@ private void Bar()
var test = new CSharpTest
{
TestCode = testCode,
ExpectedDiagnostics =
{
Diagnostic().WithLocation(10, 9),
},
FixedCode = fixedCode,
Settings = testSettings,
};

Expand Down Expand Up @@ -423,7 +437,7 @@ private void Bar()
do
{
x = 1; } while (x == 0);
x = 1; [|}|] while (x == 0);
}
}";

Expand All @@ -443,10 +457,6 @@ private void Bar()
var test = new CSharpTest
{
TestCode = testCode,
ExpectedDiagnostics =
{
Diagnostic().WithLocation(9, 20),
},
FixedCode = fixedTestCode,
Settings = testSettings,
};
Expand Down

0 comments on commit 3163cdf

Please sign in to comment.