Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RT to v206.0.0 #1624

Merged
merged 5 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Content.IntegrationTests/Content.IntegrationTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<LangVersion>12</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenDreamClient\OpenDreamClient.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion Content.IntegrationTests/GameTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public sealed class GameTests : ContentIntegrationTest {
public async Task NoRuntimesTest() {
var (client, server) = await StartConnectedServerClientPair();
await RunTicksSync(client, server, 1000);
Assert.IsTrue(server.IsAlive);
Assert.That(server.IsAlive);
var manager = server.ResolveDependency<DreamManager>();
if(manager.LastDMException is not null) {
Assert.Fail($"Runtime occurred on server boot: {manager.LastDMException}");
Expand Down
2 changes: 1 addition & 1 deletion Content.IntegrationTests/SetupCompileDM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void Compile() {
Files = new() { DmEnvironment }
});

Assert.IsTrue(successfulCompile && File.Exists(CompiledProject), "Failed to compile DM test project!");
Assert.That(successfulCompile && File.Exists(CompiledProject), "Failed to compile DM test project!");
}

[OneTimeTearDown]
Expand Down
8 changes: 4 additions & 4 deletions Content.Tests/Content.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.15.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit.ConsoleRunner" />
<PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DMCompiler\DMCompiler.csproj" />
Expand Down
76 changes: 36 additions & 40 deletions Content.Tests/ContentUnitTest.cs
Original file line number Diff line number Diff line change
@@ -1,55 +1,51 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using OpenDreamClient;
using OpenDreamRuntime;
using OpenDreamRuntime.Rendering;
using OpenDreamShared;
using OpenDreamShared.Rendering;
using Robust.Shared.Analyzers;
using Robust.Shared.IoC;
using Robust.UnitTesting;
using EntryPoint = OpenDreamRuntime.EntryPoint;

namespace Content.Tests
{
[Virtual]
public class ContentUnitTest : RobustUnitTest
{
protected override void OverrideIoC()
{
base.OverrideIoC();

SharedOpenDreamIoC.Register();

if (Project == UnitTestProject.Server)
{
ServerContentIoC.Register(unitTests: true);
IoCManager.Register<IDreamMapManager, DummyDreamMapManager>();
}
else if (Project == UnitTestProject.Client)
{
ClientContentIoC.Register();
}
namespace Content.Tests;

[Virtual]
public class ContentUnitTest : RobustUnitTest {
protected override Type[] ExtraComponents { get; } = {
typeof(DMISpriteComponent),
typeof(DreamMobSightComponent)
};

protected override void OverrideIoC() {
base.OverrideIoC();

SharedOpenDreamIoC.Register();

if (Project == UnitTestProject.Server) {
ServerContentIoC.Register(unitTests: true);
IoCManager.Register<IDreamMapManager, DummyDreamMapManager>();
} else if (Project == UnitTestProject.Client) {
ClientContentIoC.Register();
}
}

protected override Assembly[] GetContentAssemblies()
{
var l = new List<Assembly>
{
typeof(OpenDreamShared.EntryPoint).Assembly
};

if (Project == UnitTestProject.Server)
{
l.Add(typeof(EntryPoint).Assembly);
}
else if (Project == UnitTestProject.Client)
{
l.Add(typeof(OpenDreamClient.EntryPoint).Assembly);
}

l.Add(typeof(ContentUnitTest).Assembly);

return l.ToArray();
protected override Assembly[] GetContentAssemblies() {
var l = new List<Assembly> {
typeof(OpenDreamShared.EntryPoint).Assembly
};

if (Project == UnitTestProject.Server) {
l.Add(typeof(EntryPoint).Assembly);
} else if (Project == UnitTestProject.Client) {
l.Add(typeof(OpenDreamClient.EntryPoint).Assembly);
}

l.Add(typeof(ContentUnitTest).Assembly);

return l.ToArray();
}
}

Loading
Loading