You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
committed by
Jo Shields
parent
aa7da660d6
commit
c042cd0c52
@@ -137,9 +137,7 @@ namespace MonoTests.System.Runtime.Serialization
|
||||
MemoryStream sw = new MemoryStream ();
|
||||
ser.WriteObject (sw, 1);
|
||||
string expected = "<int xmlns=\"http://schemas.microsoft.com/2003/10/Serialization/\">1</int>";
|
||||
byte[] buf = sw.ToArray ();
|
||||
// Skip the utf8 bom
|
||||
Assert.AreEqual (expected, Encoding.UTF8.GetString (buf, 3, buf.Length - 3));
|
||||
Assert.AreEqual (expected, Encoding.UTF8.GetString (sw.ToArray ()));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -1641,7 +1639,7 @@ namespace MonoTests.System.Runtime.Serialization
|
||||
+ "<SecondId>ID-GOES-HERE</SecondId>"
|
||||
+ "</MyData>";
|
||||
var serializer = new DataContractSerializer (typeof (MyData));
|
||||
using (var stream = new MemoryStream (Encoding.UTF8.GetBytes (whatItGets)))
|
||||
using (var stream = new MemoryStream (Encoding.UTF8.GetBytes (whatItGets.Replace ("ID-GOES-HERE", Guid.NewGuid ().ToString ()))))
|
||||
{
|
||||
var data = serializer.ReadObject (stream);
|
||||
}
|
||||
|
@@ -244,7 +244,7 @@ namespace MonoTests.System.Runtime.Serialization
|
||||
Assert.That (ret, Is.Not.Null, "#2");
|
||||
|
||||
Assert.That (ret.ArrayRank, Is.EqualTo (0), "#3");
|
||||
Assert.That (ret.BaseType, Is.EqualTo ("TestWCF.Model.MyCollectionOfdouble"), "#4");
|
||||
Assert.That (ret.BaseType, Is.EqualTo ("TestWCF.Model1.MyCollectionOfdouble"), "#4");
|
||||
Assert.That (ret.TypeArguments.Count, Is.EqualTo (0), "#5");
|
||||
}
|
||||
|
||||
|
@@ -47,7 +47,6 @@ namespace MonoTests.System.Xml
|
||||
{
|
||||
MemoryStream ms = new MemoryStream ();
|
||||
var w = XmlDictionaryWriter.CreateMtomWriter (ms, Encoding.UTF8, 10000, "sTaRt", "myboundary", "urn:foo", false, false);
|
||||
w.WriteStartDocument ();
|
||||
w.WriteStartElement ("root");
|
||||
w.WriteRaw ("RAW");
|
||||
w.WriteStartElement ("foo");
|
||||
@@ -79,11 +78,11 @@ Content-ID: <urn:foo>
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Content-Type: application/xop+xml;charset=utf-8;type=""sTaRt""
|
||||
|
||||
<root>RAW<foo>bcdMjxG<arr>true</arr><arr>false</arr><arr>true</arr>AQIDBAU=999
|
||||

|
||||
<root>RAW<foo>bcdMjxG<arr>true</arr><arr>false</arr><arr>true</arr>AQIDBAU=999
XXX
|
||||

XXX
|
||||
666</foo></root>
|
||||
--myboundary--
|
||||
<root/><root/><root/>".Replace ("\n", "\r\n");
|
||||
<root/><root/><root/>".Replace ("\n", "\r\n").Replace ("XXX\r\n", "\n");
|
||||
}
|
||||
|
||||
class MyStreamProvider : IStreamProvider
|
||||
|
Reference in New Issue
Block a user