[mono/tests] Fix out of tree build.
[mono-project.git] / mcs / tests / test-async-37.cs
blob4ee0b4a3742d5342086611fd1c0a1857914949ec
1 using System;
2 using System.Collections;
3 using System.Threading.Tasks;
5 class C
7 static async Task<int> Test ()
9 var t = new Task<int> (() => { throw new ApplicationException ();});
10 try {
11 try {
12 t.Start ();
13 await t;
14 } catch {
15 throw;
17 return -1;
18 } catch {
19 return 1;
23 public static int Main ()
25 var res = Test ().Result;
26 if (res != 1)
27 return 1;
29 return 0;