[bcl] Update tests that failed when .cs file contained CRLF
[mono.git] / mcs / tests / test-primary-ctor-07.cs
index 233cfd0d03c254b522d4b80344d7032012519c6b..79a1c2991e7de9b8303f427583b1dc319c527c1a 100644 (file)
@@ -1,3 +1,5 @@
+// Compiler options: -langversion:experimental
+
 using System;
 
 struct S (int x)
@@ -14,6 +16,21 @@ struct S (int x)
        }
 }
 
+struct S2 (int arg)
+{
+       public readonly int v = arg;
+}
+
+struct S3 (string s = "arg")
+{
+       public readonly string V2 = s;
+
+       public S3 (int i, string s = "arg2")
+               : this (s)
+       {
+       }
+}
+
 class X
 {
        public static int Main ()
@@ -24,6 +41,15 @@ class X
                if (new S ('x').y != 1)
                        return 2;
 
+               if (new S2 (2).v != 2)
+                       return 3;
+
+               if (new S3 ("x").V2 != "x")
+                       return 4;
+
+               if (new S3 (0).V2 != "arg2")
+                       return 5;
+
                return 0;
        }
 }
\ No newline at end of file