Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1436,6 +1436,7 @@ public static void DCS_RootNameNamespaceAndKnownTypesThroughConstructorAsXmlDict
Assert.StrictEqual(((SimpleKnownTypeValue)actual.SimpleTypeValue).StrProperty, "PropertyValue");
}

[ActiveIssue(20361)]
[Fact]
public static void DCS_ExceptionObject()
{
Expand All @@ -1450,6 +1451,7 @@ public static void DCS_ExceptionObject()
Assert.StrictEqual(value.HelpLink, actual.HelpLink);
}

[ActiveIssue(20361)]
[Fact]
public static void DCS_ArgumentExceptionObject()
{
Expand All @@ -1464,6 +1466,7 @@ public static void DCS_ArgumentExceptionObject()
Assert.StrictEqual(value.HelpLink, actual.HelpLink);
}

[ActiveIssue(20361)]
[Fact]
public static void DCS_ExceptionMessageWithSpecialChars()
{
Expand Down
5 changes: 5 additions & 0 deletions src/System.Runtime.Serialization.Xml/tests/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,11 @@ private static bool CompareXElements(XElement baselineXElement, XElement actualX
XElement[] deskChildElems = baselineXElement.Descendants().OrderBy(m => m.Name.NamespaceName).ToArray();
XElement[] coreCLRChildElems = actualXElement.Descendants().OrderBy(m => m.Name.NamespaceName).ToArray();

if(deskChildElems.Length != coreCLRChildElems.Length)
{
return false;
}

for (int i = 0; i < deskChildElems.Length; i++)
{
if (!CompareXElements(deskChildElems[i], coreCLRChildElems[i])) return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ public class SNKeyPairDerived : StrongNameKeyPair
public SNKeyPairDerived(byte[] arr) : base(arr) {}
public SNKeyPairDerived(FileStream keyPairFileStream) : base(keyPairFileStream) {}
protected SNKeyPairDerived(SerializationInfo info, StreamingContext context) : base(info, context) {}

public SNKeyPairDerived SNKeyPairDerivedClone(ISerializable inter)
{
SerializationInfo info = new SerializationInfo(typeof(StrongNameKeyPair), new FormatterConverter());
StreamingContext context = new StreamingContext();

inter.GetObjectData(info, context);

return new SNKeyPairDerived(info, context);
}
}

public class StrongNameKeyPairTests
Expand All @@ -37,10 +27,8 @@ public class StrongNameKeyPairTests
public void SNKeyPairDerivedTestPosTest()
{
var sKeyPairDerived = new SNKeyPairDerived(s_data);
var sKeyPair = sKeyPairDerived.SNKeyPairDerivedClone(sKeyPairDerived);

RunActionWithDataFileStream(fileStream => sKeyPairDerived = new SNKeyPairDerived(fileStream));
sKeyPair = sKeyPairDerived.SNKeyPairDerivedClone(sKeyPairDerived);
}

[Fact]
Expand Down