Clean up NETFX_CORE directive usage
This commit is contained in:
@@ -7,11 +7,7 @@ using System.Linq;
|
||||
#endif
|
||||
using System.Text;
|
||||
using Newtonsoft.Json.Linq;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using TestAttribute = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || PORTABLE40 || DNXCORE50)
|
||||
#if !(PORTABLE || PORTABLE40 || DNXCORE50)
|
||||
using NUnit.Framework;
|
||||
using System.Web.UI;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || PORTABLE40 || DNXCORE50)
|
||||
#if !(PORTABLE || PORTABLE40 || DNXCORE50)
|
||||
using NUnit.Framework;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
|
||||
@@ -34,11 +34,7 @@ using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
using Newtonsoft.Json.Linq;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -81,8 +77,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.Pass();
|
||||
}
|
||||
}
|
||||
|
||||
#if !NETFX_CORE
|
||||
|
||||
private void UpdateValueCount(IDictionary<string, int> counts, dynamic d)
|
||||
{
|
||||
string s = d.ToString();
|
||||
@@ -133,7 +128,6 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
|
||||
Console.WriteLine("Time (secs): " + sw.Elapsed.TotalSeconds);
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
public void JObjectPropertyNames()
|
||||
|
||||
@@ -26,11 +26,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -435,7 +431,7 @@ Parameter name: index");
|
||||
}
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void ITypedListGetItemProperties()
|
||||
{
|
||||
|
||||
@@ -26,11 +26,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json.Linq;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
@@ -32,11 +32,7 @@ using System.Numerics;
|
||||
#endif
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using Newtonsoft.Json.Tests.TestObjects;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -46,7 +42,7 @@ using NUnit.Framework;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
#if !(NETFX_CORE || DNXCORE50)
|
||||
#if !(DNXCORE50)
|
||||
using System.Web.UI;
|
||||
#endif
|
||||
#if NET20
|
||||
@@ -1262,7 +1258,7 @@ Parameter name: arrayIndex");
|
||||
}, "Can not add property Test3 to Newtonsoft.Json.Linq.JObject. Property with the same name already exists on object.");
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void IBindingListSortDirection()
|
||||
{
|
||||
@@ -1586,7 +1582,7 @@ Parameter name: arrayIndex");
|
||||
Assert.AreEqual("Name2", value);
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void WriteObjectNullDBNullValue()
|
||||
{
|
||||
@@ -1698,7 +1694,7 @@ Parameter name: arrayIndex");
|
||||
}, "Unexpected end of content while loading JObject. Path 'short.error.code', line 6, position 14.");
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void GetProperties()
|
||||
{
|
||||
|
||||
@@ -33,11 +33,7 @@ using Newtonsoft.Json.Utilities.LinqBridge;
|
||||
using System.Linq;
|
||||
#endif
|
||||
using Newtonsoft.Json.Linq;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -65,7 +61,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual(p, p.Value.Parent);
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void ListChanged()
|
||||
{
|
||||
|
||||
@@ -23,11 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
@@ -24,11 +24,7 @@
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
@@ -26,11 +26,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
@@ -30,11 +30,7 @@ using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
using Newtonsoft.Json.Converters;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -1149,7 +1145,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.IsTrue(a.DeepEquals(a2));
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
[Test]
|
||||
public void Clone()
|
||||
{
|
||||
|
||||
@@ -29,11 +29,7 @@ using System.Collections.Generic;
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
@@ -32,11 +32,7 @@ using Newtonsoft.Json.Tests.TestObjects;
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
@@ -154,7 +150,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual("Pie", v.Value);
|
||||
Assert.AreEqual(JTokenType.String, v.Type);
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
|
||||
v.Value = DBNull.Value;
|
||||
Assert.AreEqual(DBNull.Value, v.Value);
|
||||
Assert.AreEqual(JTokenType.Null, v.Type);
|
||||
@@ -498,7 +494,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE)
|
||||
#if !(PORTABLE)
|
||||
[Test]
|
||||
public void ConvertsToBoolean()
|
||||
{
|
||||
|
||||
@@ -31,11 +31,7 @@ using System.Numerics;
|
||||
#endif
|
||||
using Newtonsoft.Json.Linq.JsonPath;
|
||||
using Newtonsoft.Json.Tests.Bson;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
@@ -26,11 +26,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json.Linq.JsonPath;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
@@ -28,11 +28,7 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json.Linq.JsonPath;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
@@ -27,11 +27,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
@@ -32,11 +32,7 @@ using System.Linq;
|
||||
#endif
|
||||
using System.Text;
|
||||
using Newtonsoft.Json.Linq;
|
||||
#if NETFX_CORE
|
||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
|
||||
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
|
||||
#elif DNXCORE50
|
||||
#if DNXCORE50
|
||||
using Xunit;
|
||||
using Test = Xunit.FactAttribute;
|
||||
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
|
||||
|
||||
Reference in New Issue
Block a user