Skip to content

Commit 8a69c1e

Browse files
committed
Upgrade to .NET 10
1 parent 27a035b commit 8a69c1e

9 files changed

Lines changed: 13 additions & 12 deletions

File tree

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def buildStepDocker() {
4343
def split_job_name = env.JOB_NAME.split(/\/{1}/);
4444
def fixed_job_name = split_job_name[1].replace('%2F',' ');
4545

46-
def customImage = docker.image("mcr.microsoft.com/dotnet/sdk:9.0");
46+
def customImage = docker.image("mcr.microsoft.com/dotnet/sdk:10.0");
4747
customImage.pull();
4848

4949
try {

Preagonal.Scripting.GS2Engine.TestApp/Preagonal.Scripting.GS2Engine.TestApp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net9.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>

Preagonal.Scripting.GS2Engine.UnitTests/Preagonal.Scripting.GS2Engine.UnitTests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
54
<ImplicitUsings>enable</ImplicitUsings>
65
<Nullable>enable</Nullable>
76

87
<IsPackable>false</IsPackable>
98

109
<LangVersion>default</LangVersion>
10+
11+
<TargetFrameworks>net9.0;net10.0;net8.0</TargetFrameworks>
1112
</PropertyGroup>
1213

1314
<ItemGroup>

Preagonal.Scripting.GS2Engine.UnitTests/ScriptMachineTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ function onCreated() {
339339
var result = await script.Call("onCreated");
340340

341341
//Assert
342-
Assert.Equal(true, result.GetValue()!);
342+
Assert.Equal(1.0d, result.GetValue()!);
343343
}
344344

345345
[Fact(Skip = "Waiting for fix in GS2Compiler")]
@@ -424,7 +424,7 @@ function onCreated() {
424424
var result = await script.Call("onCreated");
425425

426426
//Assert
427-
Assert.Equal(true, result.GetValue()!);
427+
Assert.Equal(1.0d, result.GetValue()!);
428428
}
429429

430430
[Fact(Skip = "fix later")]

Preagonal.Scripting.GS2Engine.UnitTests/StackEntryExtensionsTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,14 @@ public void When_input_is_bool_Then_return_StackEntry_with_type_bool_and_value_t
204204
{
205205
//Arrange
206206
const bool val = true;
207+
const double expected = 1.0d;
207208

208209
//Act
209210
var test = val.ToStackEntry();
210211

211212
//Assert
212213
Assert.Equal(StackEntryType.Boolean, test.Type);
213-
Assert.Equal(typeof(bool), test.GetValue()?.GetType());
214-
Assert.Equal(val, test.GetValue());
214+
Assert.Equal(typeof(double), test.GetValue()?.GetType());
215+
Assert.Equal(expected, test.GetValue());
215216
}
216217
}

Preagonal.Scripting.GS2Engine.UnitTests/TStringTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public void When_input_is_none_Then_return_TString_with_empty_byte_array_as_buff
2323
TString stringy = new();
2424

2525
//Assert
26-
Assert.Equal(stringy.buffer, []);
26+
Assert.Empty(stringy.buffer);
2727
}
2828

2929
[Fact]

Preagonal.Scripting.GS2Engine/Extensions/StackEntryExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static StackEntry ToStackEntry(this object? stackObject, bool isVariable
2222
double d => d,
2323
float f => (double)f,
2424
decimal o => (double)o,
25-
bool b => b,
25+
bool b => b?1.0d:0.0d,
2626
_ => stackObject,
2727
};
2828
}

Preagonal.Scripting.GS2Engine/GS2/Script/Script.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ public async Task<IStackEntry> Call(string eventName, params object[]? args)
403403
if (args == null) return await Execute(eventName).ConfigureAwait(false);
404404

405405
var callStack = new Stack<IStackEntry>();
406-
foreach (var variable in args.Reverse())
406+
foreach (var variable in args.AsEnumerable().Reverse())
407407
{
408408
switch (variable)
409409
{

Preagonal.Scripting.GS2Engine/Preagonal.Scripting.GS2Engine.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<AssemblyVersion>1.0.0</AssemblyVersion>
1414
<FileVersion>1.0.0</FileVersion>
1515
<NeutralLanguage>en-US</NeutralLanguage>
16-
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
16+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
1717
</PropertyGroup>
1818

1919
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
@@ -31,7 +31,6 @@
3131
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3232
</PackageReference>
3333
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
34-
<PackageReference Include="System.Collections" Version="4.3.0" />
3534
</ItemGroup>
3635

3736
<ItemGroup>

0 commit comments

Comments
 (0)