Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
AnaCoda committed Jul 12, 2023
1 parent 42417d1 commit 0e257c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,7 @@ private ExpressionSyntax Transform( InvocationExpressionSyntax invocationExpr) {
newExpr = memberAccess.Expression;
return Transform( newExpr );
}
}
else if( memberAccess is not null && ShouldWrapMemberAccessesInTaskRun( memberAccess ) ) {
} else if( memberAccess is not null && ShouldWrapMemberAccessesInTaskRun( memberAccess ) ) {
m_disableTaskRunWarningFlag = true;
return SyntaxFactory.ParseExpression( $"Task.Run(() => {invocationExpr}).Result" );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public void SimpleLambda() {

[Test]
public void WrapInTaskRun() {
var actual = Transform( @"[GenerateSync] async Task BarAsync() { string baz = response.Content.ReadAsStringAsync(); }" );
var actual = Transform( @"[GenerateSync] async Task BarAsync() { string baz = await response.Content.ReadAsStringAsync(); }" );

Assert.IsTrue( actual.Success );
Assert.IsEmpty( actual.Diagnostics );
Expand Down

0 comments on commit 0e257c7

Please sign in to comment.