Author: kumpera
Date: 2008-02-06 10:08:16 -0500 (Wed, 06 Feb 2008)
New Revision: 95030

Added:
   trunk/mono/mono/tests/verifier/valid_merge_base_type.cs
   trunk/mono/mono/tests/verifier/valid_merge_first_value_is_base_type.cs
   trunk/mono/mono/tests/verifier/valid_merge_interface_type.cs
   trunk/mono/mono/tests/verifier/valid_merge_interface_type_3.cs
   trunk/mono/mono/tests/verifier/valid_merge_interface_type_4.cs
   trunk/mono/mono/tests/verifier/valid_merge_second_value_is_base_type.cs
Modified:
   trunk/mono/mono/tests/verifier/ChangeLog
Log:
2008-02-06 Rodrigo Kumpera <[EMAIL PROTECTED]>
        * valid_merge_base_type.cs
        * valid_merge_first_value_is_base_type.cs:
        * valid_merge_interface_type_3.cs: 
        * valid_merge_interface_type_4.cs:
        * valid_merge_interface_type.cs:
        * valid_merge_second_value_is_base_type.cs: New tests for stack merging.
        These tests verify the correctness of the merged value.



Modified: trunk/mono/mono/tests/verifier/ChangeLog
===================================================================
--- trunk/mono/mono/tests/verifier/ChangeLog    2008-02-06 15:04:22 UTC (rev 
95029)
+++ trunk/mono/mono/tests/verifier/ChangeLog    2008-02-06 15:08:16 UTC (rev 
95030)
@@ -1,3 +1,12 @@
+2008-02-06 Rodrigo Kumpera <[EMAIL PROTECTED]>
+       * valid_merge_base_type.cs
+       * valid_merge_first_value_is_base_type.cs:
+       * valid_merge_interface_type_3.cs: 
+       * valid_merge_interface_type_4.cs:
+       * valid_merge_interface_type.cs:
+       * valid_merge_second_value_is_base_type.cs: New tests for stack merging.
+       These tests verify the correctness of the merged value.
+
 2008-01-30 Rodrigo Kumpera <[EMAIL PROTECTED]>
 
        * make_tests.sh: More tests for brtrue/brfalse with boxed values

Added: trunk/mono/mono/tests/verifier/valid_merge_base_type.cs
===================================================================
--- trunk/mono/mono/tests/verifier/valid_merge_base_type.cs     2008-02-06 
15:04:22 UTC (rev 95029)
+++ trunk/mono/mono/tests/verifier/valid_merge_base_type.cs     2008-02-06 
15:08:16 UTC (rev 95030)
@@ -0,0 +1,27 @@
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+
+public class Parent {
+
+}
+
+public class Foo : Parent {
+
+}
+
+public class Bar : Parent {
+
+}
+class Driver {
+
+
+       public static int Main (string[] args) {
+               Parent p;
+               Foo f = new Foo();
+               Bar b = new Bar();
+               p = args == null? (Parent) f : (Parent) b;
+
+               return 1;
+       }
+}      

Added: trunk/mono/mono/tests/verifier/valid_merge_first_value_is_base_type.cs
===================================================================
--- trunk/mono/mono/tests/verifier/valid_merge_first_value_is_base_type.cs      
2008-02-06 15:04:22 UTC (rev 95029)
+++ trunk/mono/mono/tests/verifier/valid_merge_first_value_is_base_type.cs      
2008-02-06 15:08:16 UTC (rev 95030)
@@ -0,0 +1,27 @@
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+
+public class Parent {
+
+}
+
+public class Foo : Parent {
+
+}
+
+public class Bar : Parent {
+
+}
+class Driver {
+
+
+       public static int Main (string[] args) {
+               Parent p;
+               Parent f = new Parent();
+               Bar b = new Bar();
+               p = args == null? (Parent) f : (Parent) b;
+
+               return 1;
+       }
+}      

