Exemplo n.º 1
0
        public void TestAddDiffC()
        {
            string a  = "1837A,342B";
            string b  = "16";
            string c  = "4";
            string a1 = "34C01,DDA1A";
            string b1 = "15";
            string c1 = "5";

            string   extend = "0,0";
            IPNumber iP     = new IPNumber(a, b, c);
            IPNumber iP1    = new IPNumber(a1, b1, c1);
            string   result = iP.Add(iP1).GetPString();

            Assert.AreEqual(extend, result);
        }
Exemplo n.º 2
0
        public void TestAdd2()
        {
            string a  = "1110101,110101";
            string b  = "2";
            string c  = "6";
            string a1 = "111101,100001";
            string b1 = "2";
            string c1 = "6";

            string   extend = "10110011,01011";
            IPNumber iP     = new IPNumber(a, b, c);
            IPNumber iP1    = new IPNumber(a1, b1, c1);
            string   result = iP.Add(iP1).GetPString();

            Assert.AreEqual(extend, result);
        }