Esempio n. 1
0
        public void TestSum3()
        {
            int a = -10, b = 3;
            int c = NumberSystem8.Sum(a, b);

            Assert.IsTrue(c < 0);
        }
Esempio n. 2
0
        public void TestSub3()
        {
            int a = 3, b = 6;
            int c   = NumberSystem8.Sub(a, b);
            int res = -1 * int.Parse(Convert.ToString(NumberSystem8.From8To10(b) - NumberSystem8.From8To10(a), 8));

            Assert.AreEqual(res, c);
        }
Esempio n. 3
0
        public void TestAND3()
        {
            int a = 4, b = 6;

            Assert.AreEqual(100, NumberSystem8.AND(a, b));
        }
Esempio n. 4
0
        public void TestAND2()
        {
            int a = -3, b = 6;

            Assert.Equals(NumberSystem8.AND(a, b), typeof(NotSupportedException));
        }
Esempio n. 5
0
        public void TestAND1()
        {
            int a = 0, b = 6;

            Assert.AreEqual(0, NumberSystem8.AND(a, b));
        }
Esempio n. 6
0
        public void TestSub2()
        {
            int a = 99, b = 11;

            Assert.Equals(NumberSystem8.Sub(a, b), typeof(NotSupportedException));
        }
Esempio n. 7
0
        public void TestOR1()
        {
            int a = 3, b = 6;

            Assert.AreEqual(NumberSystem8.OR(a, b), 111);
        }
Esempio n. 8
0
        public void TestOR2()
        {
            int a = 99, b = 3;

            Assert.Equals(NumberSystem8.OR(a, b), typeof(NotSupportedException));
        }
Esempio n. 9
0
        public void TestFrom8To10()
        {
            int a = NumberSystem8.From8To10(13);

            Assert.AreEqual(a.ToString(), "11");
        }