Example #1
0
        public void OperatorLShift()
        {
            _left  = 10.0;
            _right = 7.0;
            Assert.AreEqual(_left.LShift(_right), new MondValue(10 << 7));

            _left = 10.0;
            Assert.AreEqual(_left << 7, new MondValue(10 << 7));

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

            _left = "abc";
            Assert.Throws <MondRuntimeException>(() => { _left = _left.LShift(_right); });
        }
Example #2
0
 public static MondValue BitLeftShift(MondValue x, MondValue y) => x.LShift(y);