[System.Windows.Forms] Disable failing test
[mono-project.git] / mcs / tests / test-async-56.cs
blob88f547e66dc7010e12b178e953e987682bc28bfa
1 using System;
2 using System.Threading;
3 using System.Threading.Tasks;
5 class Test
7 public static int Main ()
9 Task<int> t = TestMethod ();
11 try {
12 t.Start ();
13 return 1;
14 } catch (InvalidOperationException) {
17 try {
18 t.RunSynchronously ();
19 return 2;
20 } catch (InvalidOperationException) {
23 Console.WriteLine ("ok");
24 return 0;
27 async static Task<int> TestMethod ()
29 await Task.Delay (100000);
30 return 1;