From fed09bd035f79daa9b869e8cc0231919e5a43323 Mon Sep 17 00:00:00 2001 From: Jorgen Dahl Date: Thu, 30 Nov 2023 09:26:14 -0500 Subject: [PATCH] Fix tests for net8 --- src/build.xml | 2 +- test/Libraries/DynamoPythonTests/CodeCompletionTests.cs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/build.xml b/src/build.xml index 44c8a7e92a0..b2df74100c7 100644 --- a/src/build.xml +++ b/src/build.xml @@ -5,7 +5,7 @@ Dynamo.All.sln Any CPU - net8.0 + net6.0 win-x64 $(MSBuildProjectDirectory)\..\tools\Nuget\NuGet.exe diff --git a/test/Libraries/DynamoPythonTests/CodeCompletionTests.cs b/test/Libraries/DynamoPythonTests/CodeCompletionTests.cs index d544b4b601c..22f68a70a34 100644 --- a/test/Libraries/DynamoPythonTests/CodeCompletionTests.cs +++ b/test/Libraries/DynamoPythonTests/CodeCompletionTests.cs @@ -42,7 +42,11 @@ public void SharedCoreCanReturnCLRCompletionData() Assert.IsTrue(completionList.Any()); Assert.IsTrue(completionList.Intersect(new[] { "Hashtable", "Queue", "Stack" }).Count() == 3); +#if NET8_0_OR_GREATER Assert.IsTrue(completionData.Length == 32); +#else + Assert.IsTrue(completionData.Length == 31); +#endif } } @@ -236,7 +240,11 @@ public void CanImportSystemCollectionsLibraryAndGetCompletionData() Assert.IsTrue(completionList.Any()); Assert.IsTrue(completionList.Intersect(new[] { "Hashtable", "Queue", "Stack" }).Count() == 3); +#if NET8_0_OR_GREATER Assert.IsTrue(completionData.Length == 32); +#else + Assert.IsTrue(completionData.Length == 31); +#endif } [Test]