예제 #1
0
        public void TestPlusBothEmpty()
        {
            int[] v1     = {};
            int[] v2     = {};
            int[] ex     = {};
            var   actual = BigNumberHelper.Plus(v1, v2);

            CollectionAssert.AreEqual(ex, actual);
        }
예제 #2
0
        public void TestPlusWithFinalCarry()
        {
            int[] v1     = BigNumberHelper.GetArrayFromString("654321");
            int[] v2     = BigNumberHelper.GetArrayFromString("765432");
            int[] ex     = BigNumberHelper.GetArrayFromString("1419753");
            var   actual = BigNumberHelper.Plus(v1, v2);

            CollectionAssert.AreEqual(ex, actual);
        }
예제 #3
0
        public void TestPlusV2Null()
        {
            int[] v1     = BigNumberHelper.GetArrayFromString("987654321");
            int[] v2     = null;
            int[] ex     = BigNumberHelper.GetArrayFromString("987654321");
            var   actual = BigNumberHelper.Plus(v1, v2);

            CollectionAssert.AreEqual(ex, actual);
        }