ICSharpCode.NRefactory.CSharp.InsertParenthesesVisitorTests.Logical3 C# (CSharp) Method

Logical3() private method

private Logical3 ( ) : void
return void
		public void Logical3()
		{
			Expression expr = new BinaryOperatorExpression(
				new IdentifierExpression("a"),
				BinaryOperatorType.ConditionalOr,
				new BinaryOperatorExpression(
					new IdentifierExpression("b"),
					BinaryOperatorType.ConditionalAnd,
					new IdentifierExpression("c")
				)
			);
			
			Assert.AreEqual("a || b && c", InsertRequired(expr));
			Assert.AreEqual("a || (b && c)", InsertReadable(expr));
		}