[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / tests / gtest-anontype-05.cs
index 7070deea32b999356f1cbcf722423e85c6bd5b39..478c1de03ef9793658498b2d89704b27105b174e 100644 (file)
@@ -11,7 +11,7 @@ public class Test
                return null;
        }
        
-       static int Main ()
+       public static int Main ()
        {
                var v1 = new { Name = "Scott", Age = 21 };
                var v2 = new { Age = 20, Name = "Sam" };
@@ -35,12 +35,26 @@ public class Test
                Console.WriteLine (v1);
                Console.WriteLine (v3);
                
-               if (v1.ToString () != "Name = Scott, Age = 21")
+               if (v1.ToString () != "{ Name = Scott, Age = 21 }")
                        return 6;
                        
-               if (v3.ToString () != "Name = <null>, Age = 33")
+               if (v3.ToString () != "{ Name = , Age = 33 }")
                        return 7;
-               
+
+               var v4 = new {};
+
+               if (v4.ToString () != "{ }")
+                       return 8;
+
+               var v5 = new { Foo = "Bar" };
+               var v6 = new { Foo = Null () };
+
+               if (v5.ToString () != "{ Foo = Bar }")
+                       return 9;
+
+               if (v6.ToString () != "{ Foo =  }")
+                       return 10;
+
                return 0;
        }
 }