提交 55fc7f1d 编写于 作者: M Manish Vasani

Fix unit test and check cancellation

上级 bfd02114
......@@ -299,7 +299,7 @@ void M(int x)
}
catch (ArgumentNullException ex)
{
Assert.Equal(ex, new ArgumentNullException("node"));
Assert.Equal(ex.Message, new ArgumentNullException("node").Message);
}
try
......@@ -308,7 +308,7 @@ void M(int x)
}
catch (ArgumentNullException ex)
{
Assert.Equal(ex, new ArgumentNullException("semanticModel"));
Assert.Equal(ex.Message, new ArgumentNullException("semanticModel").Message);
}
// Verify identical CFG from method body syntax and operation.
......
......@@ -81,6 +81,7 @@ public static ControlFlowGraph Create(SyntaxNode node, SemanticModel semanticMod
}
IOperation operation = semanticModel.GetOperation(node, cancellationToken);
cancellationToken.ThrowIfCancellationRequested();
return operation == null ? null : CreateCore(operation, nameof(operation));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册