summaryrefslogtreecommitdiff
path: root/mcs/class/Mono.CSharp/Test/Evaluator/ExpressionsTest.cs
diff options
context:
space:
mode:
authorJo Shields <directhex@apebox.org>2014-02-19 22:12:43 +0000
committerJo Shields <directhex@apebox.org>2014-02-19 22:12:43 +0000
commit9972bf87b4f27d9c8f358ef8414ac1ab957a2f0f (patch)
tree5bb230c1d698659115f918e243c1d4b0aa4c7f51 /mcs/class/Mono.CSharp/Test/Evaluator/ExpressionsTest.cs
parentd0a215f5626219ff7927f576588a777e5331c7be (diff)
downloadmono-upstream/3.2.8+dfsg.tar.gz
Imported Upstream version 3.2.8+dfsgupstream/3.2.8+dfsg
Diffstat (limited to 'mcs/class/Mono.CSharp/Test/Evaluator/ExpressionsTest.cs')
-rw-r--r--mcs/class/Mono.CSharp/Test/Evaluator/ExpressionsTest.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/mcs/class/Mono.CSharp/Test/Evaluator/ExpressionsTest.cs b/mcs/class/Mono.CSharp/Test/Evaluator/ExpressionsTest.cs
index 9732b655d2..feb4294647 100644
--- a/mcs/class/Mono.CSharp/Test/Evaluator/ExpressionsTest.cs
+++ b/mcs/class/Mono.CSharp/Test/Evaluator/ExpressionsTest.cs
@@ -130,6 +130,22 @@ namespace MonoTests.EvaluatorTest
Assert.AreEqual ("1+", sres, "The result should have been the input string, since we have a partial input");
}
+ [Test]
+ public void GotoWithUnreachableStatement ()
+ {
+ Evaluator.Run ("using System;");
+
+ string code = "var x = new Action(() => {" +
+ "Console.WriteLine(\"beforeGoto\");" +
+ "goto L;" +
+ "L:" +
+ "Console.WriteLine(\"afterGoto\");" +
+ "});";
+
+ Assert.IsTrue (Evaluator.Run (code), "#1");
+ Assert.IsTrue (Evaluator.Run ("x();"), "#2");
+ }
+
#if NET_4_0
[Test]
public void DynamicStatement ()