Skip to content

Commit 3d9bfe7

Browse files
committed
multitarget the tests again
1 parent 665c3be commit 3d9bfe7

File tree

9 files changed

+18
-28
lines changed

9 files changed

+18
-28
lines changed

build.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ echo:
2828
echo:## Starting: TESTS...
2929
echo:
3030

31-
dotnet run --no-build %LatestSupportedNetProp% %FrameworkParam% -c:Release --project test/FastExpressionCompiler.TestsRunner
31+
dotnet run --no-build net9.0 %FrameworkParam% -c:Release --project test/FastExpressionCompiler.TestsRunner
32+
dotnet run --no-build net8.0 %FrameworkParam% -c:Release --project test/FastExpressionCompiler.TestsRunner
33+
dotnet run --no-build net6.0 %FrameworkParam% -c:Release --project test/FastExpressionCompiler.TestsRunner
3234
if %ERRORLEVEL% neq 0 goto :error
3335

3436
dotnet run --no-build -c:Release --project test/FastExpressionCompiler.TestsRunner.Net472

test/FastExpressionCompiler.ILDecoder/FastExpressionCompiler.ILDecoder.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net7.0' ">net472;net7.0</TargetFrameworks>
5-
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net8.0' ">net472;net8.0</TargetFrameworks>
6-
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net9.0' ">net472;net9.0</TargetFrameworks>
4+
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net9.0' ">net472;net9.0;net8.0;net6.0</TargetFrameworks>
75
</PropertyGroup>
86

97
<ItemGroup>

test/FastExpressionCompiler.IssueTests/FastExpressionCompiler.IssueTests.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net7.0' ">net472;net7.0</TargetFrameworks>
4-
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net8.0' ">net472;net8.0</TargetFrameworks>
5-
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net9.0' ">net472;net9.0</TargetFrameworks>
3+
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net9.0' ">net472;net9.0;net8.0;net6.0</TargetFrameworks>
64
</PropertyGroup>
75

86
<ItemGroup>

test/FastExpressionCompiler.IssueTests/Issue357_Invalid_program_exception.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
#if NET8_0_OR_GREATER && !LIGHT_EXPRESSION
2-
// NET Core only because the lambda expression may not apply the implicit conversion to Nullable
31
using System;
42
using System.Linq;
5-
using System.Linq.Expressions;
63

4+
#if LIGHT_EXPRESSION
5+
using static FastExpressionCompiler.LightExpression.Expression;
6+
namespace FastExpressionCompiler.LightExpression.IssueTests
7+
#else
8+
using System.Linq.Expressions;
9+
using static System.Linq.Expressions.Expression;
710
namespace FastExpressionCompiler.IssueTests
11+
#endif
812
{
913
public class Issue357_Invalid_program_exception : ITest
1014
{
@@ -14,12 +18,13 @@ public int Run()
1418
return 1;
1519
}
1620

17-
static Expression<Func<ActionItem, bool>> Predicate(Id<AccountManager>? value) =>
21+
static System.Linq.Expressions.Expression<Func<ActionItem, bool>> Predicate(Id<AccountManager>? value) =>
1822
x => x.AccountManagerId == value;
1923

2024
public void Test1()
2125
{
22-
var e = Predicate(null);
26+
var e = Predicate(null).FromSysExpression();
27+
2328
e.PrintCSharp();
2429
// var @cs = (Func<ActionItem, bool>)((ActionItem x) =>
2530
// x.AccountManagerId == ((Int64?)default(c__DisplayClass1_0)/*Please provide the non-default value for the constant!*/.value));
@@ -81,4 +86,3 @@ public Id(long value)
8186
}
8287
}
8388
}
84-
#endif

test/FastExpressionCompiler.LightExpression.IssueTests/FastExpressionCompiler.LightExpression.IssueTests.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net7.0' ">net472;net7.0</TargetFrameworks>
4-
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net8.0' ">net472;net8.0</TargetFrameworks>
5-
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net9.0' ">net472;net9.0</TargetFrameworks>
3+
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net9.0' ">net472;net9.0;net8.0;net6.0</TargetFrameworks>
64

75
<DefineConstants>LIGHT_EXPRESSION</DefineConstants>
86
</PropertyGroup>

test/FastExpressionCompiler.LightExpression.UnitTests/FastExpressionCompiler.LightExpression.UnitTests.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net7.0' ">net472;net7.0</TargetFrameworks>
4-
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net8.0' ">net472;net8.0</TargetFrameworks>
5-
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net9.0' ">net472;net9.0</TargetFrameworks>
3+
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net9.0' ">net472;net9.0;net8.0;net6.0</TargetFrameworks>
64

75
<DefineConstants>LIGHT_EXPRESSION</DefineConstants>
86
</PropertyGroup>

test/FastExpressionCompiler.TestsRunner/FastExpressionCompiler.TestsRunner.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,4 @@
1515
<ProjectReference Include="..\FastExpressionCompiler.IssueTests\FastExpressionCompiler.IssueTests.csproj" />
1616
<ProjectReference Include="..\FastExpressionCompiler.LightExpression.IssueTests\FastExpressionCompiler.LightExpression.IssueTests.csproj" />
1717
</ItemGroup>
18-
19-
<ItemGroup>
20-
<PackageReference Include="NUnit" Version="3.14.0"/>
21-
</ItemGroup>
2218
</Project>

test/FastExpressionCompiler.TestsRunner/Program.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,7 @@ void Run(Func<int> run, string name = null)
289289
Run(new Issue355_Error_with_converting_to_from_signed_unsigned_integers().Run);
290290
Run(new LightExpression.IssueTests.Issue355_Error_with_converting_to_from_signed_unsigned_integers().Run);
291291

292-
#if NET8_0_OR_GREATER && !LIGHT_EXPRESSION
293292
Run(new Issue357_Invalid_program_exception().Run);
294-
#endif
295293

296294
Run(new LightExpression.IssueTests.Issue363_ActionFunc16Generics().Run);
297295

test/FastExpressionCompiler.UnitTests/FastExpressionCompiler.UnitTests.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net7.0' ">net472;net7.0</TargetFrameworks>
4-
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net8.0' ">net472;net8.0</TargetFrameworks>
5-
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net9.0' ">net472;net9.0</TargetFrameworks>
3+
<TargetFrameworks Condition=" '$(LatestSupportedNet)' == 'net9.0' ">net472;net9.0;net8.0;net6.0</TargetFrameworks>
64
</PropertyGroup>
75

86
<ItemGroup>

0 commit comments

Comments
 (0)