Skip to content

Commit

Permalink
Code review 3
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioaversa committed Jan 30, 2024
1 parent 3d1f73a commit 91a5f26
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public void GetBody_AccessorDeclaration_ArrowExpression()
[TestMethod]
public void GetBody_AccessorDeclaration_BodyBlock()
{
var code = "class AClass { int AProperty { set { var x1; var x2; var x3; } } }";
var code = "class AClass { int AProperty { set { int i = 1; i++; i++; } } }";
ExtensionsCS.GetBody(CSharpSyntaxTree.ParseText(code).Single<AccessorDeclarationSyntax>())
.Should().BeOfType<BlockSyntax>().Which.Statements.Should().HaveCount(3);
}
Expand All @@ -218,7 +218,7 @@ public void GetBody_LocalFunctionStatement_ArrowExpression()
[TestMethod]
public void GetBody_LocalFunctionStatement_BodyBlock()
{
var code = "class AClass { void AMethod() { int ALocalFunction() { var x1; var x2; var x3; return 42; } } }";
var code = "class AClass { void AMethod() { int ALocalFunction(int i) { i++; i++; i++; return i; } } }";
ExtensionsCS.GetBody(CSharpSyntaxTree.ParseText(code).Single<LocalFunctionStatementSyntax>())
.Should().BeOfType<BlockSyntax>().Which.Statements.Should().HaveCount(4);
}
Expand Down

0 comments on commit 91a5f26

Please sign in to comment.