mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Fix naming and tests compiler warnings
This commit is contained in:
@@ -12,7 +12,7 @@ namespace UICatalog.Scenarios;
|
||||
[ScenarioCategory ("Colors")]
|
||||
public class TextEffectsScenario : Scenario
|
||||
{
|
||||
private TabView tabView;
|
||||
private TabView _tabView;
|
||||
|
||||
public static bool LoopingGradient = false;
|
||||
|
||||
@@ -48,7 +48,7 @@ public class TextEffectsScenario : Scenario
|
||||
};
|
||||
|
||||
// Creates a window that occupies the entire terminal with a title.
|
||||
tabView = new TabView ()
|
||||
_tabView = new TabView ()
|
||||
{
|
||||
Width = Dim.Fill (),
|
||||
Height = Dim.Fill (),
|
||||
@@ -75,14 +75,14 @@ public class TextEffectsScenario : Scenario
|
||||
{
|
||||
LoopingGradient = e.NewValue == CheckState.Checked;
|
||||
SetupGradientLineCanvas (w, w.Frame.Size);
|
||||
tabView.SetNeedsDisplay ();
|
||||
_tabView.SetNeedsDisplay ();
|
||||
};
|
||||
|
||||
gradientsView.Add (cbLooping);
|
||||
|
||||
tabView.AddTab (t1, false);
|
||||
_tabView.AddTab (t1, false);
|
||||
|
||||
w.Add (tabView);
|
||||
w.Add (_tabView);
|
||||
|
||||
Application.Run (w);
|
||||
w.Dispose ();
|
||||
|
||||
@@ -37,12 +37,6 @@ public class GradientFillTests
|
||||
var bottomLeftColor = gradientFill.GetColor (bottomLeft);
|
||||
var bottomRightColor = gradientFill.GetColor (bottomRight);
|
||||
|
||||
// Validate the colors at the corners
|
||||
Assert.NotNull (topLeftColor);
|
||||
Assert.NotNull (topRightColor);
|
||||
Assert.NotNull (bottomLeftColor);
|
||||
Assert.NotNull (bottomRightColor);
|
||||
|
||||
// Expected colors
|
||||
var expectedTopLeftColor = new Terminal.Gui.Color (255, 0, 0); // Red
|
||||
var expectedBottomRightColor = new Terminal.Gui.Color (0, 0, 255); // Blue
|
||||
@@ -73,9 +67,6 @@ public class GradientFillTests
|
||||
var point = new Point (col, row);
|
||||
var color = gradientFill.GetColor (point);
|
||||
|
||||
// Ensure color is not null
|
||||
Assert.NotNull (color);
|
||||
|
||||
// Check if the current color is 'more blue' and 'less red' as it goes right and down
|
||||
Assert.True (color.R <= previousRed, $"Failed at ({col}, {row}): {color.R} > {previousRed}");
|
||||
Assert.True (color.B >= previousBlue, $"Failed at ({col}, {row}): {color.B} < {previousBlue}");
|
||||
@@ -96,9 +87,6 @@ public class GradientFillTests
|
||||
var point = new Point (col, row);
|
||||
var color = gradientFill.GetColor (point);
|
||||
|
||||
// Ensure color is not null
|
||||
Assert.NotNull (color);
|
||||
|
||||
// Check if the current color is 'more blue' and 'less red' as it goes right and down
|
||||
Assert.True (color.R <= previousRed, $"Failed at ({col}, {row}): {color.R} > {previousRed}");
|
||||
Assert.True (color.B >= previousBlue, $"Failed at ({col}, {row}): {color.B} < {previousBlue}");
|
||||
|
||||
Reference in New Issue
Block a user