示例#1
0
        public void TestDifferentBytes()
        {
            AddingThisAddingThat atat = new AddingThisAddingThat();

            Assert.AreEqual(new byte[] { 7, 4, 2, 1 }, atat.AddRecursive(new byte[] { 3, 2, 1, 0 }, new byte[] { 4, 2, 1, 1 }));
        }
示例#2
0
        public void TestCarryOver()
        {
            AddingThisAddingThat atat = new AddingThisAddingThat();

            Assert.AreEqual(new byte[] { 1, 2, 0 }, atat.AddRecursive(new byte[] { 1, 1, 255 }, new byte[] { 0, 0, 1 }));
        }
示例#3
0
        public void TestCarryOverOnAllBytes()
        {
            AddingThisAddingThat atat = new AddingThisAddingThat();

            Assert.AreEqual(new byte[] { 255, 255, 254 }, atat.AddRecursive(new byte[] { 255, 255, 255 }, new byte[] { 255, 255, 255 }));
        }
示例#4
0
        public void TestThreeSameNumbers()
        {
            AddingThisAddingThat atat = new AddingThisAddingThat();

            Assert.AreEqual(new byte[] { 2, 2, 2 }, atat.AddRecursive(new byte[] { 1, 1, 1 }, new byte[] { 1, 1, 1 }));
        }