From 0d925ebaf602549a5d11501cf137cec840d75ac9 Mon Sep 17 00:00:00 2001 From: Tigger Kindel Date: Tue, 3 Oct 2023 10:16:07 -0600 Subject: [PATCH] all tests pass --- UnitTests/View/Layout/PosTests.cs | 25 +++++++------------------ UnitTests/xunit.runner.json | 2 +- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/UnitTests/View/Layout/PosTests.cs b/UnitTests/View/Layout/PosTests.cs index 4e004c36a..054785a9a 100644 --- a/UnitTests/View/Layout/PosTests.cs +++ b/UnitTests/View/Layout/PosTests.cs @@ -378,7 +378,7 @@ namespace Terminal.Gui.ViewTests { /// /// Tests Pos.Left, Pos.X, Pos.Top, Pos.Y, Pos.Right, and Pos.Bottom set operations /// - [Fact] + [Fact, TestRespondersDisposed] public void PosSide_SetsValue () { string side; // used in format string @@ -533,7 +533,7 @@ namespace Terminal.Gui.ViewTests { } // See: https://github.com/gui-cs/Terminal.Gui/issues/504 - [Fact] + [Fact, TestRespondersDisposed] public void LeftTopBottomRight_Win_ShouldNotThrow () { // Setup Fake driver @@ -611,9 +611,6 @@ namespace Terminal.Gui.ViewTests { // If Application.RunState is used then we must use Application.RunLoop with the rs parameter Application.RunLoop (rs); cleanup (rs); -#if DEBUG_IDISPOSABLE - Assert.Empty (Responder.Instances); -#endif } [Fact] @@ -818,7 +815,7 @@ namespace Terminal.Gui.ViewTests { // Application.Shutdown (); //} - [Fact] + [Fact, TestRespondersDisposed] public void PosCombine_Will_Throws () { Application.Init (new FakeDriver ()); @@ -850,12 +847,9 @@ namespace Terminal.Gui.ViewTests { Application.Shutdown (); v2.Dispose (); -#if DEBUG_IDISPOSABLE - Assert.Empty (Responder.Instances); -#endif } - [Fact] + [Fact, TestRespondersDisposed] public void Pos_Add_Operator () { Application.Init (new FakeDriver ()); @@ -899,12 +893,9 @@ namespace Terminal.Gui.ViewTests { // Shutdown must be called to safely clean up Application if Init has been called Application.Shutdown (); -#if DEBUG_IDISPOSABLE - Assert.Empty (Responder.Instances); -#endif } - [Fact] + [Fact, TestRespondersDisposed] public void Pos_Subtract_Operator () { Application.Init (new FakeDriver ()); @@ -960,12 +951,10 @@ namespace Terminal.Gui.ViewTests { // Shutdown must be called to safely clean up Application if Init has been called Application.Shutdown (); -#if DEBUG_IDISPOSABLE - Assert.Empty (Responder.Instances); -#endif + } - [Fact] + [Fact, TestRespondersDisposed] public void Internal_Tests () { var posFactor = new Pos.PosFactor (0.10F); diff --git a/UnitTests/xunit.runner.json b/UnitTests/xunit.runner.json index 90470d005..c096d4186 100644 --- a/UnitTests/xunit.runner.json +++ b/UnitTests/xunit.runner.json @@ -2,5 +2,5 @@ "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", "parallelizeTestCollections": false, "parallelizeAssembly": false, - "stopOnFail": true + "stopOnFail": false } \ No newline at end of file