Imported Upstream version 4.2.0.179

Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
Xamarin Public Jenkins
2015-08-26 07:17:56 -04:00
committed by Jo Shields
parent aa7da660d6
commit c042cd0c52
7507 changed files with 90259 additions and 657307 deletions

View File

@ -509,7 +509,7 @@ namespace MonoTests.System.Runtime.Serialization.Json
// Read() valid and invalid contents
[Test]
[ExpectedException (typeof (XmlException))]
[Ignore ("It should throw XmlException for parser error, but .NET fails to report that")]
public void ReadTwoTopLevelContents ()
{
ReadToEnd (CreateReader ("{}{}"));
@ -537,7 +537,7 @@ namespace MonoTests.System.Runtime.Serialization.Json
}
[Test]
[ExpectedException (typeof (XmlException))]
[Ignore ("It should throw XmlException for parser error, but .NET fails to report that")]
public void ReadExtraCloseCurly2 ()
{
ReadToEnd (CreateReader ("{}}"));
@ -566,7 +566,7 @@ namespace MonoTests.System.Runtime.Serialization.Json
[Test]
[ExpectedException (typeof (XmlException))]
[Category ("NotDotNet")] // hmm, why does it pass?
[Ignore ("NotDotNet")] // hmm, why does it pass?
public void ReadExtraCloseBrace2 ()
{
ReadToEnd (CreateReader ("[]]"));
@ -655,7 +655,7 @@ namespace MonoTests.System.Runtime.Serialization.Json
[Test]
[ExpectedException (typeof (XmlException))]
[Category ("NotDotNet")] // likely .NET bug
[Ignore ("NotDotNet")] // likely .NET bug
public void ReadInvalidNumber3 ()
{
ReadToEnd (CreateReader ("01"));
@ -670,7 +670,7 @@ namespace MonoTests.System.Runtime.Serialization.Json
[Test]
[ExpectedException (typeof (XmlException))]
[Category ("NotDotNet")] // likely .NET bug
[Ignore ("NotDotNet")] // likely .NET bug
public void ReadInvalidNumber5 ()
{
ReadToEnd (CreateReader ("10."));
@ -685,7 +685,7 @@ namespace MonoTests.System.Runtime.Serialization.Json
[Test]
[ExpectedException (typeof (XmlException))]
[Category ("NotDotNet")] // likely .NET bug
[Ignore ("NotDotNet")] // likely .NET bug
public void ReadInvalidNumber8 ()
{
ReadToEnd (CreateReader ("-e5"));
@ -693,7 +693,7 @@ namespace MonoTests.System.Runtime.Serialization.Json
[Test]
[ExpectedException (typeof (XmlException))]
[Category ("NotDotNet")] // likely .NET bug
[Ignore ("NotDotNet")] // likely .NET bug
public void ReadInvalidNumber9 ()
{
ReadToEnd (CreateReader ("-e5.5"));
@ -714,7 +714,7 @@ namespace MonoTests.System.Runtime.Serialization.Json
[Test]
[ExpectedException (typeof (XmlException))]
[Category ("NotDotNet")] // likely .NET bug
[Ignore ("NotDotNet")] // likely .NET bug
public void ReadInvalidObjectContent2 ()
{
ReadToEnd (CreateReader ("{\"A\": 123 456}"));
@ -729,7 +729,7 @@ namespace MonoTests.System.Runtime.Serialization.Json
[Test]
[ExpectedException (typeof (XmlException))]
[Category ("NotDotNet")] // likely .NET bug
[Ignore ("NotDotNet")] // likely .NET bug
public void ReadInvalidObjectContent4 ()
{
ReadToEnd (CreateReader ("{\"A\":123, \"B\":456,}"));
@ -744,7 +744,7 @@ namespace MonoTests.System.Runtime.Serialization.Json
[Test]
[ExpectedException (typeof (XmlException))]
[Category ("NotDotNet")] // likely .NET bug
[Ignore ("NotDotNet")] // likely .NET bug
public void ReadInvalidArrayContent2 ()
{
ReadToEnd (CreateReader ("[123 456]"));
@ -759,7 +759,7 @@ namespace MonoTests.System.Runtime.Serialization.Json
[Test]
[ExpectedException (typeof (XmlException))]
[Category ("NotDotNet")] // likely .NET bug
[Ignore ("NotDotNet")] // likely .NET bug
public void ReadInvalidArrayContent4 ()
{
ReadToEnd (CreateReader ("[123,456,]"));
@ -876,7 +876,7 @@ namespace MonoTests.System.Runtime.Serialization.Json
DataContractJsonSerializer jsonSerializer = new
DataContractJsonSerializer(typeof(IEnumerable<string>));
var result = jsonSerializer.ReadObject(stream);
Assert.AreEqual (typeof (List<string>), result.GetType ());
Assert.AreEqual (typeof (string []), result.GetType ());
}
}
}