From 70d70f2a4a6c2515d73def35a9f0e31309e07da4 Mon Sep 17 00:00:00 2001 From: Ben Rog-Wilhelm Date: Fri, 6 Oct 2023 14:24:20 -0500 Subject: [PATCH] Disable tests for less than .NET 7.0. --- extra/recorder_enumerator/test/Container.cs | 2 ++ extra/recorder_enumerator/test/DelegateTest.cs | 2 ++ extra/recorder_enumerator/test/Function.cs | 2 ++ extra/recorder_enumerator/test/Linq.cs | 8 ++------ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/extra/recorder_enumerator/test/Container.cs b/extra/recorder_enumerator/test/Container.cs index 31f724f3..312d20b6 100644 --- a/extra/recorder_enumerator/test/Container.cs +++ b/extra/recorder_enumerator/test/Container.cs @@ -1,3 +1,4 @@ +#if NET7_0_OR_GREATER namespace RecorderEnumeratorTest { using DecTest; @@ -32,3 +33,4 @@ public void List([ValuesExcept(RecorderMode.Validation)] RecorderMode recorderMo } } } +#endif diff --git a/extra/recorder_enumerator/test/DelegateTest.cs b/extra/recorder_enumerator/test/DelegateTest.cs index a62e90b9..7be027fa 100644 --- a/extra/recorder_enumerator/test/DelegateTest.cs +++ b/extra/recorder_enumerator/test/DelegateTest.cs @@ -1,3 +1,4 @@ +#if NET7_0_OR_GREATER namespace RecorderEnumeratorTest { using DecTest; @@ -86,3 +87,4 @@ public void ActionWithClosureSideEffects([ValuesExcept(RecorderMode.Validation)] } } } +#endif diff --git a/extra/recorder_enumerator/test/Function.cs b/extra/recorder_enumerator/test/Function.cs index 1bfd5a7a..3a9ba83b 100644 --- a/extra/recorder_enumerator/test/Function.cs +++ b/extra/recorder_enumerator/test/Function.cs @@ -1,3 +1,4 @@ +#if NET7_0_OR_GREATER namespace RecorderEnumeratorTest { using DecTest; @@ -70,3 +71,4 @@ public void LocalGenericFunction([ValuesExcept(RecorderMode.Validation)] Recorde } } } +#endif diff --git a/extra/recorder_enumerator/test/Linq.cs b/extra/recorder_enumerator/test/Linq.cs index 1fc27001..96c40f3b 100644 --- a/extra/recorder_enumerator/test/Linq.cs +++ b/extra/recorder_enumerator/test/Linq.cs @@ -1,3 +1,4 @@ +#if NET6_0_OR_GREATER namespace RecorderEnumeratorTest { using DecTest; @@ -353,7 +354,6 @@ public void DistinctEnumeratorTest([ValuesExcept(RecorderMode.Validation)] Recor Assert.IsTrue(Util.AreEquivalentEnumerators(source, result)); } - #if NET6_0_OR_GREATER [Test] [Dec.RecorderEnumerator.RecordableClosures] public void DistinctByEnumeratorTest([ValuesExcept(RecorderMode.Validation)] RecorderMode recorderMode) @@ -365,7 +365,6 @@ public void DistinctByEnumeratorTest([ValuesExcept(RecorderMode.Validation)] Rec var result = DoRecorderRoundTrip(source, recorderMode); Assert.IsTrue(Util.AreEquivalentEnumerators(source, result)); } - #endif [Test] [Dec.RecorderEnumerator.RecordableClosures] @@ -410,7 +409,6 @@ public void IntersectEnumeratorTest([ValuesExcept(RecorderMode.Validation)] Reco Assert.IsTrue(Util.AreEquivalentEnumerators(intersectEnumerator, result)); } - #if NET6_0_OR_GREATER [Test] [Dec.RecorderEnumerator.RecordableClosures] public void IntersectByEnumeratorTest([ValuesExcept(RecorderMode.Validation)] RecorderMode recorderMode) @@ -424,7 +422,6 @@ public void IntersectByEnumeratorTest([ValuesExcept(RecorderMode.Validation)] Re var result = DoRecorderRoundTrip(intersectEnumerator, recorderMode); Assert.IsTrue(Util.AreEquivalentEnumerators(intersectEnumerator, result)); } - #endif [Test] [Dec.RecorderEnumerator.RecordableClosures] @@ -440,7 +437,6 @@ public void ExceptEnumeratorTest([ValuesExcept(RecorderMode.Validation)] Recorde Assert.IsTrue(Util.AreEquivalentEnumerators(exceptEnumerator, result)); } -#if NET6_0_OR_GREATER [Test] [Dec.RecorderEnumerator.RecordableClosures] public void ExceptByEnumeratorTest([ValuesExcept(RecorderMode.Validation)] RecorderMode recorderMode) @@ -454,7 +450,6 @@ public void ExceptByEnumeratorTest([ValuesExcept(RecorderMode.Validation)] Recor var result = DoRecorderRoundTrip(exceptEnumerator, recorderMode); Assert.IsTrue(Util.AreEquivalentEnumerators(exceptEnumerator, result)); } -#endif [Test] [Dec.RecorderEnumerator.RecordableClosures] @@ -604,3 +599,4 @@ public void SkipWhileEnumeratorTest([ValuesExcept(RecorderMode.Validation)] Reco } } } +#endif