diff --git a/Src/Newtonsoft.Json.Tests/Linq/JTokenTests.cs b/Src/Newtonsoft.Json.Tests/Linq/JTokenTests.cs index 96bb225e..85530d78 100644 --- a/Src/Newtonsoft.Json.Tests/Linq/JTokenTests.cs +++ b/Src/Newtonsoft.Json.Tests/Linq/JTokenTests.cs @@ -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)))); diff --git a/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs index 676a0eb9..da0d87f0 100644 --- a/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs +++ b/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs @@ -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 diff --git a/Src/Newtonsoft.Json.Tests/Serialization/ReferenceLoopHandlingTests.cs b/Src/Newtonsoft.Json.Tests/Serialization/ReferenceLoopHandlingTests.cs index 940abc1f..45e9de98 100644 --- a/Src/Newtonsoft.Json.Tests/Serialization/ReferenceLoopHandlingTests.cs +++ b/Src/Newtonsoft.Json.Tests/Serialization/ReferenceLoopHandlingTests.cs @@ -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; } diff --git a/Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj b/Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj index 02cc8313..19c3c334 100644 --- a/Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj +++ b/Src/Newtonsoft.Json/Newtonsoft.Json.WinRT.csproj @@ -244,6 +244,7 @@ + diff --git a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs index b8cabcce..0b296de5 100644 --- a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs +++ b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs @@ -90,7 +90,7 @@ 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 [assembly: CLSCompliant(true)]