Skip to content

Commit

Permalink
Add additional classes to nunit.common
Browse files Browse the repository at this point in the history
  • Loading branch information
CharliePoole committed Jan 22, 2025
1 parent ed4f647 commit 9abfb9e
Show file tree
Hide file tree
Showing 29 changed files with 20 additions and 28 deletions.
1 change: 0 additions & 1 deletion src/NUnitConsole/nunit4-console/ConsoleRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Collections.Generic;
using System.IO;
using System.Xml;
using NUnit.Common;
using NUnit.ConsoleRunner.Utilities;
using NUnit.ConsoleRunner.Options;
using NUnit.Engine;
Expand Down
1 change: 0 additions & 1 deletion src/NUnitConsole/nunit4-console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.Linq;
using System.Reflection;
using System.Text;
using NUnit.Common;
using NUnit.Engine;

using NUnit.ConsoleRunner.Options;
Expand Down
2 changes: 0 additions & 2 deletions src/NUnitConsole/nunit4-console/nunit4-console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
</PropertyGroup>

<ItemGroup>
<Compile Include="..\..\NUnitEngine\nunit.engine.core\EnginePackageSettings.cs" Link="EnginePackageSettings.cs" />
<Compile Include="..\..\NUnitEngine\nunit.engine.core\Internal\ExceptionHelper.cs" Link="Utilities\ExceptionHelper.cs" />
<Content Include="..\..\..\nunit.ico" Link="nunit.ico" />
</ItemGroup>

Expand Down
1 change: 0 additions & 1 deletion src/NUnitConsole/nunit4-netcore-console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.Linq;
using System.Reflection;
using System.Text;
using NUnit.Common;
using NUnit.Engine;

using NUnit.ConsoleRunner.Options;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
</PropertyGroup>

<ItemGroup>
<Compile Include="..\..\NUnitEngine\nunit.engine.core\EnginePackageSettings.cs" Link="EnginePackageSettings.cs" />
<Compile Include="..\..\NUnitEngine\nunit.engine.core\Internal\ExceptionHelper.cs" Link="Utilities\ExceptionHelper.cs" />
<Compile Include="..\nunit4-console\ColorConsole.cs" Link="ColorConsole.cs" />
<Compile Include="..\nunit4-console\ColorConsoleWriter.cs" Link="ColorConsoleWriter.cs" />
<Compile Include="..\nunit4-console\ColorStyle.cs" Link="ColorStyle.cs" />
Expand Down
2 changes: 1 addition & 1 deletion src/NUnitEngine/agents/AgentExitCodes.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt

