mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
removed DEBUG by renaming #define
This commit is contained in:
@@ -12,6 +12,13 @@ using Console = Terminal.Gui.FakeConsole;
|
||||
|
||||
namespace Terminal.Gui {
|
||||
public class ApplicationTests {
|
||||
public ApplicationTests ()
|
||||
{
|
||||
#if DEBUG_IDISPOSABLE
|
||||
Responder.Instances.Clear ();
|
||||
#endif
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Init_Shutdown_Cleans_Up ()
|
||||
{
|
||||
|
||||
@@ -10,6 +10,13 @@ using Console = Terminal.Gui.FakeConsole;
|
||||
|
||||
namespace Terminal.Gui {
|
||||
public class ScenarioTests {
|
||||
public ScenarioTests ()
|
||||
{
|
||||
#if DEBUG_IDISPOSABLE
|
||||
Responder.Instances.Clear ();
|
||||
#endif
|
||||
}
|
||||
|
||||
int CreateInput (string input)
|
||||
{
|
||||
// Put a control-q in at the end
|
||||
@@ -75,6 +82,7 @@ namespace Terminal.Gui {
|
||||
foreach (var inst in Responder.Instances) {
|
||||
Assert.True (inst.WasDisposed);
|
||||
}
|
||||
Responder.Instances.Clear ();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -129,6 +137,7 @@ namespace Terminal.Gui {
|
||||
foreach (var inst in Responder.Instances) {
|
||||
Assert.True (inst.WasDisposed);
|
||||
}
|
||||
Responder.Instances.Clear ();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,14 @@
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DefineConstants>TRACE;DEBUG_IDISPOSABLE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
||||
<PackageReference Include="System.Collections" Version="4.3.0" />
|
||||
|
||||
Reference in New Issue
Block a user