Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        public void CanRuntimeErrorFalse()
        {
            var i = new If(new Variable(new VariableName("a")), new StatementList(), new StatementList());

            Assert.IsFalse(i.CanRuntimeError);
        }