This commit was manufactured by cvs2svn to create branch 'mono-1-0'.
[mono.git] / mcs / ilasm / tests / test-data-c.il
1 //
2 // Test emitting data and the field mapping with the data
3 // defined in another class. (Actually all .data is global,
4 // even if it is defined in a class)
5 //
6 // Author(s):
7 //  Jackson Harper (Jackson@LatitudeGeo.com)
8 //
9 // (C) 2003 Jackson Harper, All rights reserved
10 //
11
12 .assembly extern mscorlib { }
13 .assembly 'test-data-b' { }
14
15 .class public Stub extends [mscorlib]System.Object {
16        .data some_data = int32 (1)
17 }
18
19 .class public T extends [mscorlib]System.Object {
20
21         .field private static int32 some_field at some_data
22
23         .method public static int32 main ()
24         {
25                 .entrypoint
26
27                 ldsfld int32 T::some_field
28                 brfalse fail
29
30         pass:
31                 ldstr "PASS"
32                 call void [mscorlib]System.Console::WriteLine (string)
33                 ldc.i4.0
34                 ret
35         fail:
36                 ldstr "FAIL"
37                 call void [mscorlib]System.Console::WriteLine (string)
38                 ldc.i4.1
39                 ret
40         }
41 }