コード例 #1
0
        public void Identity_Dimension0_Exception()
        {
            int dimension = 0;

            Action act = () => Matrice2D.Identite(dimension);

            act.Should().Throw <ArgumentOutOfRangeException>();
        }
コード例 #2
0
        public void Identity_Dimension1_MatriceIdentite1Ligne1Colonne()
        {
            Matrice2D attendue = new Matrice2D(new float[, ]
            {
                { 1 },
            });
            int dimension = 1;

            Matrice2D identite = Matrice2D.Identite(dimension);

            identite.Should().Be(attendue);
        }
コード例 #3
0
        public void Identity_Dimension2_MatriceIdentite2Lignes2Colonnes()
        {
            Matrice2D attendue = new Matrice2D(new float[, ]
            {
                { 1, 0 },
                { 0, 1 },
            });
            int dimension = 2;

            Matrice2D identite = Matrice2D.Identite(dimension);

            identite.Should().Be(attendue);
        }