Ejemplo n.º 1
0
        public void NoFold()
        {
            var builders = GetSimpleAndConstantFoldingBuilder();
            SimpleExprBuilder          sfb = builders.Item1;
            ConstantFoldingExprBuilder cfb = builders.Item2;
            var arg0         = GetVarAndIdExpr("x", BasicType.GetBvType(8)).Item2;
            var arg1         = GetVarAndIdExpr("y", BasicType.GetBvType(8)).Item2;
            var simpleResult = sfb.BVUDIV(arg0, arg1);
            var result       = cfb.BVUDIV(arg0, arg1);

            CheckIsBvType(result, 8);
            CheckIsBvType(simpleResult, 8);

            Assert.IsNull(ExprUtil.AsLiteral(result));
            Assert.IsNotNull(ExprUtil.AsBVUDIV(result));
            Assert.IsTrue(ExprUtil.StructurallyEqual(result, simpleResult));
        }