Skip to content

Commit 14f55d2

Browse files
committed
Actualize tests
1 parent 6f35a04 commit 14f55d2

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Tests/ParserTests.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using NUnit.Framework;
2-
using Sprache;
32

43
namespace CodeWriter.ExpressionParser.Tests
54
{
@@ -153,23 +152,23 @@ public void Parse_Variable_Names()
153152
Assert.AreEqual(1, Execute("_one123", context));
154153
Assert.AreEqual(1, Execute("one_123", context));
155154
Assert.AreEqual(1, Execute("one123_", context));
156-
Assert.Throws<ParseException>(() => Compile("123one", context));
155+
Assert.Throws<ExpressionParseException>(() => Compile("123one", context));
157156
Assert.Throws<VariableNotDefinedException>(() => Compile("b", context));
158157
}
159158

160159
[Test]
161160
public void Parse_Compare_Invalid()
162161
{
163-
Assert.Throws<ParseException>(() => Compile("0 > 0 > 0", null));
164-
Assert.Throws<ParseException>(() => Compile("0 <= 0 > 0", null));
165-
Assert.Throws<ParseException>(() => Compile("0 = 0 != 0", null));
162+
Assert.Throws<ExpressionParseException>(() => Compile("0 > 0 > 0", null));
163+
Assert.Throws<ExpressionParseException>(() => Compile("0 <= 0 > 0", null));
164+
Assert.Throws<ExpressionParseException>(() => Compile("0 = 0 != 0", null));
166165
}
167166

168167
[Test]
169168
public void Parse_MinMax_Invalid()
170169
{
171-
Assert.Throws<ParseException>(() => Compile("MIN()", null));
172-
Assert.Throws<ParseException>(() => Compile("MAX()", null));
170+
Assert.Throws<ExpressionParseException>(() => Compile("MIN()", null));
171+
Assert.Throws<ExpressionParseException>(() => Compile("MAX()", null));
173172
}
174173

175174
[Test]

0 commit comments

Comments
 (0)