Exemple #1
0
        public void SimpleAshr_ParseCheck()
        {
            LAshr ashr = new LAshr(_valueResult, _valueOp1, _valueOp2);

            Assert.AreEqual($"{_valueResult.Identifier} = ashr {_valueResult.ParseType()} {_valueOp1.ValueOrIdentifier}, {_valueOp2.ValueOrIdentifier}",
                            LHelper.Trim(ashr.ParseInstruction()));
        }
Exemple #2
0
        public void SimpleAshr_WithConstant_ParseCheck()
        {
            LValueRef op2  = new LValueRef(LType.Int32Type(), "12");
            LAshr     ashr = new LAshr(_valueResult, _valueOp1, op2);

            Assert.AreEqual($"{_valueResult.Identifier} = ashr {_valueResult.ParseType()} {_valueOp1.ValueOrIdentifier}, {op2.ValueOrIdentifier}",
                            LHelper.Trim(ashr.ParseInstruction()));
        }
Exemple #3
0
        public void SimpleAshr_FloatingPointResultType_Expected_Exception()
        {
            LAshr ashr;

            Assert.Throws <Exception>(() =>
                                      ashr = new LAshr(new LValueRef(LType.F32Type(), "%result"), _valueOp1, _valueOp2)
                                      );
        }
Exemple #4
0
        public void SimpleAshr_Op2FromDifferentType_Expected_Exception()
        {
            LAshr ashr;

            Assert.Throws <Exception>(() =>
                                      ashr = new LAshr(_valueResult, _valueOp1, new LValueRef(LType.Int128Type(), "%op2"))
                                      );
        }