mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
* Initial commit * added #if DEBUG_IDISPOSABLE * Tweaked yml
This commit is contained in:
22
.github/workflows/dotnet-core.yml
vendored
22
.github/workflows/dotnet-core.yml
vendored
@@ -11,7 +11,7 @@ on:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
build_and_test:
|
||||
build_and_test_debug:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
|
||||
# Build
|
||||
# Build (Debug)
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
@@ -76,6 +76,24 @@ jobs:
|
||||
logs/
|
||||
UnitTests/TestResults/
|
||||
|
||||
|
||||
build_release:
|
||||
# Ensure that RELEASE builds are not broken
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.x
|
||||
dotnet-quality: 'ga'
|
||||
|
||||
- name: Build Release
|
||||
run: dotnet build --configuration Release
|
||||
|
||||
|
||||
# Note: this step is currently not writing to the gist for some reason
|
||||
# - name: Create Test Coverage Badge
|
||||
# uses: simon-k/dotnet-code-coverage-badge@v1.0.0
|
||||
|
||||
@@ -620,8 +620,9 @@ public class ColorPickerTests
|
||||
|
||||
var hex = GetTextField (cp, ColorPickerPart.Hex);
|
||||
|
||||
#if DEBUG_IDISPOSABLE
|
||||
Assert.All (new View [] { b1, b2, b3, tf1, tf2, tf3,hex }, b => Assert.False (b.WasDisposed));
|
||||
|
||||
#endif
|
||||
cp.Style.ColorModel = ColorModel.RGB;
|
||||
cp.ApplyStyleChanges ();
|
||||
|
||||
@@ -636,7 +637,9 @@ public class ColorPickerTests
|
||||
var hexAfter = GetTextField (cp, ColorPickerPart.Hex);
|
||||
|
||||
// Old bars should be disposed
|
||||
#if DEBUG_IDISPOSABLE
|
||||
Assert.All (new View [] { b1, b2, b3, tf1, tf2, tf3,hex }, b => Assert.True (b.WasDisposed));
|
||||
#endif
|
||||
Assert.NotSame (hex,hexAfter);
|
||||
|
||||
Assert.NotSame (b1,b1After);
|
||||
|
||||
@@ -258,7 +258,7 @@ public partial class ToplevelTests (ITestOutputHelper output)
|
||||
top.Remove (top.StatusBar);
|
||||
Assert.Null (top.StatusBar);
|
||||
Assert.NotNull (statusBar);
|
||||
#if true
|
||||
#if DEBUG_IDISPOSABLE
|
||||
Assert.False (menuBar.WasDisposed);
|
||||
Assert.False (statusBar.WasDisposed);
|
||||
menuBar.Dispose ();
|
||||
@@ -407,7 +407,8 @@ public partial class ToplevelTests (ITestOutputHelper output)
|
||||
win.NewMouseEvent (new () { Position = new (6, 0), Flags = MouseFlags.Button1Pressed });
|
||||
|
||||
//Assert.Null (Toplevel._dragPosition);
|
||||
#if true
|
||||
#if DEBUG_IDISPOSABLE
|
||||
|
||||
Assert.False (top.MenuBar.WasDisposed);
|
||||
Assert.False (top.StatusBar.WasDisposed);
|
||||
#endif
|
||||
@@ -418,7 +419,7 @@ public partial class ToplevelTests (ITestOutputHelper output)
|
||||
Assert.Null (top.StatusBar);
|
||||
Assert.NotNull (menuBar);
|
||||
Assert.NotNull (statusBar);
|
||||
#if true
|
||||
#if DEBUG_IDISPOSABLE
|
||||
Assert.True (menuBar.WasDisposed);
|
||||
Assert.True (statusBar.WasDisposed);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user