示例#1
0
文件: If.cs 项目: martindevans/Yolol
        public void CanRuntimeErrorTrueCon()
        {
            var i = new If(new Divide(new ConstantNumber((Number)1), new ConstantNumber((Number)0)), new StatementList(), new StatementList());

            Assert.IsTrue(i.CanRuntimeError);
        }
示例#2
0
文件: If.cs 项目: martindevans/Yolol
        public void CanRuntimeErrorTrueLeft()
        {
            var i = new If(new Variable(new VariableName("a")), new StatementList(new Assignment(new VariableName("a"), new Divide(new ConstantNumber((Number)1), new ConstantNumber((Number)0)))), new StatementList());

            Assert.IsTrue(i.CanRuntimeError);
        }
示例#3
0
文件: If.cs 项目: martindevans/Yolol
        public void CanRuntimeErrorFalse()
        {
            var i = new If(new Variable(new VariableName("a")), new StatementList(), new StatementList());

            Assert.IsFalse(i.CanRuntimeError);
        }