public void IfFalse() { var method = CreateMethod(block => block.If(false, EmitAst.Return("foo"), EmitAst.Return("bar"))); var result = (string)method.Invoke(null, null); Assert.AreEqual("bar", result); }
public void IfOnlyTrue() { var method = CreateMethod(block => { block.If(true, EmitAst.Return("foo")); block.Return("bar"); }); var result = (string)method.Invoke(null, null); Assert.AreEqual("foo", result); }