2006-02-16 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / ilasm / tests / test-data-a.il
1 //
2 // Test emitting data and the field mapping
3 //
4 // Author(s):
5 //  Jackson Harper (Jackson@LatitudeGeo.com)
6 //
7 // (C) 2003 Jackson Harper, All rights reserved
8 //
9
10 .assembly extern mscorlib { }
11 .assembly 'test-data-a' { }
12
13
14 .class public T extends [mscorlib]System.Object {
15
16         .data some_data = int32 (1)
17         .field private static int32 some_field at some_data
18
19         .method public static int32 main ()
20         {
21                 .entrypoint
22
23                 ldsfld int32 T::some_field
24                 brfalse fail
25
26         pass:
27                 ldstr "PASS"
28                 call void [mscorlib]System.Console::WriteLine (string)
29                 ldc.i4.0
30                 ret
31         fail:
32                 ldstr "FAIL"
33                 call void [mscorlib]System.Console::WriteLine (string)
34                 ldc.i4.1
35                 ret
36         }
37 }
38