Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sys27 committed Feb 3, 2017
1 parent 05e7d22 commit eedf8f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xFunc.Maths/Expressions/Define.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public IExpression Value
/// <value>
/// The type of the value.
/// </value>
public ExpressionResultType ValueType { get; } = ExpressionResultType.Number | ExpressionResultType.Boolean;
public ExpressionResultType ValueType { get; } = ExpressionResultType.All;

/// <summary>
/// Gets the type of the result.
Expand Down
5 changes: 4 additions & 1 deletion xFunc.Tests/MathParserTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ public void DefineComplexParserTest()
new ComplexNumberToken(new Complex(3, 2))
};

Assert.Throws<ParameterTypeMismatchException>(() => parser.Parse(tokens));
var exp = parser.Parse(tokens);
var expected = new Define(new Variable("aaa"), new ComplexNumber(new Complex(3, 2)));

Assert.Equal(expected, exp);
}

[Fact]
Expand Down

0 comments on commit eedf8f0

Please sign in to comment.