Test for bug #366445.
authorPaolo Molaro <lupus@oddwiz.org>
Tue, 4 Mar 2008 17:21:56 +0000 (17:21 -0000)
committerPaolo Molaro <lupus@oddwiz.org>
Tue, 4 Mar 2008 17:21:56 +0000 (17:21 -0000)
svn path=/trunk/mono/; revision=97328

mono/tests/Makefile.am
mono/tests/marshal-valuetypes.cs [new file with mode: 0644]

index a655a8ea3dd05f1deffbe433bdcbf7f187c5bcf2..111d6bfc506e452eb3ee9e5f6ceb56a976d53e07 100644 (file)
@@ -182,6 +182,7 @@ BASE_TEST_CS_SRC=           \
        marshal7.cs             \
        marshal8.cs             \
        marshal9.cs             \
+       marshal-valuetypes.cs   \
        test-byval-in-struct.cs \
        thread.cs               \
        thread5.cs              \
diff --git a/mono/tests/marshal-valuetypes.cs b/mono/tests/marshal-valuetypes.cs
new file mode 100644 (file)
index 0000000..17bd016
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+
+public class Test: MarshalByRefObject
+{
+        public DateTime Stamp = new DateTime (1968, 1, 2);
+
+        static int Main ()
+        {
+                AppDomain d = AppDomain.CreateDomain ("foo");
+                Test t = (Test) d.CreateInstanceAndUnwrap (typeof (Test).Assembly.FullName, typeof (Test).FullName);
+               if (t.Stamp != new DateTime (1968, 1, 2))
+                       return 1;
+               return 0;
+        }
+}