From 5e4ab3a94b56b0373e57d4d91cf455374c8dbf11 Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Thu, 25 Jan 2018 21:59:57 +0100 Subject: [PATCH] Tests: disable 3 tests not supported in .Net Core 1.1 --- .../ComplexTests/Complex32Test.TextHandling.cs | 2 ++ .../ComplexTests/ComplexTest.TextHandling.cs | 2 ++ src/UnitTests/Random/RandomSerializationTests.cs | 11 +++++------ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/UnitTests/ComplexTests/Complex32Test.TextHandling.cs b/src/UnitTests/ComplexTests/Complex32Test.TextHandling.cs index c9d261b3..ebf2180d 100644 --- a/src/UnitTests/ComplexTests/Complex32Test.TextHandling.cs +++ b/src/UnitTests/ComplexTests/Complex32Test.TextHandling.cs @@ -247,6 +247,7 @@ namespace MathNet.Numerics.UnitTests.ComplexTests Assert.AreEqual(float.MinValue, z.Imaginary, "E3"); } +#if !NETCOREAPP1_1 /// /// Try parse can handle symbols with a culture. /// @@ -291,6 +292,7 @@ namespace MathNet.Numerics.UnitTests.ComplexTests Assert.AreEqual(float.MaxValue, z.Real, "E2"); Assert.AreEqual(float.MinValue, z.Imaginary, "E3"); } +#endif /// /// Try parse returns false when given bad value with invariant. diff --git a/src/UnitTests/ComplexTests/ComplexTest.TextHandling.cs b/src/UnitTests/ComplexTests/ComplexTest.TextHandling.cs index ba1c9680..fd1f377b 100644 --- a/src/UnitTests/ComplexTests/ComplexTest.TextHandling.cs +++ b/src/UnitTests/ComplexTests/ComplexTest.TextHandling.cs @@ -150,6 +150,7 @@ namespace MathNet.Numerics.UnitTests.ComplexTests Assert.AreEqual(double.MinValue, z.Imaginary, "E3"); } +#if !NETCOREAPP1_1 /// /// Try parse can handle symbols with a culture. /// @@ -196,6 +197,7 @@ namespace MathNet.Numerics.UnitTests.ComplexTests Assert.AreEqual(double.MaxValue, z.Real, "E2"); Assert.AreEqual(double.MinValue, z.Imaginary, "E3"); } +#endif /// /// Try parse returns false when given bad value with invariant. diff --git a/src/UnitTests/Random/RandomSerializationTests.cs b/src/UnitTests/Random/RandomSerializationTests.cs index 5314c89c..aa886aa1 100644 --- a/src/UnitTests/Random/RandomSerializationTests.cs +++ b/src/UnitTests/Random/RandomSerializationTests.cs @@ -27,17 +27,16 @@ // OTHER DEALINGS IN THE SOFTWARE. // +#if !NETCOREAPP1_1 + using System; using System.IO; using System.Linq; using System.Runtime.Serialization; +using System.Runtime.Serialization.Formatters.Binary; using MathNet.Numerics.Random; using NUnit.Framework; -#if !NETCOREAPP1_1 -using System.Runtime.Serialization.Formatters.Binary; -#endif - namespace MathNet.Numerics.UnitTests.Random { [TestFixture] @@ -70,7 +69,6 @@ namespace MathNet.Numerics.UnitTests.Random Assert.That(actual.NextDoubleSequence().Take(10).ToArray(), Is.EqualTo(expected.NextDoubleSequence().Take(10).ToArray()).AsCollection); } -#if !NETCOREAPP1_1 [Test] [TestCase(typeof(MersenneTwister))] [TestCase(typeof(Mcg59))] @@ -97,6 +95,7 @@ namespace MathNet.Numerics.UnitTests.Random Assert.That(actual.GetType(), Is.EqualTo(randomType)); Assert.That(actual.NextDoubleSequence().Take(10).ToArray(), Is.EqualTo(expected.NextDoubleSequence().Take(10).ToArray()).AsCollection); } -#endif } } + +#endif