* cli-tables-tests.md: Add tests for the methodspec table.
* assembly-with-generics.cs: Add stuff for new tests.
svn path=/trunk/mono/; revision=134428
+2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * cli-tables-tests.md: Add tests for the methodspec table.
+
+ * assembly-with-generics.cs: Add stuff for new tests.
+
2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
* cli-tables-tests.md: Add tests for the generic param table.
using System;
using System.Runtime.InteropServices;
-public class Simple<T,K> {}
+public class Simple<T,K> {
+ public static void Gen<D>() {
+ Simple<D,T>.Gen<K> ();
+ }
+ public T t;
+}
public class Generic<A,B,C,D,E>
where B : class
public static void Main ()
{
+ var x = new Simple<int, double> ();
+ var y = x.t;
+ Simple<int, double>.Gen<string> ();
+ Simple<int, object>.Gen<Type> ();
}
}
\ No newline at end of file
#step bigger than 1
invalid offset table-row (0x2A 0) set-ushort 0,
offset table-row (0x2A 1) set-ushort 2
+}
+
+method-spec-table {
+ assembly assembly-with-generics.exe
+
+ #method is a valid token
+ invalid offset table-row (0x2B 0) set-ushort 0
+ invalid offset table-row (0x2B 0) set-ushort 0x8800
+ invalid offset table-row (0x2B 0) set-ushort 0x8801
+
+ #instantiation is invalid
+
+ invalid offset table-row (0x2B 0) + 2 set-ushort 0
+ invalid offset table-row (0x2B 0) + 2 set-ushort 0xABCD
+ #TODO check the content of the blob sig and validate against the token.
}