namespace NUnit.Common
namespace NUnit
{
internal static class AgentExitCodes
{
Expand Down
2 changes: 0 additions & 2 deletions src/NUnitEngine/agents/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using NUnit.Common;
using NUnit.Engine;
using NUnit.Engine.Agents;
using NUnit.Engine.Internal;

#if NETFRAMEWORK
using RuntimeInformation = NUnit.Engine.Internal.Backports.RuntimeInformation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<ItemGroup>
<Compile Include="..\AgentExitCodes.cs" Link="AgentExitCodes.cs" />
<Compile Include="..\Program.cs" Link="Program.cs" />
<Compile Include="..\..\nunit.engine.core\Internal\ExceptionHelper.cs" Link="ExceptionHelper.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<ItemGroup>
<Compile Include="..\AgentExitCodes.cs" Link="AgentExitCodes.cs" />
<Compile Include="..\Program.cs" Link="Program.cs" />
<Compile Include="..\..\nunit.engine.core\Internal\ExceptionHelper.cs" Link="ExceptionHelper.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<ItemGroup>
<Compile Include="..\AgentExitCodes.cs" Link="AgentExitCodes.cs" />
<Compile Include="..\Program.cs" Link="Program.cs" />
<Compile Include="..\..\nunit.engine.core\Internal\ExceptionHelper.cs" Link="ExceptionHelper.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<ItemGroup>
<Compile Include="..\AgentExitCodes.cs" Link="AgentExitCodes.cs" />
<Compile Include="..\Program.cs" Link="Program.cs" />
<Compile Include="..\..\nunit.engine.core\Internal\ExceptionHelper.cs" Link="ExceptionHelper.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<ItemGroup>
<Compile Include="..\AgentExitCodes.cs" Link="AgentExitCodes.cs" />
<Compile Include="..\Program.cs" Link="Program.cs" />
<Compile Include="..\..\nunit.engine.core\Internal\ExceptionHelper.cs" Link="ExceptionHelper.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<ItemGroup>
<Compile Include="..\AgentExitCodes.cs" Link="AgentExitCodes.cs" />
<Compile Include="..\Program.cs" Link="Program.cs" />
<Compile Include="..\..\nunit.engine.core\Internal\ExceptionHelper.cs" Link="ExceptionHelper.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
16 changes: 16 additions & 0 deletions src/NUnitEngine/nunit.common/AgentExitCodes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt

namespace NUnit
{
internal static class AgentExitCodes
{
public const int OK = 0;
public const int PARENT_PROCESS_TERMINATED = -1;
public const int FAILED_TO_START_REMOTE_AGENT = -2;
public const int DEBUGGER_SECURITY_VIOLATION = -3;
public const int DEBUGGER_NOT_IMPLEMENTED = -4;
public const int UNABLE_TO_LOCATE_AGENCY = -5;
public const int UNEXPECTED_EXCEPTION = -100;
public const int STACK_OVERFLOW_EXCEPTION = -1073741571;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

#nullable enable

namespace NUnit.Common
namespace NUnit
{
internal static class ExceptionHelper
public static class ExceptionHelper
{
/// <summary>
/// Builds up a message, using the Message field of the specified exception
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace System.Runtime.CompilerServices
sealed class ExtensionAttribute : Attribute { }
}

namespace NUnit.Engine.Internal
namespace NUnit
{
/// <summary>
/// XmlHelper provides static methods for basic XML operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using System.Threading;
using NUnit.Common;
using NUnit.Engine.Agents;
using NUnit.Engine.Internal;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#if NET20 || NET35
using System;
using System.Diagnostics;
using NUnit.Common;

// NOTE: Since the .NET 4.5 engine refers to this assembly, we can't define
// FrameworkName in the System.Runtime.Versioning namespace.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using NUnit.Common;

namespace NUnit.Engine.Internal
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using System.Runtime.Remoting.Channels.Tcp;
using System.Runtime.Serialization.Formatters;
using System.Threading;
using NUnit.Common;

namespace NUnit.Engine.Internal
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Microsoft.Extensions.DependencyModel;
using Microsoft.Extensions.DependencyModel.Resolution;
using Microsoft.Win32;
using NUnit.Common;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
Expand Down
1 change: 0 additions & 1 deletion src/NUnitEngine/nunit.engine.core/Runners/DomainManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using System.Security;
using System.Security.Policy;
using System.Security.Principal;
using NUnit.Common;
using NUnit.Engine.Internal;
using System.Linq;

Expand Down
1 change: 0 additions & 1 deletion src/NUnitEngine/nunit.engine/Runners/ProcessRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using NUnit.Common;
using NUnit.Engine.Internal;
using NUnit.Engine.Services;

Expand Down
1 change: 0 additions & 1 deletion src/NUnitEngine/nunit.engine/Services/TestAgency.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System;
using System.Threading;
using System.Diagnostics;
using NUnit.Common;
using NUnit.Engine.Internal;
using NUnit.Engine.Communication.Transports.Remoting;
using NUnit.Engine.Communication.Transports.Tcp;
Expand Down
1 change: 0 additions & 1 deletion src/NUnitEngine/nunit.engine/nunit.engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

<ItemGroup>
<Compile Include="..\agents\AgentExitCodes.cs" LinkBase="Agents" />
<Compile Include="..\nunit.engine.core\Internal\ExceptionHelper.cs" Link="Internal\ExceptionHelper.cs" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 9abfb9e

Please sign in to comment.