Esempio n. 1
0
        public void OperatorRShift()
        {
            _left  = 10.0;
            _right = 2.0;
            Assert.AreEqual(_left.RShift(_right), new MondValue(10 >> 2));

            _left = 10.0;
            Assert.AreEqual(_left >> 2, new MondValue(10 >> 2));

            _left  = 123;
            _right = "abc";
            Assert.Throws <MondRuntimeException>(() => { _left = _left.RShift(_right); });

            _left  = "abc";
            _right = 2.0;
            Assert.Throws <MondRuntimeException>(() => { _left = _left.RShift(_right); });
        }
Esempio n. 2
0
 public static MondValue BitRightShift(MondValue x, MondValue y) => x.RShift(y);