-2006-10-29 Robert Jordan <robertj@gmx.net>\r
-\r
- * SerializationCallbackTest.cs: Add test case for bug #78594.\r
-\r
-2005-12-21 Raja R Harinath <rharinath@novell.com>\r
-\r
- * SerializationTest.cs: Use Assert.AreEqual instead of\r
- Assertion.AssertEquals.\r
- (ReadData): Fix order of 'expected' and 'actual' when validating\r
- 'list'.\r
- (*.CheckEqual): Add new 'context' argument. Encodes the path\r
- taken to get to th current object.\r
-\r
-2005-12-15 Gert Driesen <drieseng@users.sourceforge.net>\r
-\r
- * ObjectManagerTest.cs: New test for bug #76931.\r
-\r
-2005-03-23 Lluis Sanchez Gual <lluis@ximian.com>\r
-\r
- * ArraySerializationTest.cs: New serialization tests.\r
-\r
-2005-03-04 Lluis Sanchez Gual <lluis@novell.com>\r
-\r
- * SerializationTest.cs: Improved test.\r
-\r
-2004-12-09 Lluis Sanchez Gual <lluis@ximian.com>\r
-\r
- * SerializationTest.cs: Added test for bug #70104.\r
-\r
-2004-05-13 Lluis Sanchez Gual <lluis@ximian.com>\r
-\r
- * SerializationTest.cs: Test serialization of empty struct arrays. This\r
- used to fail.\r
-\r
-2003-07-23 Lluis Sanchez Gual <lluis@ximian.com>\r
-\r
- * SerializationTest.cs: Fixed delegate invocation. Didn't compile\r
- on windows.\r
-\r
-2003-07-23 Lluis Sanchez Gual <lluis@ximian.com>\r
-\r
- * SerializationTest.cs: Added.\r
-\r
-2002-12-21 Nick Drochak <ndrochak@gol.com>\r
-\r
- * all: make tests build and run under nunit2\r
-\r
-2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>\r
-\r
- * AllTests.cs: added FormatterServicesTests.\r
- * FormatterServicesTests.cs: New file.\r
-\r
-2002-06-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>\r
-\r
- * AllTests.cs: New file to make 'make test' work.\r
- * ChangeLog: New file.\r
-\r
+2008-09-17 Robert Jordan <robertj@gmx.net>
+
+ * SerializationTest2.cs: Add test case for bug #421664.
+
+2006-10-29 Robert Jordan <robertj@gmx.net>
+
+ * SerializationCallbackTest.cs: Add test case for bug #78594.
+
+2005-12-21 Raja R Harinath <rharinath@novell.com>
+
+ * SerializationTest.cs: Use Assert.AreEqual instead of
+ Assertion.AssertEquals.
+ (ReadData): Fix order of 'expected' and 'actual' when validating
+ 'list'.
+ (*.CheckEqual): Add new 'context' argument. Encodes the path
+ taken to get to th current object.
+
+2005-12-15 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * ObjectManagerTest.cs: New test for bug #76931.
+
+2005-03-23 Lluis Sanchez Gual <lluis@ximian.com>
+
+ * ArraySerializationTest.cs: New serialization tests.
+
+2005-03-04 Lluis Sanchez Gual <lluis@novell.com>
+
+ * SerializationTest.cs: Improved test.
+
+2004-12-09 Lluis Sanchez Gual <lluis@ximian.com>
+
+ * SerializationTest.cs: Added test for bug #70104.
+
+2004-05-13 Lluis Sanchez Gual <lluis@ximian.com>
+
+ * SerializationTest.cs: Test serialization of empty struct arrays. This
+ used to fail.
+
+2003-07-23 Lluis Sanchez Gual <lluis@ximian.com>
+
+ * SerializationTest.cs: Fixed delegate invocation. Didn't compile
+ on windows.
+
+2003-07-23 Lluis Sanchez Gual <lluis@ximian.com>
+
+ * SerializationTest.cs: Added.
+
+2002-12-21 Nick Drochak <ndrochak@gol.com>
+
+ * all: make tests build and run under nunit2
+
+2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * AllTests.cs: added FormatterServicesTests.
+ * FormatterServicesTests.cs: New file.
+
+2002-06-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * AllTests.cs: New file to make 'make test' work.
+ * ChangeLog: New file.
+
--- /dev/null
+//
+// System.Runtime.Serialization.SerializationTest2.cs
+//
+// Test case for bug #421664.
+//
+// Author: Robert Jordan <robertj@gmx.net>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.IO;
+using System.Runtime.Serialization.Formatters.Binary;
+using NUnit.Framework;
+
+// We need a different namespace because we pollute it with
+// a new ISerializable declaration.
+namespace MonoTests.System.Runtime.Serialization2
+{
+ public interface ISerializable
+ {
+ }
+
+ [Serializable]
+ public class Class : ISerializable
+ {
+ }
+
+ [TestFixture]
+ public class SerializationTest2
+ {
+ [Test]
+ public void TestSerialization ()
+ {
+ MemoryStream ms = new MemoryStream ();
+
+ new BinaryFormatter ().Serialize (ms, new Class ());
+ ms.Position = 0;
+ new BinaryFormatter ().Deserialize (ms);
+ }
+ }
+}