New test
authorMarek Safar <marek.safar@gmail.com>
Wed, 30 Mar 2011 08:24:00 +0000 (09:24 +0100)
committerMarek Safar <marek.safar@gmail.com>
Wed, 30 Mar 2011 09:40:17 +0000 (10:40 +0100)
mcs/tests/test-814.cs [new file with mode: 0644]
mcs/tests/ver-il-net_4_0.xml

diff --git a/mcs/tests/test-814.cs b/mcs/tests/test-814.cs
new file mode 100644 (file)
index 0000000..ded27a9
--- /dev/null
@@ -0,0 +1,43 @@
+// Compiler options: -r:../class/lib/net_2_0/Mono.Cecil.dll
+
+using System;
+using Mono.Cecil;
+
+class Test
+{
+       public static string A
+       {
+               get { return ""; }
+       }
+
+       public string B
+       {
+               get { return ""; }
+       }
+
+       public static int Main ()
+       {
+               var assembly = AssemblyDefinition.ReadAssembly (typeof (Test).Assembly.Location);
+               var t = assembly.MainModule.GetType ("Test");
+               foreach (var p in t.Properties)
+               {
+                       switch (p.Name) {
+                       case "A":
+                               if (!p.HasThis)
+                                       break;
+                               
+                               return 1;
+                       case "B":
+                               if (p.HasThis)
+                                       break;
+                               
+                               return 2;
+                       default:
+                               return 3;
+                       }
+               }
+               
+               return 0;
+       }
+}
+
index cbc881eb43c9640431483d551f15011ced77a5ef..c47e898e93f6f1f39e1939ad57fb1eb0249d0948 100644 (file)
       </method>
     </type>
   </test>
+  <test name="test-814.cs">
+    <type name="Test">
+      <method name="System.String get_A()">
+        <size>6</size>
+      </method>
+      <method name="System.String get_B()">
+        <size>6</size>
+      </method>
+      <method name="Int32 Main()">
+        <size>265</size>
+      </method>
+      <method name="Void .ctor()">
+        <size>7</size>
+      </method>
+    </type>
+  </test>
   <test name="test-82.cs">
     <type name="N1.N2.B">
       <method name="Void .ctor()">