Skip to content

Commit 513b740

Browse files
committed
First step to correct some bug that last release introduced with Exceptions
1 parent bf68f1c commit 513b740

File tree

5 files changed

+171
-93
lines changed

5 files changed

+171
-93
lines changed

CodingSeb.ExpressionEvaluator.Tests/ExpressionEvaluatorScriptEvaluateTests.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,11 @@ public static IEnumerable<TestCaseData> TestCasesForScriptEvaluateTests
14811481
.SetCategory("OptionScriptNeedSemicolonAtTheEndOfLastExpression")
14821482
.Returns("0,1,2,3,4,");
14831483

1484+
yield return new TestCaseData(Resources.Script0070, new ExpressionEvaluator { OptionScriptNeedSemicolonAtTheEndOfLastExpression = false }, null, null, null)
1485+
.SetCategory("Script")
1486+
.SetCategory("new Exception must not throw the exception")
1487+
.Returns(3);
1488+
14841489
#endregion
14851490
}
14861491
}

CodingSeb.ExpressionEvaluator.Tests/Resources.Designer.cs

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CodingSeb.ExpressionEvaluator.Tests/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,4 +325,7 @@
325325
<data name="Script0069" type="System.Resources.ResXFileRef, System.Windows.Forms">
326326
<value>resources\script0069.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
327327
</data>
328+
<data name="Script0070" type="System.Resources.ResXFileRef, System.Windows.Forms">
329+
<value>resources\script0070.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
330+
</data>
328331
</root>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* Script0070 */
2+
var e = new Exception("Must not be thrown");
3+
4+
return 1+2;

0 commit comments

Comments
 (0)