You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 0a113cb3a6feb7873f632839b1307cc6033cd595
This commit is contained in:
committed by
Jo Shields
parent
183bba2c9a
commit
6992685b86
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user