diff options
author | Marcos Henrich <marcos.henrich@xamarin.com> | 2014-08-29 13:57:31 +0400 |
---|---|---|
committer | Marcos Henrich <marcos.henrich@xamarin.com> | 2014-08-29 13:57:31 +0400 |
commit | 8308eb87e05e658ebafe38fd917a7fff2fa1a6ed (patch) | |
tree | 5120c32f0b0e0a35f0ed8d0709138362f10589ff /mcs/class/System.Xml.Linq | |
parent | af4dcd117d9ab2d39b2f94e065fd0dd1f5e70794 (diff) |
Test XElement constructed from array with null values as object.
Covers #20151.
Diffstat (limited to 'mcs/class/System.Xml.Linq')
-rw-r--r-- | mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs b/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs index fd5cd82bf94..70616aa0da0 100644 --- a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs +++ b/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs @@ -2097,5 +2097,13 @@ namespace MonoTests.System.Xml.Linq Assert.AreEqual (xe.Content.ToString (), "<Data />", "#3"); } #endif + + [Test] // Bug #20151 + public void XElementFromArrayWithNullValuesAsObject () + { + string[] content = {null, "content1", null, "content2"}; + var el = new XElement ("test", (object)content); + Assert.AreEqual ("<test>content1content2</test>", el.ToString ()); + } } } |