[interp] Reduce computation under calc_section mutex
[mono-project.git] / mcs / tests / test-513.cs
blobfad71eb113b4f4fd3501f29603a6f3ef1fd7339a
1 // Compiler options: -linkresource:test-513.cs -linkresource:test-512.cs -linkresource:./test-511.cs,test
3 using System;
4 using System.IO;
5 using System.Reflection;
7 public class Test
9 public static int Main ()
11 Assembly a = Assembly.GetExecutingAssembly ();
12 string[] resourceNames = a.GetManifestResourceNames ();
13 if (resourceNames.Length != 3)
14 return 1;
15 if (resourceNames[0] != "test-513.cs")
16 return 2;
17 if (resourceNames[1] != "test-512.cs")
18 return 3;
19 if (resourceNames[2] != "test")
20 return 4;
21 FileStream f = a.GetFile ("test-513.cs");
22 if (f == null)
23 return 5;
24 f = a.GetFile ("test-512.cs");
25 if (f == null)
26 return 6;
27 f = a.GetFile ("test-511.cs");
28 if (f == null)
29 return 7;
30 f = a.GetFile ("test");
31 if (f != null)
32 return 8;
33 Stream s = a.GetManifestResourceStream ("test-513.cs");
34 if (s == null)
35 return 9;
36 s = a.GetManifestResourceStream ("test-512.cs");
37 if (s == null)
38 return 10;
39 s = a.GetManifestResourceStream ("test");
40 if (s == null)
41 return 11;
42 s = a.GetManifestResourceStream ("test-511.cs");
43 if (s != null)
44 return 12;
46 return 0;