Bläddra i källkod

Nuked Textformatter.AutoSize.
Removed references to AutoSize throughout.
Updated unit tests.

Tig 1 år sedan
förälder
incheckning
6550cde7b5

+ 4 - 2
Terminal.Gui/Drawing/Thickness.cs

@@ -190,12 +190,14 @@ public record struct Thickness
         if (View.Diagnostics.HasFlag (ViewDiagnosticFlags.Padding))
         {
             // Draw the diagnostics label on the bottom
+            string text = label is null ? string.Empty : $"{label} {this}";
             var tf = new TextFormatter
             {
-                Text = label is null ? string.Empty : $"{label} {this}",
+                Text = text,
                 Alignment = Alignment.Center,
                 VerticalAlignment = Alignment.End,
-                AutoSize = true
+                Width = text.GetColumns (),
+                Height = 1
             };
             tf.Draw (rect, Application.Driver.CurrentAttribute, Application.Driver.CurrentAttribute, rect);
         }

+ 13 - 83
Terminal.Gui/Text/TextFormatter.cs

@@ -9,7 +9,6 @@ namespace Terminal.Gui;
 /// </summary>
 public class TextFormatter
 {
-    private bool _autoSize;
     private Key _hotKey = new ();
     private int _hotKeyPos = -1;
     private List<string> _lines = new ();
@@ -34,39 +33,6 @@ public class TextFormatter
         set => _textAlignment = EnableNeedsFormat (value);
     }
 
-    /// <summary>Gets or sets whether the <see cref="Size"/> should be automatically changed to fit the <see cref="Text"/>.</summary>
-    /// <remarks>
-    ///     <para>
-    ///         Used when <see cref="View"/> is using <see cref="Dim.Auto"/> to resize the view's <see cref="View.Viewport"/>
-    ///         to fit <see cref="Size"/>.
-    ///     </para>
-    ///     <para>
-    ///         AutoSize is ignored if <see cref="Gui.Alignment.Fill"/> is used.
-    ///     </para>
-    /// </remarks>
-    [Obsolete ("AutoSize is deprecated, use Width and Height instead.")]
-    public bool AutoSize
-    {
-        get => _autoSize;
-        set
-        {
-            _autoSize = EnableNeedsFormat (value);
-
-            if (_autoSize)
-            {
-                Size size = CalcRect (0, 0, Text, Direction, TabWidth).Size;
-
-                Width = size.Width - GetHotKeySpecifierLength ();
-                Height = size.Height - GetHotKeySpecifierLength (false);
-            }
-            else
-            {
-                Height = null;
-                Width = null;
-            }
-        }
-    }
-
     /// <summary>
     ///     Gets the cursor position of the <see cref="HotKey"/>. If the <see cref="HotKey"/> is defined, the cursor will
     ///     be positioned over it.
@@ -81,11 +47,6 @@ public class TextFormatter
         set
         {
             _textDirection = EnableNeedsFormat (value);
-
-            if (AutoSize)
-            {
-                Size = GetAutoSize ();
-            }
         }
     }
 
@@ -664,14 +625,11 @@ public class TextFormatter
                              this
                             );
 
-            if (!AutoSize)
-            {
-                colsWidth = GetMaxColsForWidth (_lines, width, TabWidth);
+            colsWidth = GetMaxColsForWidth (_lines, width, TabWidth);
 
-                if (_lines.Count > colsWidth)
-                {
-                    _lines.RemoveRange (colsWidth, _lines.Count - colsWidth);
-                }
+            if (_lines.Count > colsWidth)
+            {
+                _lines.RemoveRange (colsWidth, _lines.Count - colsWidth);
             }
         }
         else
@@ -688,7 +646,7 @@ public class TextFormatter
                              this
                             );
 
-            if (!AutoSize && _lines.Count > height)
+            if (_lines.Count > height)
             {
                 _lines.RemoveRange (height, _lines.Count - height);
             }
