Fix warnings and code cleanup/fixes (#13570)
This commit is contained in:
@@ -159,13 +159,13 @@ public sealed class SolutionSystemTests
|
||||
Assert.That(containerSystem
|
||||
.TryMixAndOverflow(beaker, solution, oilAdded, threshold, out var overflowingSolution));
|
||||
|
||||
Assert.That((FixedPoint2) solution.Volume, Is.EqualTo(FixedPoint2.New(threshold)));
|
||||
Assert.That(solution.Volume, Is.EqualTo(FixedPoint2.New(threshold)));
|
||||
solution.TryGetReagent("Water", out var waterMix);
|
||||
solution.TryGetReagent("Oil", out var oilMix);
|
||||
Assert.That(waterMix, Is.EqualTo(FixedPoint2.New(threshold / (ratio + 1))));
|
||||
Assert.That(oilMix, Is.EqualTo(FixedPoint2.New(threshold / (ratio + 1) * ratio)));
|
||||
|
||||
Assert.That((FixedPoint2) overflowingSolution.Volume, Is.EqualTo(FixedPoint2.New(80)));
|
||||
Assert.That(overflowingSolution.Volume, Is.EqualTo(FixedPoint2.New(80)));
|
||||
overflowingSolution.TryGetReagent("Water", out var waterOverflow);
|
||||
overflowingSolution.TryGetReagent("Oil", out var oilOverFlow);
|
||||
Assert.That(waterOverflow, Is.EqualTo(waterQuantity - waterMix));
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Content.IntegrationTests.Tests.Commands
|
||||
|
||||
await server.WaitAssertion(() =>
|
||||
{
|
||||
Assert.That(configManager.GetCVar<bool>(CCVars.GameLobbyEnabled), Is.EqualTo(false));
|
||||
Assert.That(configManager.GetCVar(CCVars.GameLobbyEnabled), Is.EqualTo(false));
|
||||
configManager.SetCVar(CCVars.GameLobbyEnabled, lobbyEnabled);
|
||||
|
||||
Assert.That(gameTicker.RunLevel, Is.EqualTo(GameRunLevel.InRound));
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Content.IntegrationTests.Tests.Damageable
|
||||
|
||||
await server.WaitAssertion(() =>
|
||||
{
|
||||
var uid = (EntityUid) sDamageableEntity;
|
||||
var uid = sDamageableEntity;
|
||||
|
||||
// Check that the correct types are supported.
|
||||
Assert.That(sDamageableComponent.Damage.DamageDict.ContainsKey(type1.ID), Is.False);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -28,7 +29,7 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components
|
||||
.ToList()
|
||||
.AsParallel()
|
||||
.Where(filePath => filePath.Extension == "yml" &&
|
||||
!filePath.Filename.StartsWith("."))
|
||||
!filePath.Filename.StartsWith(".", StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
|
||||
var cComponentFactory = client.ResolveDependency<IComponentFactory>();
|
||||
|
||||
@@ -8,13 +8,12 @@ using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Materials and stacks have some odd relationships to entities,
|
||||
/// so we need some test coverage for them.
|
||||
/// </summary>
|
||||
namespace Content.IntegrationTests.Tests.Materials
|
||||
{
|
||||
/// <summary>
|
||||
/// Materials and stacks have some odd relationships to entities,
|
||||
/// so we need some test coverage for them.
|
||||
/// </summary>
|
||||
[TestFixture]
|
||||
[TestOf(typeof(StackSystem))]
|
||||
[TestOf(typeof(MaterialPrototype))]
|
||||
@@ -61,7 +60,7 @@ namespace Content.IntegrationTests.Tests.Materials
|
||||
Assert.That(proto.StackEntity, Is.EqualTo(stackProto.Spawn));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
mapManager.DeleteMap(testMap.MapId);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Content.IntegrationTests.Tests
|
||||
var mapFolder = new ResourcePath("/Maps");
|
||||
var maps = resourceManager
|
||||
.ContentFindFiles(mapFolder)
|
||||
.Where(filePath => filePath.Extension == "yml" && !filePath.Filename.StartsWith("."))
|
||||
.Where(filePath => filePath.Extension == "yml" && !filePath.Filename.StartsWith(".", StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
|
||||
foreach (var map in maps)
|
||||
@@ -100,7 +100,7 @@ namespace Content.IntegrationTests.Tests
|
||||
var rootedPath = map.ToRootedPath();
|
||||
|
||||
// ReSharper disable once RedundantLogicalConditionalExpressionOperand
|
||||
if (SkipTestMaps && rootedPath.ToString().StartsWith(TestMapsPath))
|
||||
if (SkipTestMaps && rootedPath.ToString().StartsWith(TestMapsPath, StringComparison.Ordinal))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -259,7 +259,7 @@ namespace Content.IntegrationTests.Tests
|
||||
.Where(spawnpoint => spawnpoint.SpawnType == SpawnPointType.Job)
|
||||
.Select(spawnpoint => spawnpoint.Job.ID)
|
||||
.Distinct();
|
||||
List<string> missingSpawnPoints = new() { };
|
||||
List<string> missingSpawnPoints = new();
|
||||
foreach (var spawnpoint in jobList.Except(spawnPoints))
|
||||
{
|
||||
if (protoManager.Index<JobPrototype>(spawnpoint).SetPreference)
|
||||
@@ -302,7 +302,7 @@ namespace Content.IntegrationTests.Tests
|
||||
var mapFolder = new ResourcePath("/Maps");
|
||||
var maps = resourceManager
|
||||
.ContentFindFiles(mapFolder)
|
||||
.Where(filePath => filePath.Extension == "yml" && !filePath.Filename.StartsWith("."))
|
||||
.Where(filePath => filePath.Extension == "yml" && !filePath.Filename.StartsWith(".", StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
var mapNames = new List<string>();
|
||||
foreach (var map in maps)
|
||||
@@ -310,7 +310,7 @@ namespace Content.IntegrationTests.Tests
|
||||
var rootedPath = map.ToRootedPath();
|
||||
|
||||
// ReSharper disable once RedundantLogicalConditionalExpressionOperand
|
||||
if (SkipTestMaps && rootedPath.ToString().StartsWith(TestMapsPath) ||
|
||||
if (SkipTestMaps && rootedPath.ToString().StartsWith(TestMapsPath, StringComparison.Ordinal) ||
|
||||
gameMaps.Contains(map))
|
||||
{
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user