|
1 | 1 | using NUnit.Framework; |
2 | | -using Sprache; |
3 | 2 |
|
4 | 3 | namespace CodeWriter.ExpressionParser.Tests |
5 | 4 | { |
@@ -153,23 +152,23 @@ public void Parse_Variable_Names() |
153 | 152 | Assert.AreEqual(1, Execute("_one123", context)); |
154 | 153 | Assert.AreEqual(1, Execute("one_123", context)); |
155 | 154 | Assert.AreEqual(1, Execute("one123_", context)); |
156 | | - Assert.Throws<ParseException>(() => Compile("123one", context)); |
| 155 | + Assert.Throws<ExpressionParseException>(() => Compile("123one", context)); |
157 | 156 | Assert.Throws<VariableNotDefinedException>(() => Compile("b", context)); |
158 | 157 | } |
159 | 158 |
|
160 | 159 | [Test] |
161 | 160 | public void Parse_Compare_Invalid() |
162 | 161 | { |
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)); |
166 | 165 | } |
167 | 166 |
|
168 | 167 | [Test] |
169 | 168 | public void Parse_MinMax_Invalid() |
170 | 169 | { |
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)); |
173 | 172 | } |
174 | 173 |
|
175 | 174 | [Test] |
|
0 commit comments