Skip to content

Commit

Permalink
#190 - Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sys27 committed Feb 16, 2018
1 parent 4a8b7f2 commit 950673c
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions xFunc.Tests/Analyzers/TypeAnalyzerTests/MatrixTests.cs
Expand Up @@ -57,6 +57,42 @@ public void TestMatrixVector()
Test(exp, ResultType.Matrix);
}

[Fact]
public void TestMatrixUndefinedElement()
{
var exp = new Matrix(new Vector[] { new Vector(new[] { new Variable("x") }) });

Test(exp, ResultType.Undefined);
}

[Fact]
public void TestMatrixNotVectorElement()
{
DifferentParametersExpression exp = new Matrix(2, 2)
{
Arguments = new[] { new Number(2) }
};

TestDiffParamException(exp);
}

[Fact]
public void TestEmptyMatrix()
{
var exp = new Matrix(0, 0);

Test(exp, ResultType.Matrix);
}

[Fact]
public void TestNullMatrix()
{
var exp = new Matrix(0, 0);
exp.Arguments = null;

Test(exp, ResultType.Matrix);
}

[Fact]
public void TestDetermenantUndefined()
{
Expand Down

0 comments on commit 950673c

Please sign in to comment.