[System.Runtime.Serialization] DataContractSerializerTest
authorMarcos Henrich <marcos.henrich@xamarin.com>
Mon, 29 Feb 2016 19:09:19 +0000 (19:09 +0000)
committerMarcos Henrich <marcos.henrich@xamarin.com>
Mon, 29 Feb 2016 19:09:19 +0000 (19:09 +0000)
Added test that covers #37116.

mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/DataContractSerializerTest.cs

index ada461fe2b8610290a5e9ef17a4170552cfd21e9..89c0bef1b557867cea18843de713a736cb4fd0e5 100644 (file)
@@ -122,5 +122,17 @@ namespace MonoTests.System.Runtime.Serialization
                                Assert.IsTrue (s.Contains ("<Flags>All</Flags>"));
                        }
                }
+
+               // Bug #37116
+               [Test]
+               public void KeyPairOfAny ()
+               {
+                       var dict = new Dictionary<string, object> ();
+                       dict.Add ("test", new List<string> () { "test entry" });
+
+                       var dcs = new DataContractSerializer (typeof(Dictionary<string, object>));
+                       dcs.WriteObject (new MemoryStream (), dict);
+                       // Should not throw exception.
+               }
        }
 }