2009-05-11 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 12 May 2009 03:31:25 +0000 (03:31 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 12 May 2009 03:31:25 +0000 (03:31 -0000)
* assembly-with-methods.cs: Mark the class with the
P/Invoke as abstract.

* cli-tables-tests.md: Add tests for implmap.

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

mono/tests/metadata-verifier/Changelog
mono/tests/metadata-verifier/assembly-with-methods.cs
mono/tests/metadata-verifier/cli-tables-tests.md

index 272030177cd719c57f632423fdfe22be71feb815..6d2133fa10ce820bc42829ab2d3d23ac0598e053 100644 (file)
@@ -1,3 +1,10 @@
+2009-05-11 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * assembly-with-methods.cs: Mark the class with the
+       P/Invoke as abstract.
+
+       * cli-tables-tests.md: Add tests for implmap.
+
 2009-05-07 Rodrigo Kumpera  <rkumpera@novell.com>
 
        * cli-tables-tests.md: Tests for module table.
index 9bb254024a3ff9bf11f22ea7eac0e53fbaa067b0..9dd9526cea5d855526fb5eff9d4adff5768c2f10 100644 (file)
@@ -17,7 +17,7 @@ public interface IFace
 }
 
 
-public class TypeTwo
+public abstract class TypeTwo
 {
        [DllImport ("bla.dll")]
        public static extern void PInvoke ();
index ad5198fdc189e5b9093228da1a05b76bcb1563ca..1e49a3b75593218c848948bf3ea88c9c38572266 100644 (file)
@@ -897,3 +897,45 @@ typespec-table {
        invalid offset table-row (0x1B 0) set-ushort 0x8800
 }
 
+implmap-table {
+       assembly assembly-with-methods.exe
+
+       #flags has good values (2)
+       #used bits: 0,1,2,7,8,9,10
+       invalid offset table-row (0x1C 0) set-bit 3
+       invalid offset table-row (0x1C 0) set-bit 4
+       invalid offset table-row (0x1C 0) set-bit 5
+       invalid offset table-row (0x1C 0) set-bit 6
+       invalid offset table-row (0x1C 0) set-bit 11
+       invalid offset table-row (0x1C 0) set-bit 12
+       invalid offset table-row (0x1C 0) set-bit 13
+       invalid offset table-row (0x1C 0) set-bit 14
+       invalid offset table-row (0x1C 0) set-bit 15
+
+       #call conv 0 and 6 are invalid
+       invalid offset table-row (0x1C 0) set-ushort 0x0000
+       invalid offset table-row (0x1C 0) set-ushort 0x0600
+       invalid offset table-row (0x1C 0) set-ushort 0x0700
+
+       #memberforwarded token is valid and indexes a method (3)
+       #pinvoke is row 5
+       invalid offset table-row (0x1C 0) + 2 set-ushort 0x0000, #null
+                       offset table-row (0x06 5) + 6 set-ushort 0x0444 #set method to abstract instead of pinvoke
+       invalid offset table-row (0x1C 0) + 2 set-ushort 0x0002, #field
+                       offset table-row (0x06 5) + 6 set-ushort 0x0444 #set method to abstract instead of pinvoke
+       invalid offset table-row (0x1C 0) + 2 set-ushort 0x8801, #bad method
+                       offset table-row (0x06 5) + 6 set-ushort 0x0444 #set method to abstract instead of pinvoke
+
+       #charset rule is not required (4)
+
+       #import name must be valid (5)
+       invalid offset table-row (0x1C 0) + 4 set-ushort 0x0000 #null
+       invalid offset table-row (0x1C 0) + 4 set-ushort 0x8800 #invalid
+
+       #import scope must be valie (6)
+       invalid offset table-row (0x1C 0) + 6 set-ushort 0x0000 #null
+       invalid offset table-row (0x1C 0) + 6 set-ushort 0x8800 #invalid
+
+       #TODO check methoddef for pinvokeimpl and state (7)
+
+}