-Cleanup unit test project compiler warnings

This commit is contained in:
James Newton-King
2012-08-04 13:23:41 +12:00
parent d18e7d6490
commit 689f1a763b
7 changed files with 24 additions and 7 deletions
+2 -2
View File
@@ -575,7 +575,7 @@ now brown cow?", '"', true);
{
Assert.AreEqual(value, parsed);
}
catch (Exception ex)
catch (Exception)
{
long valueTicks = GetTicks(value);
long parsedTicks = GetTicks(parsed);
@@ -601,7 +601,7 @@ now brown cow?", '"', true);
{
Assert.AreEqual(value, parsed);
}
catch (Exception ex)
catch (Exception)
{
// JavaScript ticks aren't as precise, recheck after rounding
long valueTicks = GetTicks(value);
@@ -120,7 +120,7 @@ namespace Newtonsoft.Json.Tests.Linq
}
[Test]
public void ToString()
public void JValueToString()
{
JValue v;
@@ -27,7 +27,6 @@ using System;
using System.Collections.Generic;
using System.Globalization;
#if !NETFX_CORE
using System.IO;
using NUnit.Framework;
#else
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
@@ -772,7 +772,6 @@ namespace Newtonsoft.Json.Tests
public void JObjectToString()
{
JObject test = JObject.Parse(JsonText);
IsoDateTimeConverter isoDateTimeConverter = null; // = new IsoDateTimeConverter();
TimeOperation<object>(() =>
{
@@ -789,7 +788,6 @@ namespace Newtonsoft.Json.Tests
public void JObjectToString2()
{
JObject test = JObject.Parse(JsonText);
IsoDateTimeConverter isoDateTimeConverter = null; // = new IsoDateTimeConverter();
MemoryStream ms = new MemoryStream();
TimeOperation<object>(() =>
@@ -7311,7 +7311,7 @@ Parameter name: value",
internal class Bb : Aa
{
public bool no;
public new bool no;
}
#if !(NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE)
@@ -1497,6 +1497,14 @@ namespace Newtonsoft.Json.Tests.Serialization
return Equals(w.Content, Content);
}
public override int GetHashCode()
{
if (Content == null)
return 0;
return Content.GetHashCode();
}
}
public interface IExample
@@ -1542,6 +1550,14 @@ namespace Newtonsoft.Json.Tests.Serialization
return false;
}
}
public override int GetHashCode()
{
if (Name == null)
return 0;
return Name.GetHashCode();
}
}
#endif
@@ -47,6 +47,10 @@ namespace Newtonsoft.Json.Serialization
/// <value>The <see cref="Type"/> of the collection items.</value>
public Type CollectionItemType { get; private set; }
/// <summary>
/// Gets a value indicating whether the collection type is a multidimensional array.
/// </summary>
/// <value><c>true</c> if the collection type is a multidimensional array; otherwise, <c>false</c>.</value>
public bool IsMultidimensionalArray { get; private set; }
private readonly bool _isCollectionItemTypeNullableType;