Exemplo n.º 1
0
        public void ToLowestTermsRTest()
        {
            //matrix field needs to be public
            double[,] m = { { 12, 4, 8 }, { 12, 9, 3 }, { 1, 7, 9 } };
            ChemEqnMatrix cm = new ChemEqnMatrix(m);

            double[] expected = { 3, 1, 2 };
            cm.ToLowestTermsR(0);
            for (int j = 0; j < expected.Length; j++)
            {
                Assert.AreEqual(expected[j], cm.matrix[0, j]);
            }
        }