Added: trunk/mono/mono/tests/verifier/valid_merge_interface_type.cs
===================================================================
--- trunk/mono/mono/tests/verifier/valid_merge_interface_type.cs        
2008-02-06 15:04:22 UTC (rev 95029)
+++ trunk/mono/mono/tests/verifier/valid_merge_interface_type.cs        
2008-02-06 15:08:16 UTC (rev 95030)
@@ -0,0 +1,31 @@
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+
+public interface Parent {
+       void Test ();
+}
+
+public class Foo : Parent {
+       public void Test () {}
+}
+
+public class Bar : Parent {
+       public void Test () {}
+
+}
+
+class Driver {
+
+
+       public static int Main (string[] args) {
+               Parent p;
+               Foo f = new Foo();
+               Bar b = new Bar();
+               p = args == null ? (Parent) f : (Parent) b;
+
+               p.Test();
+
+               return 1;
+       }
+}      

Added: trunk/mono/mono/tests/verifier/valid_merge_interface_type_3.cs
===================================================================
--- trunk/mono/mono/tests/verifier/valid_merge_interface_type_3.cs      
2008-02-06 15:04:22 UTC (rev 95029)
+++ trunk/mono/mono/tests/verifier/valid_merge_interface_type_3.cs      
2008-02-06 15:08:16 UTC (rev 95030)
@@ -0,0 +1,33 @@
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+
+public interface Parent {
+       void Test ();
+}
+
+public interface ParentB {
+       void TestB ();
+}
+
+public class Foo :  Parent, ParentB {
+       public void Test () { Console.WriteLine ("Foo::Test"); }
+       public void TestB () { Console.WriteLine ("Foo::TestB"); }
+}
+
+public class Bar :  Parent, ParentB {
+       public void Test () { Console.WriteLine ("Bar::Test"); }
+       public void TestB () { Console.WriteLine ("Bar::TestB"); }
+}
+
+class Driver {
+       public static int Main (string[] args) {
+               ParentB p;
+               ParentB f = new Foo();
+               Bar b = new Bar();
+               p = args == null ? (ParentB) f : (ParentB) b;
+               p.TestB();
+
+               return 1;
+       }
+}      

Added: trunk/mono/mono/tests/verifier/valid_merge_interface_type_4.cs
===================================================================
--- trunk/mono/mono/tests/verifier/valid_merge_interface_type_4.cs      
2008-02-06 15:04:22 UTC (rev 95029)
+++ trunk/mono/mono/tests/verifier/valid_merge_interface_type_4.cs      
2008-02-06 15:08:16 UTC (rev 95030)
@@ -0,0 +1,33 @@
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+
+public interface Parent {
+       void Test ();
+}
+
+public interface ParentB {
+       void TestB ();
+}
+
+public class Foo :  Parent, ParentB {
+       public void Test () { Console.WriteLine ("Foo::Test"); }
+       public void TestB () { Console.WriteLine ("Foo::TestB"); }
+}
+
+public class Bar :  Parent, ParentB {
+       public void Test () { Console.WriteLine ("Bar::Test"); }
+       public void TestB () { Console.WriteLine ("Bar::TestB"); }
+}
+
+class Driver {
+       public static int Main (string[] args) {
+               ParentB p;
+               Foo f = new Foo();
+               ParentB b = new Bar();
+               p = args == null ? (ParentB) f : (ParentB) b;
+               p.TestB();
+
+               return 1;
+       }
+}      

Added: trunk/mono/mono/tests/verifier/valid_merge_second_value_is_base_type.cs
===================================================================
--- trunk/mono/mono/tests/verifier/valid_merge_second_value_is_base_type.cs     
2008-02-06 15:04:22 UTC (rev 95029)
+++ trunk/mono/mono/tests/verifier/valid_merge_second_value_is_base_type.cs     
2008-02-06 15:08:16 UTC (rev 95030)
@@ -0,0 +1,27 @@
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+
+public class Parent {
+
+}
+
+public class Foo : Parent {
+
+}
+
+public class Bar : Parent {
+
+}
+class Driver {
+
+
+       public static int Main (string[] args) {
+               Parent p;
+               Foo f = new Foo();
+               Parent b = new Parent();
+               p = args == null? (Parent) f : (Parent) b;
+
+               return 1;
+       }
+}      

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to