Exemplo n.º 1
0
        public void NoFold()
        {
            var builderPair  = GetSimpleAndConstantFoldingBuilder();
            var sfb          = builderPair.Item1;
            var cfb          = builderPair.Item2;
            var v0           = GetVarAndIdExpr("x", BasicType.GetBvType(8));
            var v1           = GetVarAndIdExpr("y", BasicType.GetBvType(8));
            var foldedResult = cfb.BVLSHR(v0.Item2, v1.Item2);
            var simpleResult = sfb.BVLSHR(v0.Item2, v1.Item2);

            CheckIsBvType(foldedResult, 8);
            CheckIsBvType(simpleResult, 8);
            Assert.IsNotNull(ExprUtil.AsBVLSHR(foldedResult));
            Assert.AreEqual(simpleResult, foldedResult);
        }