@@ -817,26 +775,17 @@ public class TextFormatter
         }
         set
         {
-            if (AutoSize)
+            if (value is null)
             {
-                Size size = EnableNeedsFormat (GetAutoSize ());
-                _width = size.Width;
-                _height = size.Height;
+                _width = null;
+                _height = null;
+                EnableNeedsFormat (true);
             }
             else
             {
-                if (value is null)
-                {
-                    _width = null;
-                    _height = null;
-                    EnableNeedsFormat (true);
-                }
-                else
-                {
-                    Size size = EnableNeedsFormat (value.Value);
-                    _width = size.Width;
-                    _height = size.Height;
-                }
+                Size size = EnableNeedsFormat (value.Value);
+                _width = size.Width;
+                _height = size.Height;
             }
         }
     }
@@ -852,15 +801,7 @@ public class TextFormatter
     public string Text
     {
         get => _text!;
-        set
-        {
-            _text = EnableNeedsFormat (value);
-
-            if (AutoSize)
-            {
-                Size = GetAutoSize ();
-            }
-        }
+        set => _text = EnableNeedsFormat (value);
     }
 
     /// <summary>Gets or sets the vertical text-alignment.</summary>
@@ -912,17 +853,6 @@ public class TextFormatter
         set => _wordWrap = EnableNeedsFormat (value);
     }
 
-    private Size GetAutoSize ()
-    {
-        Size size = CalcRect (0, 0, Text, Direction, TabWidth).Size;
-
-        return size with
-        {
-            Width = size.Width - GetHotKeySpecifierLength (),
-            Height = size.Height - GetHotKeySpecifierLength (false)
-        };
-    }
-
     /// <summary>Sets <see cref="NeedsFormat"/> to <see langword="true"/> and returns the value.</summary>
     /// <typeparam name="T"></typeparam>
     /// <param name="value"></param>

+ 1 - 1
Terminal.Gui/Views/Bar.cs

@@ -165,7 +165,7 @@ public class Bar : View
                 List<Shortcut> shortcuts = Subviews.Where (s => s is Shortcut && s.Visible).Cast<Shortcut> ().ToList ();
                 foreach (Shortcut shortcut in shortcuts)
                 {
-                    // Let AutoSize do its thing to get the minimum width of each CommandView and HelpView
+                    // Let DimAuto do its thing to get the minimum width of each CommandView and HelpView
                     //shortcut.CommandView.SetRelativeLayout (new Size (int.MaxValue, int.MaxValue));
                     minKeyWidth = int.Max (minKeyWidth, shortcut.KeyView.Text.GetColumns ());
                 }

+ 2 - 1
Terminal.Gui/Views/Menu/Menu.cs

