Esempio n. 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 }));
        }
Esempio n. 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 }));
        }
Esempio n. 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 }));
        }
Esempio n. 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 }));
        }