-Fixed build
This commit is contained in:
@@ -290,28 +290,28 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
[Test]
|
||||
public void ToObject()
|
||||
{
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(ushort))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(ushort?))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(uint))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(uint?))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(ulong))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(ulong?))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(sbyte))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(sbyte?))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(byte))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(byte?))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(short))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(short?))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(int))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(int?))));
|
||||
Assert.AreEqual((ushort)1, (new JValue(1).ToObject(typeof(ushort))));
|
||||
Assert.AreEqual((ushort)1, (new JValue(1).ToObject(typeof(ushort?))));
|
||||
Assert.AreEqual((uint)1L, (new JValue(1).ToObject(typeof(uint))));
|
||||
Assert.AreEqual((uint)1L, (new JValue(1).ToObject(typeof(uint?))));
|
||||
Assert.AreEqual((ulong)1L, (new JValue(1).ToObject(typeof(ulong))));
|
||||
Assert.AreEqual((ulong)1L, (new JValue(1).ToObject(typeof(ulong?))));
|
||||
Assert.AreEqual((sbyte)1L, (new JValue(1).ToObject(typeof(sbyte))));
|
||||
Assert.AreEqual((sbyte)1L, (new JValue(1).ToObject(typeof(sbyte?))));
|
||||
Assert.AreEqual((byte)1L, (new JValue(1).ToObject(typeof(byte))));
|
||||
Assert.AreEqual((byte)1L, (new JValue(1).ToObject(typeof(byte?))));
|
||||
Assert.AreEqual((short)1L, (new JValue(1).ToObject(typeof(short))));
|
||||
Assert.AreEqual((short)1L, (new JValue(1).ToObject(typeof(short?))));
|
||||
Assert.AreEqual(1, (new JValue(1).ToObject(typeof(int))));
|
||||
Assert.AreEqual(1, (new JValue(1).ToObject(typeof(int?))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(long))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(long?))));
|
||||
Assert.AreEqual(1L, (new JValue(1.0).ToObject(typeof(float))));
|
||||
Assert.AreEqual(1L, (new JValue(1.0).ToObject(typeof(float?))));
|
||||
Assert.AreEqual(1L, (new JValue(1.0).ToObject(typeof(double))));
|
||||
Assert.AreEqual(1L, (new JValue(1.0).ToObject(typeof(double?))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(decimal))));
|
||||
Assert.AreEqual(1L, (new JValue(1).ToObject(typeof(decimal?))));
|
||||
Assert.AreEqual((float)1, (new JValue(1.0).ToObject(typeof(float))));
|
||||
Assert.AreEqual((float)1, (new JValue(1.0).ToObject(typeof(float?))));
|
||||
Assert.AreEqual((double)1, (new JValue(1.0).ToObject(typeof(double))));
|
||||
Assert.AreEqual((double)1, (new JValue(1.0).ToObject(typeof(double?))));
|
||||
Assert.AreEqual(1m, (new JValue(1).ToObject(typeof(decimal))));
|
||||
Assert.AreEqual(1m, (new JValue(1).ToObject(typeof(decimal?))));
|
||||
Assert.AreEqual(true, (new JValue(true).ToObject(typeof(bool))));
|
||||
Assert.AreEqual(true, (new JValue(true).ToObject(typeof(bool?))));
|
||||
Assert.AreEqual('b', (new JValue('b').ToObject(typeof(char))));
|
||||
|
||||
@@ -76,5 +76,5 @@ using System.Security;
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("4.5.0.0")]
|
||||
#if !PocketPC
|
||||
[assembly: AssemblyFileVersion("4.5.10.15518")]
|
||||
[assembly: AssemblyFileVersion("4.5.10.15519")]
|
||||
#endif
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
}", json);
|
||||
}
|
||||
|
||||
#if !(PORTABLE || SILVERLIGHT)
|
||||
#if !(PORTABLE || SILVERLIGHT || NETFX_CORE)
|
||||
public class MainClass : ISerializable
|
||||
{
|
||||
public ChildClass Child { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user