@@ -489,7 +489,8 @@ internal sealed class Menu : View
                 {
                     var tf = new TextFormatter
                     {
-                        AutoSize = true,
+                        Width = Frame.Width - 3,
+                        Height = 1,
                         Alignment = Alignment.Center, HotKeySpecifier = MenuBar.HotKeySpecifier, Text = textToDraw
                     };
 

+ 0 - 17
Terminal.Gui/Views/MessageBox.cs

@@ -385,23 +385,6 @@ public static class MessageBox
 
         d.ColorScheme = useErrorColors ? Colors.ColorSchemes ["Error"] : Colors.ColorSchemes ["Dialog"];
 
-        //d.LayoutComplete += (s, e) =>
-        //{
-        //    if (wrapMessage)
-        //    {
-        //        int buttonHeight = buttonList.Count > 0 ? buttonList [0].Frame.Height : 0;
-        //        Debug.Assert (d.TextFormatter.WordWrap);
-        //        d.TextFormatter.Size = new Size (d.GetContentSize ().Width, Application.Screen.Height);
-        //        Size textSize = d.TextFormatter.GetAutoSize ();
-        //        textSize.Height += buttonHeight;
-
-        //        if (textSize != d.TextFormatter.Size)
-        //        {
-        //            d.SetNeedsLayout ();
-        //        }
-        //    }
-        //};
-
         d.HotKeySpecifier = new Rune ('\xFFFF');
         d.Text = message;
         d.TextAlignment = Alignment.Center;

+ 1 - 1
Terminal.Gui/Views/ProgressBar.cs

@@ -175,7 +175,7 @@ public class ProgressBar : View, IDesignable
 
         if (ProgressBarFormat != ProgressBarFormat.Simple && !_isActivity)
         {
-            var tf = new TextFormatter { Alignment = Alignment.Center, Text = Text, AutoSize = true };
+            var tf = new TextFormatter { Alignment = Alignment.Center, Text = Text };
             var attr = new Attribute (ColorScheme.HotNormal.Foreground, ColorScheme.HotNormal.Background);
 
             if (_fraction > .5)

+ 1 - 35
UICatalog/Scenarios/TextAlignmentAndDirection.cs

@@ -522,46 +522,12 @@ public class TextAlignmentAndDirection : Scenario
 
         app.Add (wrapCheckbox);
 
-        // AUTOSIZE CHECKBOX
-
-        var autoSizeCheckbox = new CheckBox
-        {
-            X = Pos.Right (container) + 1,
-            Y = Pos.Y (wrapCheckbox) + 1,
-            Width = Dim.Fill (10),
-            Height = 1,
-            Text = "AutoSize"
-        };
-        autoSizeCheckbox.State = autoSizeCheckbox.TextFormatter.AutoSize ? CheckState.Checked : CheckState.UnChecked;
-
-        autoSizeCheckbox.Toggle += (s, e) =>
-                                    {
-                                        if (e.CurrentValue == CheckState.Checked)
-                                        {
-                                            foreach (Label t in multiLineLabels)
-                                            {
-                                                t.TextFormatter.AutoSize = false;
-                                            }
-                                        }
-                                        else
-                                        {
-                                            foreach (Label t in multiLineLabels)
-                                            {
-                                                t.TextFormatter.AutoSize = true;
-                                            }
-                                        }
-                                    };
-
-        app.Add (autoSizeCheckbox);
-
-        // Direction Options
-
         List<TextDirection> directionsEnum = Enum.GetValues (typeof (TextDirection)).Cast<TextDirection> ().ToList ();
 
         var directionOptions = new RadioGroup
         {
             X = Pos.Right (container) + 1,
-            Y = Pos.Bottom (autoSizeCheckbox) + 1,
+            Y = Pos.Bottom (wrapCheckbox) + 1,
             Width = Dim.Fill (10),
             Height = Dim.Fill (1),
             HotKeySpecifier = (Rune)'\xffff',

+ 2 - 5
UICatalog/Scenarios/ViewExperiments.cs

@@ -151,13 +151,10 @@ public class ViewExperiments : Scenario
 
         view.Add (view5);
 
-        var label = new Label { Text = "AutoSize true; 1;1:", X = 1, Y = 1 };
-        view.Add (label);
-
         var edit = new TextField
         {
-            Text = "Right (label)",
-            X = Pos.Right (label),
+            Text = "Right (view5)",
+            X = Pos.Right (view5),
             Y = 1,
             Width = 15,
             Height = 1

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 314 - 542
UnitTests/Text/TextFormatterTests.cs


+ 0 - 1
UnitTests/View/DrawTests.cs

@@ -293,7 +293,6 @@ public class DrawTests (ITestOutputHelper _output)
         var top = new Toplevel ();
         top.Add (win);
 
-        // Don't use Label. It sets AutoSize = true which is not what we're testing here.
         var view = new View { Text = "ワイドルーン。", Height = Dim.Fill (), Width = Dim.Fill () };
 
         // Don't have unit tests use things that aren't absolutely critical for the test, like Dialog

+ 0 - 14
UnitTests/View/Layout/Dim.AutoTests.cs

@@ -924,20 +924,6 @@ public partial class DimAutoTests (ITestOutputHelper output)
         Assert.NotEqual (lastSize, view.Frame.Size);
     }
 
-    // Ensure TextFormatter.AutoSize is never used for View.Text
-    [Fact]
-    public void TextFormatter_Is_Not_Auto ()
-    {
-        View view = new ();
-        Assert.False (view.TextFormatter.AutoSize);
-        view.Width = Auto ();
-        Assert.False (view.TextFormatter.AutoSize);
-
-        view = new ();
-        Assert.False (view.TextFormatter.AutoSize);
-        view.Height = Auto ();
-        Assert.False (view.TextFormatter.AutoSize);
-    }
 
     [Theory]
     [InlineData ("1234", 4)]

+ 0 - 2
UnitTests/View/Layout/Pos.Tests.cs

@@ -6,8 +6,6 @@ namespace Terminal.Gui.LayoutTests;
 
 public class PosTests ()
 {
-    // Was named AutoSize_Pos_Validation_Do_Not_Throws_If_NewValue_Is_PosAbsolute_And_OldValue_Is_Another_Type_After_Sets_To_LayoutStyle_Absolute ()
-    // but doesn't actually have anything to do with AutoSize.
     [Fact]
     public void
         Pos_Validation_Do_Not_Throws_If_NewValue_Is_PosAbsolute_And_OldValue_Is_Another_Type_After_Sets_To_LayoutStyle_Absolute ()

+ 11 - 69
UnitTests/View/TextTests.cs

@@ -5,8 +5,7 @@ using Xunit.Abstractions;
 namespace Terminal.Gui.ViewTests;
 
 /// <summary>
-///     Tests of the <see cref="View.Text"/> and <see cref="View.TextFormatter"/> properties (independent of
-///     AutoSize).
+///     Tests of the <see cref="View.Text"/> and <see cref="View.TextFormatter"/> properties.
 /// </summary>
 public class TextTests (ITestOutputHelper output)
 {
@@ -398,7 +397,7 @@ Y
 
     [Fact]
     [AutoInitShutdown]
-    public void AutoSize_True_View_IsEmpty_False_Minimum_Width ()
+    public void View_IsEmpty_False_Minimum_Width ()
     {
         var text = "Views";
 
@@ -508,7 +507,7 @@ w ";
 
     [Fact]
     [AutoInitShutdown]
-    public void AutoSize_True_Width_Height_SetMinWidthHeight_Narrow_Wide_Runes ()
+    public void Width_Height_SetMinWidthHeight_Narrow_Wide_Runes ()
     {
         var text = $"0123456789{Environment.NewLine}01234567891";
 
@@ -605,7 +604,7 @@ w ";
 
     [Fact]
     [AutoInitShutdown]
-    public void AutoSize_True_Width_Height_Stay_True_If_TextFormatter_Size_Fit ()
+    public void Width_Height_Stay_True_If_TextFormatter_Size_Fit ()
     {
         var text = "Finish 終";
 
@@ -736,11 +735,9 @@ w ";
         top.Dispose ();
     }
 
-    [Theory]
+    [Fact]
     [AutoInitShutdown]
-    [InlineData (true)]
-    [InlineData (false)]
-    public void View_Draw_Horizontal_Simple_TextAlignments (bool autoSize)
+    public void View_Draw_Horizontal_Simple_TextAlignments ()
     {
         var text = "Hello World";
         var width = 20;
@@ -752,12 +749,6 @@ w ";
             Height = 1
         };
 
-        if (autoSize)
-        {
-            lblLeft.Width = Dim.Auto ();
-            lblLeft.Height = Dim.Auto ();
-        }
-
         var lblCenter = new View
         {
             Text = text,
@@ -767,12 +758,6 @@ w ";
             TextAlignment = Alignment.Center
         };
 
-        if (autoSize)
-        {
-            lblCenter.Width = Dim.Auto ();
-            lblCenter.Height = Dim.Auto ();
-        }
-
         var lblRight = new View
         {
             Text = text,
@@ -782,12 +767,6 @@ w ";
             TextAlignment = Alignment.End
         };
 
-        if (autoSize)
-        {
-            lblRight.Width = Dim.Auto ();
-            lblRight.Height = Dim.Auto ();
-        }
-
         var lblJust = new View
         {
             Text = text,
@@ -797,12 +776,6 @@ w ";
             TextAlignment = Alignment.Fill
         };
 
-        if (autoSize)
-        {
-            lblJust.Width = Dim.Auto ();
-            lblJust.Height = Dim.Auto ();
-        }
-
         var frame = new FrameView { Width = Dim.Fill (), Height = Dim.Fill () };
         frame.Add (lblLeft, lblCenter, lblRight, lblJust);
         var top = new Toplevel ();
@@ -811,41 +784,16 @@ w ";
         ((FakeDriver)Application.Driver).SetBufferSize (width + 2, 6);
 
         // frame.Width is width + border wide (20 + 2) and 6 high
-
-        if (autoSize)
-        {
-            Size expectedSize = new (11, 1);
-            Assert.Equal (expectedSize, lblLeft.TextFormatter.Size);
-            Assert.Equal (expectedSize, lblCenter.TextFormatter.Size);
-            Assert.Equal (expectedSize, lblRight.TextFormatter.Size);
-            Assert.Equal (expectedSize, lblJust.TextFormatter.Size);
-        }
-        else
-        {
-            Size expectedSize = new (width, 1);
-            Assert.Equal (expectedSize, lblLeft.TextFormatter.Size);
-            Assert.Equal (expectedSize, lblCenter.TextFormatter.Size);
-            Assert.Equal (expectedSize, lblRight.TextFormatter.Size);
-            Assert.Equal (expectedSize, lblJust.TextFormatter.Size);
-        }
+        Size expectedSize = new (width, 1);
+        Assert.Equal (expectedSize, lblLeft.TextFormatter.Size);
+        Assert.Equal (expectedSize, lblCenter.TextFormatter.Size);
+        Assert.Equal (expectedSize, lblRight.TextFormatter.Size);
+        Assert.Equal (expectedSize, lblJust.TextFormatter.Size);
 
         Assert.Equal (new (0, 0, width + 2, 6), frame.Frame);
 
         string expected;
 
-        if (autoSize)
-        {
-            expected = @"
-┌────────────────────┐
-│Hello World         │
-│Hello World         │
-│Hello World         │
-│Hello World         │
-└────────────────────┘
-";
-        }
-        else
-        {
             expected = @"
 ┌────────────────────┐
 │Hello World         │
@@ -854,7 +802,6 @@ w ";
 │Hello          World│
 └────────────────────┘
 ";
-        }
 
         Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, output);
         Assert.Equal (new (0, 0, width + 2, 6), pos);
@@ -1300,9 +1247,4 @@ w ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, output);
     }
-
-    // Test behavior of AutoSize property. 
-    // - Default is false
-    // - Setting to true invalidates Height/Width
-    // - Setting to false invalidates Height/Width
 }

+ 0 - 1
UnitTests/View/ViewTests.cs

@@ -1006,7 +1006,6 @@ At 0,0
     {
         var view = new View { Text = "Testing visibility." }; // use View, not Label to avoid AutoSize == true
 
-        // BUGBUG: AutoSize is false and size wasn't provided so it's 0,0
         Assert.Equal (0, view.Frame.Width);
         Assert.Equal (0, view.Height);
         var win = new Window ();

+ 4 - 106
UnitTests/Views/LabelTests.cs

@@ -86,7 +86,7 @@ public class LabelTests (ITestOutputHelper output)
 
     [Fact]
     [AutoInitShutdown]
-    public void AutoSize_Stays_True_AnchorEnd ()
+    public void Text_Set_With_AnchorEnd_Works ()
     {
         var label = new Label { Y = Pos.Center (), Text = "Say Hello 你" };
         label.X = Pos.AnchorEnd (0) - Pos.Func (() => label.TextFormatter.Text.GetColumns ());
@@ -127,7 +127,7 @@ public class LabelTests (ITestOutputHelper output)
 
     [Fact]
     [AutoInitShutdown]
-    public void AutoSize_Stays_True_Center ()
+    public void Set_Text_With_Center ()
     {
         var label = new Label { X = Pos.Center (), Y = Pos.Center (), Text = "Say Hello 你" };
 
@@ -164,35 +164,7 @@ public class LabelTests (ITestOutputHelper output)
         TestHelpers.AssertDriverContentsWithFrameAre (expected, output);
         top.Dispose ();
     }
-
-    [Fact]
-    [AutoInitShutdown]
-    public void AutoSize_Stays_True_With_EmptyText ()
-    {
-        var label = new Label { X = Pos.Center (), Y = Pos.Center () };
-
-        var win = new Window { Width = Dim.Fill (), Height = Dim.Fill () };
-        win.Add (label);
-        var top = new Toplevel ();
-        top.Add (win);
-
-        label.Text = "Say Hello 你";
-
-        Application.Begin (top);
-        ((FakeDriver)Application.Driver).SetBufferSize (30, 5);
-
-        var expected = @"
-┌────────────────────────────┐
-│                            │
-│        Say Hello 你        │
-│                            │
-└────────────────────────────┘
-";
-
-        TestHelpers.AssertDriverContentsWithFrameAre (expected, output);
-        top.Dispose ();
-    }
-
+    
     [Fact]
     public void Constructors_Defaults ()
     {
@@ -206,7 +178,7 @@ public class LabelTests (ITestOutputHelper output)
 
     [Fact]
     [AutoInitShutdown]
-    public void Label_Draw_Fill_Remaining_AutoSize_False ()
+    public void Label_Draw_Fill_Remaining ()
     {
         var tfSize = new Size (80, 1);
 
@@ -222,9 +194,6 @@ public class LabelTests (ITestOutputHelper output)
         top.Add (label);
         Application.Begin (top);
 
-        Assert.False (label.TextFormatter.AutoSize);
-        Assert.False (tf1.AutoSize);
-        Assert.False (tf2.AutoSize);
         Assert.False (label.TextFormatter.FillRemaining);
         Assert.False (tf1.FillRemaining);
         Assert.True (tf2.FillRemaining);
@@ -914,7 +883,6 @@ e
     {
         var win = new Window ();
 
-        // Label is AutoSize == true
         var label = new Label
         {
             Text = "This should be the last line.",
@@ -955,73 +923,6 @@ e
         top.Dispose ();
     }
 
-#if V2_STATUSBAR
-    // TODO: This is a Label test. Move to label tests if there's not already a test for this.
-
-    [Fact]
-    [AutoInitShutdown]
-    public void Bottom_Equal_Inside_Window_With_MenuBar_And_StatusBar_On_Toplevel ()
-    {
-        var win = new Window ();
-
-        // Label is AutoSize == true
-        var label = new Label
-        {
-            Text = "This should be the last line.",
-            ColorScheme = Colors.ColorSchemes ["Menu"],
-
-            //Width = Dim.Fill (),
-            X = 0,
-            Y = Pos.Bottom (win) - 4 // two lines top and bottom borders more two lines above border
-        };
-
-        win.Add (label);
-
-        var menu = new MenuBar { Menus = new MenuBarItem [] { new ("Menu", "", null) } };
-        var status = new StatusBar (new StatusItem [] { new (KeyCode.F1, "~F1~ Help", null) });
-        Toplevel top = new ();
-        top.Add (win, menu, status);
-        RunState rs = Application.Begin (top);
-
-        Assert.Equal (new (0, 0, 80, 25), top.Frame);
-        Assert.Equal (new (0, 0, 80, 1), menu.Frame);
-        Assert.Equal (new (0, 24, 80, 1), status.Frame);
-        Assert.Equal (new (0, 1, 80, 23), win.Frame);
-        Assert.Equal (new (0, 20, 29, 1), label.Frame);
-
-        var expected = @"
- Menu                                                                           
-┌──────────────────────────────────────────────────────────────────────────────┐
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│                                                                              │
-│This should be the last line.                                                 │
-└──────────────────────────────────────────────────────────────────────────────┘
- F1 Help                                                                        
-";
-
-        TestHelpers.AssertDriverContentsWithFrameAre (expected, output);
-        Application.End (rs);
-        top.Dispose ();
-    }
-#endif
     // TODO: This is a Dim test. Move to Dim tests.
 
     [Fact]
@@ -1041,7 +942,6 @@ e
         var field = new TextField { X = 0, Y = Pos.Bottom (view), Width = 20 };
         var count = 20;
 
-        // Label is AutoSize == true
         List<Label> listLabels = new ();
 
         for (var i = 0; i < count; i++)
@@ -1216,7 +1116,6 @@ e
         var field = new TextField { X = 0, Y = Pos.Bottom (view), Width = 20 };
         var count = 0;
 
-        // Label is AutoSize == true
         List<Label> listLabels = new ();
 
         field.KeyDown += (s, k) =>
@@ -1231,7 +1130,6 @@ e
                                  {
                                      field.Text = $"Label {count}";
 
-                                     // Label is AutoSize = true
                                      var label = new Label { Text = field.Text, X = 0, Y = view.Viewport.Height /*, Width = 10*/ };
                                      view.Add (label);
                                      Assert.Equal ($"Label {count}", label.Text);

Vissa filer visades inte eftersom för många filer har ändrats