2009-05-05 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Wed, 6 May 2009 00:19:21 +0000 (00:19 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Wed, 6 May 2009 00:19:21 +0000 (00:19 -0000)
* cli-tables-tests.md: Tests for propertymap table.

* assembly-with-cas.cs: New test file for producing tests
for property tables.

* Makefile: Add new dependencies.

svn path=/trunk/mono/; revision=133627

mono/tests/metadata-verifier/Changelog
mono/tests/metadata-verifier/Makefile
mono/tests/metadata-verifier/assembly-with-properties.cs [new file with mode: 0644]
mono/tests/metadata-verifier/cli-tables-tests.md

index e4e8ed6a2bd0bd374b3863112687ba799e5275d4..7d682987e2c3839aabbf4d730b25fc24f3d849af 100644 (file)
@@ -1,3 +1,12 @@
+2009-05-05 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * cli-tables-tests.md: Tests for propertymap table.
+
+       * assembly-with-cas.cs: New test file for producing tests
+       for property tables.
+
+       * Makefile: Add new dependencies.
+
 2009-05-05 Rodrigo Kumpera  <rkumpera@novell.com>
 
        * cli-tables-tests.md: Tests for event table.
index 5ec900d3a6bb8ea4b92e69093707863fb7ec6f9c..9403d18077d2dc7c3e029a1014afde31214d681b 100644 (file)
@@ -28,6 +28,9 @@ assembly-with-cas.exe: assembly-with-cas.cs
 assembly-with-events.exe: assembly-with-events.cs
        gmcs assembly-with-events.cs
 
+assembly-with-properties.exe: assembly-with-properties.cs
+       gmcs assembly-with-properties.cs
+
 TEST_BINARIES = assembly-with-resource.exe \
        assembly-with-complex-type.exe \
        assembly-with-methods.exe \
@@ -36,6 +39,7 @@ TEST_BINARIES = assembly-with-resource.exe \
        assembly-with-cattr.exe \
        assembly-with-cas.exe \
        assembly-with-events.exe \
+       assembly-with-properties.exe \
        simple-assembly.exe
 
 
diff --git a/mono/tests/metadata-verifier/assembly-with-properties.cs b/mono/tests/metadata-verifier/assembly-with-properties.cs
new file mode 100644 (file)
index 0000000..4a1b55a
--- /dev/null
@@ -0,0 +1,34 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.ComponentModel;
+
+public delegate void Del ();
+
+public class Class0
+{
+       public int PropA { get; set; }
+       public int PropB { set { int x = value; } }
+       public int PropC { get { return 0; } }
+}
+
+public class Class1
+{
+       public int Prop0 { get; set; }
+       public int Prop1 { get; set; }
+       public int Prop2 { get; set; }
+}
+
+public class Class2
+{
+       public int Prop0 { get; set; }
+       public int Prop1 { get; set; }
+       public int Prop2 { get; set; }
+}
+public class Class
+{
+       public static void Main ()
+       {
+       
+       }
+}
index 370c68eb6bc35f84e2a917dcec98145ab769a630..5a4a8958d97bd6d6b0223152e7d258090d2d4b49 100644 (file)
@@ -790,3 +790,17 @@ event-table {
        #TODO check for dups
 }
 
+property-map-table {
+       assembly assembly-with-properties.exe
+
+       #parent must be a valid typedef token
+       invalid offset table-row ( 0x15 0 ) set-ushort 0x8800
+
+       #bad propertylist
+       invalid offset table-row ( 0x15 0 ) + 2 set-ushort 0x0000
+       invalid offset table-row ( 0x15 0 ) + 2 set-ushort 0x8800
+
+       #propertylist must not be duplicated and increase monotonically
+       #property list is 1,3,7 we change the first to 4
+       invalid offset table-row ( 0x15 0 ) + 2 set-ushort 4
+}