Merge pull request #1861 from saper/home-override
[mono-project.git] / mcs / tests / test-async-34.cs
blobc40f7502883614815e8fbbd185a0bcfdad9cf0b9
1 using System;
2 using System.Threading.Tasks;
4 class C
6 static int called;
8 public static async Task Test (bool arg)
10 if (arg)
11 return;
13 called++;
14 await Task.FromResult (1);
18 public static async Task Test2 (bool arg)
20 if (arg)
21 return;
23 called++;
26 public static int Main ()
28 Test (true).Wait ();
29 if (called != 0)
30 return 1;
32 Test2 (true).Wait ();
33 if (called != 0)
34 return 2;
36 return 0;