예제 #1
0
        public void Matrix_Multiply_InValid(string matrix1Str, string matrix2Str, string matrix3Str)
        {
            var matrix1 = new Matrix(InLineArrayParse.ParseArray(matrix1Str));
            var matrix2 = new Matrix(InLineArrayParse.ParseArray(matrix2Str));
            var matrix3 = new Matrix(InLineArrayParse.ParseArray(matrix3Str));

            Matrix matrix4 = matrix1 * matrix2;

            Assert.True(matrix3 != matrix4);
        }
예제 #2
0
        public void Matrix_Subtract_InValid(string matrix1Str, string matrix2Str, string matrix3Str)
        {
            var matrix1 = new Matrix(InLineArrayParse.ParseArray(matrix1Str));
            var matrix2 = new Matrix(InLineArrayParse.ParseArray(matrix2Str));
            var matrix3 = new Matrix(InLineArrayParse.ParseArray(matrix3Str));

            Matrix matrix4 = matrix1 - matrix2;

            Assert.False(matrix3 == matrix4);
        }
예제 #3
0
        public void Matrix_Add_Valid(string matrix1Str, string matrix2Str, string matrix3Str)
        {
            // arrange
            var matrix1 = new Matrix(InLineArrayParse.ParseArray(matrix1Str));
            var matrix2 = new Matrix(InLineArrayParse.ParseArray(matrix2Str));
            var matrix3 = new Matrix(InLineArrayParse.ParseArray(matrix3Str));

            // act
            Matrix matrix4 = matrix1 + matrix2;

            // assert
            Assert.True(matrix3 == matrix4);
        }