diff --git a/src/UnitTests/ArrayHelpers.cs b/src/UnitTests/ArrayHelpers.cs index 53e8a427..7292e56a 100644 --- a/src/UnitTests/ArrayHelpers.cs +++ b/src/UnitTests/ArrayHelpers.cs @@ -27,7 +27,7 @@ // OTHER DEALINGS IN THE SOFTWARE. // -#if PORTABLE +#if PORTABLE || NETSTANDARD using System.Collections.Generic; using System.Linq; #endif @@ -49,9 +49,13 @@ namespace MathNet.Numerics.UnitTests /// The one-dimensional, zero-based Array to convert to a target type. /// A Converter that converts each element from one type to another type. /// An array of the target type containing the converted elements from the source array. +#if NETSTANDARD + public static TOutput[] ConvertAll(TInput[] array, Func converter) +#else public static TOutput[] ConvertAll(TInput[] array, Converter converter) +#endif { -#if PORTABLE +#if PORTABLE || NETSTANDARD if (array == null) throw new ArgumentException(); @@ -61,7 +65,7 @@ namespace MathNet.Numerics.UnitTests #endif } -#if PORTABLE +#if PORTABLE || NETSTANDARD /// /// Determines whether the specified array contains elements that match the conditions defined by the specified predicate. /// diff --git a/src/UnitTests/ComplexTests/ComplexTest.TextHandling.cs b/src/UnitTests/ComplexTests/ComplexTest.TextHandling.cs index f73ff03a..e4c4d17b 100644 --- a/src/UnitTests/ComplexTests/ComplexTest.TextHandling.cs +++ b/src/UnitTests/ComplexTests/ComplexTest.TextHandling.cs @@ -155,7 +155,7 @@ namespace MathNet.Numerics.UnitTests.ComplexTests Assert.AreEqual(double.MinValue, z.Imaginary, "E3"); } -#if !PORTABLE +#if !(PORTABLE || NETSTANDARD) /// /// Try parse can handle symbols with a culture. /// diff --git a/src/UnitTests/EuclidTests/GcdRelatedTestBigInteger.cs b/src/UnitTests/EuclidTests/GcdRelatedTestBigInteger.cs index a986eae2..50734061 100644 --- a/src/UnitTests/EuclidTests/GcdRelatedTestBigInteger.cs +++ b/src/UnitTests/EuclidTests/GcdRelatedTestBigInteger.cs @@ -78,7 +78,7 @@ namespace MathNet.Numerics.UnitTests.EuclidTests Assert.AreEqual((BigInteger)1, Euclid.GreatestCommonDivisor((BigInteger)Int32.MaxValue, Int64.MaxValue), "Gcd(Int32Max,Int64Max)"); Assert.AreEqual((BigInteger)(1 << 18), Euclid.GreatestCommonDivisor((BigInteger)(1 << 18), 1 << 20), "Gcd(1>>18,1<<20)"); Assert.AreEqual((BigInteger)(1 << 18), Euclid.GreatestCommonDivisor((BigInteger)(1 << 18), 1 << 20), "Gcd(1>>18,1<<20)"); -#if !PORTABLE +#if !(PORTABLE || NETSTANDARD) Assert.AreEqual((BigInteger)4569031055798, Euclid.GreatestCommonDivisor(BigInteger.Parse("7305316061155559483748611586449542122662"), BigInteger.Parse("57377277362010117405715236427413896")), "Gcd(large)"); #endif } @@ -100,7 +100,7 @@ namespace MathNet.Numerics.UnitTests.EuclidTests Assert.AreEqual((BigInteger)3, Euclid.ExtendedGreatestCommonDivisor(-6, -15, out x, out y), "Egcd(-6,-15)"); Assert.AreEqual((BigInteger)3, (-6*x) + (-15*y), "Egcd(-6,-15) -> a*x+b*y"); -#if !PORTABLE +#if !(PORTABLE || NETSTANDARD) var a = BigInteger.Parse("7305316061155559483748611586449542122662"); var b = BigInteger.Parse("57377277362010117405715236427413896"); Assert.AreEqual((BigInteger)4569031055798, Euclid.ExtendedGreatestCommonDivisor(a, b, out x, out y), "Egcd(large)"); @@ -181,7 +181,7 @@ namespace MathNet.Numerics.UnitTests.EuclidTests Assert.AreEqual((BigInteger)Int64.MaxValue, Euclid.LeastCommonMultiple((BigInteger)Int64.MaxValue, Int64.MaxValue), "Lcm(Int64Max,Int64Max)"); Assert.AreEqual((BigInteger)Int64.MaxValue, Euclid.LeastCommonMultiple((BigInteger)(-Int64.MaxValue), -Int64.MaxValue), "Lcm(-Int64Max,-Int64Max)"); Assert.AreEqual((BigInteger)Int64.MaxValue, Euclid.LeastCommonMultiple((BigInteger)(-Int64.MaxValue), Int64.MaxValue), "Lcm(-Int64Max,Int64Max)"); -#if !PORTABLE +#if !(PORTABLE || NETSTANDARD) Assert.AreEqual(BigInteger.Parse("91739176367857263082719902034485224119528064014300888465614024"), Euclid.LeastCommonMultiple(BigInteger.Parse("7305316061155559483748611586449542122662"), BigInteger.Parse("57377277362010117405715236427413896")), "Lcm(large)"); #endif } diff --git a/src/UnitTests/GenericMath.cs b/src/UnitTests/GenericMath.cs index 757a6ba9..ab0c9ded 100644 --- a/src/UnitTests/GenericMath.cs +++ b/src/UnitTests/GenericMath.cs @@ -51,6 +51,7 @@ // POSSIBILITY OF SUCH DAMAGE. using System; +using System.Reflection; using System.Linq.Expressions; namespace MathNet.Numerics.UnitTests @@ -579,7 +580,12 @@ namespace MathNet.Numerics.UnitTests xor = ExpressionUtil.CreateExpression(Expression.ExclusiveOr); Type typeT = typeof (T); +#if NETSTANDARD + var typeInfoT = typeT.GetTypeInfo(); + if (typeInfoT.IsValueType && typeInfoT.IsGenericType && (typeInfoT.GetGenericTypeDefinition() == typeof (Nullable<>))) +#else if (typeT.IsValueType && typeT.IsGenericType && (typeT.GetGenericTypeDefinition() == typeof (Nullable<>))) +#endif { // get the *inner* zero (not a null Nullable, but default(TValue)) Type nullType = typeT.GetGenericArguments()[0]; @@ -590,7 +596,11 @@ namespace MathNet.Numerics.UnitTests else { zero = default(T); +#if NETSTANDARD + if (typeT.GetTypeInfo().IsValueType) +#else if (typeT.IsValueType) +#endif { nullOp = (INullOp)Activator.CreateInstance( typeof (StructNullOp<>).MakeGenericType(typeT)); diff --git a/src/UnitTests/InterpolationTests/CubicSplineTest.cs b/src/UnitTests/InterpolationTests/CubicSplineTest.cs index 105d31a3..55c3547e 100644 --- a/src/UnitTests/InterpolationTests/CubicSplineTest.cs +++ b/src/UnitTests/InterpolationTests/CubicSplineTest.cs @@ -183,7 +183,7 @@ namespace MathNet.Numerics.UnitTests.InterpolationTests Assert.That(CubicSpline.InterpolateNatural(new[] { 1.0, 2.0 }, new[] { 2.0, 2.0 }).Interpolate(1.0), Is.EqualTo(2.0)); } -#if !NET35 && !PORTABLE +#if !NET35 && !PORTABLE && !NETSTANDARD [Test] public void InterpolateAkimaSorted_MustBeThreadSafe_GitHub219([Values(8, 32, 256, 1024)] int samples) { diff --git a/src/UnitTests/LinearAlgebraTests/Complex/Solvers/Preconditioners/IlutpTest.cs b/src/UnitTests/LinearAlgebraTests/Complex/Solvers/Preconditioners/IlutpTest.cs index d606784f..b69685b0 100644 --- a/src/UnitTests/LinearAlgebraTests/Complex/Solvers/Preconditioners/IlutpTest.cs +++ b/src/UnitTests/LinearAlgebraTests/Complex/Solvers/Preconditioners/IlutpTest.cs @@ -86,6 +86,11 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Complex.Solvers.Precondi static T GetMethod(ILUTPPreconditioner ilutp, string methodName) { var type = ilutp.GetType(); +#if NETSTANDARD + var methodInfo = type.GetMethod( + methodName, + BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); +#else var methodInfo = type.GetMethod( methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static, @@ -93,6 +98,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Complex.Solvers.Precondi CallingConventions.Standard, new Type[0], null); +#endif var obj = methodInfo.Invoke(ilutp, null); return (T) obj; } diff --git a/src/UnitTests/LinearAlgebraTests/Complex/Solvers/Preconditioners/IncompleteLUTest.cs b/src/UnitTests/LinearAlgebraTests/Complex/Solvers/Preconditioners/IncompleteLUTest.cs index 65f42a20..6b233168 100644 --- a/src/UnitTests/LinearAlgebraTests/Complex/Solvers/Preconditioners/IncompleteLUTest.cs +++ b/src/UnitTests/LinearAlgebraTests/Complex/Solvers/Preconditioners/IncompleteLUTest.cs @@ -60,6 +60,11 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Complex.Solvers.Precondi static T GetMethod(ILU0Preconditioner ilu, string methodName) { var type = ilu.GetType(); +#if NETSTANDARD + var methodInfo = type.GetMethod( + methodName, + BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); +#else var methodInfo = type.GetMethod( methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static, @@ -67,6 +72,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Complex.Solvers.Precondi CallingConventions.Standard, new Type[0], null); +#endif var obj = methodInfo.Invoke(ilu, null); return (T) obj; } diff --git a/src/UnitTests/LinearAlgebraTests/Complex/VectorTests.cs b/src/UnitTests/LinearAlgebraTests/Complex/VectorTests.cs index 9d4e96ed..a1184690 100644 --- a/src/UnitTests/LinearAlgebraTests/Complex/VectorTests.cs +++ b/src/UnitTests/LinearAlgebraTests/Complex/VectorTests.cs @@ -68,7 +68,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Complex CollectionAssert.AreEqual(vector, clone); } -#if !PORTABLE +#if !PORTABLE && !NETSTANDARD /// /// Can clone a vector using IClonable interface method. /// diff --git a/src/UnitTests/LinearAlgebraTests/Complex32/Solvers/Preconditioners/IlutpTest.cs b/src/UnitTests/LinearAlgebraTests/Complex32/Solvers/Preconditioners/IlutpTest.cs index 31a4aa92..0d1b1158 100644 --- a/src/UnitTests/LinearAlgebraTests/Complex32/Solvers/Preconditioners/IlutpTest.cs +++ b/src/UnitTests/LinearAlgebraTests/Complex32/Solvers/Preconditioners/IlutpTest.cs @@ -81,6 +81,11 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Complex32.Solvers.Precon static T GetMethod(ILUTPPreconditioner ilutp, string methodName) { var type = ilutp.GetType(); +#if NETSTANDARD + var methodInfo = type.GetMethod( + methodName, + BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); +#else var methodInfo = type.GetMethod( methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static, @@ -88,6 +93,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Complex32.Solvers.Precon CallingConventions.Standard, new Type[0], null); +#endif var obj = methodInfo.Invoke(ilutp, null); return (T) obj; } diff --git a/src/UnitTests/LinearAlgebraTests/Complex32/Solvers/Preconditioners/IncompleteLUTest.cs b/src/UnitTests/LinearAlgebraTests/Complex32/Solvers/Preconditioners/IncompleteLUTest.cs index 5934938f..156781be 100644 --- a/src/UnitTests/LinearAlgebraTests/Complex32/Solvers/Preconditioners/IncompleteLUTest.cs +++ b/src/UnitTests/LinearAlgebraTests/Complex32/Solvers/Preconditioners/IncompleteLUTest.cs @@ -55,6 +55,11 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Complex32.Solvers.Precon static T GetMethod(ILU0Preconditioner ilu, string methodName) { var type = ilu.GetType(); +#if NETSTANDARD + var methodInfo = type.GetMethod( + methodName, + BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); +#else var methodInfo = type.GetMethod( methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static, @@ -62,6 +67,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Complex32.Solvers.Precon CallingConventions.Standard, new Type[0], null); +#endif var obj = methodInfo.Invoke(ilu, null); return (T) obj; } diff --git a/src/UnitTests/LinearAlgebraTests/Complex32/VectorTests.cs b/src/UnitTests/LinearAlgebraTests/Complex32/VectorTests.cs index 6cebadf2..ac2b8d45 100644 --- a/src/UnitTests/LinearAlgebraTests/Complex32/VectorTests.cs +++ b/src/UnitTests/LinearAlgebraTests/Complex32/VectorTests.cs @@ -64,7 +64,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Complex32 CollectionAssert.AreEqual(vector, clone); } -#if !PORTABLE +#if !PORTABLE && !NETSTANDARD /// /// Can clone a vector using IClonable interface method. /// diff --git a/src/UnitTests/LinearAlgebraTests/Double/Solvers/Preconditioners/IlutpTest.cs b/src/UnitTests/LinearAlgebraTests/Double/Solvers/Preconditioners/IlutpTest.cs index a7f22761..a9c0da76 100644 --- a/src/UnitTests/LinearAlgebraTests/Double/Solvers/Preconditioners/IlutpTest.cs +++ b/src/UnitTests/LinearAlgebraTests/Double/Solvers/Preconditioners/IlutpTest.cs @@ -79,6 +79,11 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Double.Solvers.Precondit static T GetMethod(ILUTPPreconditioner ilutp, string methodName) { var type = ilutp.GetType(); +#if NETSTANDARD + var methodInfo = type.GetMethod( + methodName, + BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); +#else var methodInfo = type.GetMethod( methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static, @@ -86,6 +91,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Double.Solvers.Precondit CallingConventions.Standard, new Type[0], null); +#endif var obj = methodInfo.Invoke(ilutp, null); return (T) obj; } diff --git a/src/UnitTests/LinearAlgebraTests/Double/Solvers/Preconditioners/IncompleteLUTest.cs b/src/UnitTests/LinearAlgebraTests/Double/Solvers/Preconditioners/IncompleteLUTest.cs index 71089b21..7d881c4f 100644 --- a/src/UnitTests/LinearAlgebraTests/Double/Solvers/Preconditioners/IncompleteLUTest.cs +++ b/src/UnitTests/LinearAlgebraTests/Double/Solvers/Preconditioners/IncompleteLUTest.cs @@ -53,6 +53,11 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Double.Solvers.Precondit static T GetMethod(ILU0Preconditioner ilu, string methodName) { var type = ilu.GetType(); +#if NETSTANDARD + var methodInfo = type.GetMethod( + methodName, + BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); +#else var methodInfo = type.GetMethod( methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static, @@ -60,6 +65,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Double.Solvers.Precondit CallingConventions.Standard, new Type[0], null); +#endif var obj = methodInfo.Invoke(ilu, null); return (T) obj; } diff --git a/src/UnitTests/LinearAlgebraTests/Double/VectorTests.cs b/src/UnitTests/LinearAlgebraTests/Double/VectorTests.cs index e79c813b..3231051d 100644 --- a/src/UnitTests/LinearAlgebraTests/Double/VectorTests.cs +++ b/src/UnitTests/LinearAlgebraTests/Double/VectorTests.cs @@ -60,7 +60,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Double CollectionAssert.AreEqual(vector, clone); } -#if !PORTABLE +#if !PORTABLE && !NETSTANDARD /// /// Can clone a vector using IClonable interface method. /// diff --git a/src/UnitTests/LinearAlgebraTests/MatrixStructureTheory.cs b/src/UnitTests/LinearAlgebraTests/MatrixStructureTheory.cs index c8fdc112..0f63a3fb 100644 --- a/src/UnitTests/LinearAlgebraTests/MatrixStructureTheory.cs +++ b/src/UnitTests/LinearAlgebraTests/MatrixStructureTheory.cs @@ -142,7 +142,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests Assert.That(clone.ColumnCount, Is.EqualTo(matrix.ColumnCount)); } -#if !PORTABLE +#if !PORTABLE && !NETSTANDARD [Theory] public void CanCloneUsingICloneable(TestMatrix testMatrix) { diff --git a/src/UnitTests/LinearAlgebraTests/Single/Solvers/Preconditioners/IlutpTest.cs b/src/UnitTests/LinearAlgebraTests/Single/Solvers/Preconditioners/IlutpTest.cs index 16a26545..411827dd 100644 --- a/src/UnitTests/LinearAlgebraTests/Single/Solvers/Preconditioners/IlutpTest.cs +++ b/src/UnitTests/LinearAlgebraTests/Single/Solvers/Preconditioners/IlutpTest.cs @@ -79,6 +79,11 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Single.Solvers.Precondit static T GetMethod(ILUTPPreconditioner ilutp, string methodName) { var type = ilutp.GetType(); +#if NETSTANDARD + var methodInfo = type.GetMethod( + methodName, + BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); +#else var methodInfo = type.GetMethod( methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static, @@ -86,6 +91,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Single.Solvers.Precondit CallingConventions.Standard, new Type[0], null); +#endif var obj = methodInfo.Invoke(ilutp, null); return (T) obj; } diff --git a/src/UnitTests/LinearAlgebraTests/Single/Solvers/Preconditioners/IncompleteLUTest.cs b/src/UnitTests/LinearAlgebraTests/Single/Solvers/Preconditioners/IncompleteLUTest.cs index d544f7fd..508376f9 100644 --- a/src/UnitTests/LinearAlgebraTests/Single/Solvers/Preconditioners/IncompleteLUTest.cs +++ b/src/UnitTests/LinearAlgebraTests/Single/Solvers/Preconditioners/IncompleteLUTest.cs @@ -53,6 +53,11 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Single.Solvers.Precondit static T GetMethod(ILU0Preconditioner ilu, string methodName) { var type = ilu.GetType(); +#if NETSTANDARD + var methodInfo = type.GetMethod( + methodName, + BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); +#else var methodInfo = type.GetMethod( methodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static, @@ -60,6 +65,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Single.Solvers.Precondit CallingConventions.Standard, new Type[0], null); +#endif var obj = methodInfo.Invoke(ilu, null); return (T) obj; } diff --git a/src/UnitTests/LinearAlgebraTests/Single/VectorTests.cs b/src/UnitTests/LinearAlgebraTests/Single/VectorTests.cs index d68ec060..090fb614 100644 --- a/src/UnitTests/LinearAlgebraTests/Single/VectorTests.cs +++ b/src/UnitTests/LinearAlgebraTests/Single/VectorTests.cs @@ -61,7 +61,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Single CollectionAssert.AreEqual(vector, clone); } -#if !PORTABLE +#if !PORTABLE && !NETSTANDARD /// /// Can clone a vector using IClonable interface method. /// diff --git a/src/UnitTests/Program.cs b/src/UnitTests/Program.cs new file mode 100644 index 00000000..f8c550cb --- /dev/null +++ b/src/UnitTests/Program.cs @@ -0,0 +1,16 @@ +// Copyright 2017 The Noda Time Authors. All rights reserved. +// Use of this source code is governed by the Apache License 2.0, +// as found in the LICENSE.txt file. +using NUnitLite; +using System.Reflection; + +namespace NodaTime.Test +{ + class Program + { + public static int Main(string[] args) + { + return new AutoRun(typeof(Program).GetTypeInfo().Assembly).Execute(args); + } + } +} diff --git a/src/UnitTests/Providers/LinearAlgebra/Complex/LinearAlgebraProviderTests.cs b/src/UnitTests/Providers/LinearAlgebra/Complex/LinearAlgebraProviderTests.cs index 8691321b..017291bf 100644 --- a/src/UnitTests/Providers/LinearAlgebra/Complex/LinearAlgebraProviderTests.cs +++ b/src/UnitTests/Providers/LinearAlgebra/Complex/LinearAlgebraProviderTests.cs @@ -1093,7 +1093,10 @@ namespace MathNet.Numerics.UnitTests.Providers.LinearAlgebra.Complex [TestCase("Wide10x50000", "Tall50000x10")] [TestCase("Square1000x1000", "Square1000x1000")] - [Explicit, Timeout(1000*10)] + [Explicit] +#if !NETSTANDARD + [Timeout(1000*10)] +#endif public void IsMatrixMultiplicationPerformant(string leftMatrixKey, string rightMatrixKey) { var leftMatrix = _matrices[leftMatrixKey]; diff --git a/src/UnitTests/Providers/LinearAlgebra/Complex32/LinearAlgebraProviderTests.cs b/src/UnitTests/Providers/LinearAlgebra/Complex32/LinearAlgebraProviderTests.cs index 9644100a..1a6949a8 100644 --- a/src/UnitTests/Providers/LinearAlgebra/Complex32/LinearAlgebraProviderTests.cs +++ b/src/UnitTests/Providers/LinearAlgebra/Complex32/LinearAlgebraProviderTests.cs @@ -1128,7 +1128,10 @@ namespace MathNet.Numerics.UnitTests.Providers.LinearAlgebra.Complex32 [TestCase("Wide10x50000", "Tall50000x10")] [TestCase("Square1000x1000", "Square1000x1000")] - [Explicit, Timeout(1000*10)] + [Explicit] +#if !NETSTANDARD + [Timeout(1000*10)] +#endif public void IsMatrixMultiplicationPerformant(string leftMatrixKey, string rightMatrixKey) { var leftMatrix = _matrices[leftMatrixKey]; diff --git a/src/UnitTests/Providers/LinearAlgebra/Double/LinearAlgebraProviderTests.cs b/src/UnitTests/Providers/LinearAlgebra/Double/LinearAlgebraProviderTests.cs index 5705c4b7..983febe6 100644 --- a/src/UnitTests/Providers/LinearAlgebra/Double/LinearAlgebraProviderTests.cs +++ b/src/UnitTests/Providers/LinearAlgebra/Double/LinearAlgebraProviderTests.cs @@ -1118,7 +1118,10 @@ namespace MathNet.Numerics.UnitTests.Providers.LinearAlgebra.Double [TestCase("Wide10x50000", "Tall50000x10")] [TestCase("Square1000x1000", "Square1000x1000")] - [Explicit, Timeout(1000*5)] + [Explicit] +#if !NETSTANDARD + [Timeout(1000*5)] +#endif public void IsMatrixMultiplicationPerformant(string leftMatrixKey, string rightMatrixKey) { var leftMatrix = _matrices[leftMatrixKey]; diff --git a/src/UnitTests/Providers/LinearAlgebra/Single/LinearAlgebraProviderTests.cs b/src/UnitTests/Providers/LinearAlgebra/Single/LinearAlgebraProviderTests.cs index df755c7d..fc00df9d 100644 --- a/src/UnitTests/Providers/LinearAlgebra/Single/LinearAlgebraProviderTests.cs +++ b/src/UnitTests/Providers/LinearAlgebra/Single/LinearAlgebraProviderTests.cs @@ -1126,7 +1126,10 @@ namespace MathNet.Numerics.UnitTests.Providers.LinearAlgebra.Single [TestCase("Wide10x50000", "Tall50000x10")] [TestCase("Square1000x1000", "Square1000x1000")] - [Explicit, Timeout(1000*5)] + [Explicit] +#if !NETSTANDARD + [Timeout(1000*5)] +#endif public void IsMatrixMultiplicationPerformant(string leftMatrixKey, string rightMatrixKey) { var leftMatrix = _matrices[leftMatrixKey]; diff --git a/src/UnitTests/Random/CryptoRandomSourceTests.cs b/src/UnitTests/Random/CryptoRandomSourceTests.cs index ad899c4c..908c6139 100644 --- a/src/UnitTests/Random/CryptoRandomSourceTests.cs +++ b/src/UnitTests/Random/CryptoRandomSourceTests.cs @@ -27,7 +27,7 @@ // OTHER DEALINGS IN THE SOFTWARE. // -#if !PORTABLE +#if !PORTABLE && !NETSTANDARD using MathNet.Numerics.Random; using NUnit.Framework; diff --git a/src/UnitTests/Random/RandomSerializationTests.cs b/src/UnitTests/Random/RandomSerializationTests.cs index d948c4ed..777ba8e8 100644 --- a/src/UnitTests/Random/RandomSerializationTests.cs +++ b/src/UnitTests/Random/RandomSerializationTests.cs @@ -31,7 +31,9 @@ using System; using System.IO; using System.Linq; using System.Runtime.Serialization; +#if !PORTABLE && !NETSTANDARD using System.Runtime.Serialization.Formatters.Binary; +#endif using MathNet.Numerics.Random; using NUnit.Framework; @@ -67,7 +69,7 @@ namespace MathNet.Numerics.UnitTests.Random Assert.That(actual.NextDoubleSequence().Take(10).ToArray(), Is.EqualTo(expected.NextDoubleSequence().Take(10).ToArray()).AsCollection); } -#if !PORTABLE +#if !PORTABLE && !NETSTANDARD [Test] [TestCase(typeof(MersenneTwister))] [TestCase(typeof(Mcg59))] diff --git a/src/UnitTests/UnitTests-2017.csproj b/src/UnitTests/UnitTests-2017.csproj index e23b79c7..1d5fddd7 100644 --- a/src/UnitTests/UnitTests-2017.csproj +++ b/src/UnitTests/UnitTests-2017.csproj @@ -1,13 +1,17 @@  - net45 + Exe + net45;netcoreapp1.1;netcoreapp2.0 false ..\..\out\test\$(Configuration) ..\..\obj\test\$(Configuration) MathNet.Numerics.UnitTests MathNet.Numerics.UnitTests - + + NETSTANDARD + + @@ -15,11 +19,21 @@ + + + + + + + - \ No newline at end of file + + + +