示例#1
0
        public void Addition_03()
        {
            CNumber_Integer b = new CNumber_Integer(0xFFFF);
            CNumber_Integer a = new CNumber_Integer(0xAB);

            a.Addition(b);

            Assert.AreEqual(0x100AA, a.AsInteger);
            Assert.AreEqual(3, a.size);
        }
示例#2
0
        public void Addition_01()
        {
            CNumber_Integer a = new CNumber_Integer(0xAB);
            CNumber_Integer b = new CNumber_Integer(0xCD);

            a.Addition(b);

            // check the paratemer for const
            Assert.AreEqual(0xCD, b.AsInteger);
            Assert.AreEqual(1, b.size);

            // now check the result
            Assert.AreEqual(0x178, a.AsInteger);
            Assert.AreEqual(2, a.size);
        }