+2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
+
+ * cli-tables-tests.md: Tests for class layout table.
+
+ * assembly-with-complex-type.cs: Added more stuff for
+ class layout tests.
+
2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
* cli-tables-tests.md: Tests for decl security table.
public class Bla : Iface
{
public void Foo () {}
-}
\ No newline at end of file
+}
+
+[StructLayout (LayoutKind.Sequential, Pack=8)]
+public class ExplicitLayout {
+ int a;
+ int b;
+}
+
+[StructLayout (LayoutKind.Sequential, Pack=4, Size=20)]
+public class ExplicitLayout2 {
+ int a;
+ int b;
+}
#bad permission set (6)
invalid offset table-row ( 0xe 0 ) + 4 set-ushort 0x8800
}
+
+class-layout-table {
+ assembly assembly-with-complex-type.exe
+
+ #valid parent row (2)
+ invalid offset table-row ( 0xF 0 ) + 6 set-ushort 0x0000
+ invalid offset table-row ( 0xF 0 ) + 6 set-ushort 0x0880
+
+ #TODO check that the type is not an interface (2)
+ #TODO parent must not have auto layout (3)
+
+ #packing must be (0,1,2,4,8,16,32,64,128) (4)
+ invalid offset table-row ( 0xF 0 ) set-ushort 0x0003
+
+ #TODO do checks depending on the kind of parent (4)
+
+ #Check layout along the inheritance chain. (7)
+}
+