Merge pull request #4327 from vkargov/vk-abcremedy
[mono.git] / mcs / tests / test-async-17.cs
index 927ab629839b19db8d6f734e7ea408dd3e2a6619..9f9720bc2bc17e5715fc3be970ce3af4fb4e141e 100644 (file)
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
 using System;
 using System.Threading.Tasks;
 using System.Threading;
@@ -60,6 +58,18 @@ class Tester
                
                return 1;
        }
+
+       async Task<int> TestException_7 ()
+       {
+               try {
+                       await Task.Factory.StartNew (() => { throw new ArgumentException (); }).ConfigureAwait (false);
+               } catch (ArgumentException e) {
+                       if (e.StackTrace.Contains (".MoveNext"))
+                               throw new ApplicationException ();      
+               }
+               
+               return 1;
+       }
        
        static bool RunTest (MethodInfo test)
        {