From 6550cde7b50128353ed5a6f501c1941c44ff4fbc Mon Sep 17 00:00:00 2001 From: Tig Date: Sat, 20 Jul 2024 11:17:46 -0600 Subject: [PATCH] Nuked Textformatter.AutoSize. Removed references to AutoSize throughout. Updated unit tests. --- Terminal.Gui/Drawing/Thickness.cs | 6 +- Terminal.Gui/Text/TextFormatter.cs | 96 +- Terminal.Gui/Views/Bar.cs | 2 +- Terminal.Gui/Views/Menu/Menu.cs | 3 +- Terminal.Gui/Views/MessageBox.cs | 17 - Terminal.Gui/Views/ProgressBar.cs | 2 +- .../Scenarios/TextAlignmentAndDirection.cs | 36 +- UICatalog/Scenarios/ViewExperiments.cs | 7 +- UnitTests/Text/TextFormatterTests.cs | 2915 +++++++++++------ UnitTests/View/DrawTests.cs | 1 - UnitTests/View/Layout/Dim.AutoTests.cs | 14 - UnitTests/View/Layout/Pos.Tests.cs | 2 - UnitTests/View/TextTests.cs | 80 +- UnitTests/View/ViewTests.cs | 1 - UnitTests/Views/LabelTests.cs | 110 +- 15 files changed, 2042 insertions(+), 1250 deletions(-) diff --git a/Terminal.Gui/Drawing/Thickness.cs b/Terminal.Gui/Drawing/Thickness.cs index 532c0af8a..b787738ab 100644 --- a/Terminal.Gui/Drawing/Thickness.cs +++ b/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); } diff --git a/Terminal.Gui/Text/TextFormatter.cs b/Terminal.Gui/Text/TextFormatter.cs index 5e29ac067..fc5e65d9c 100644 --- a/Terminal.Gui/Text/TextFormatter.cs +++ b/Terminal.Gui/Text/TextFormatter.cs @@ -9,7 +9,6 @@ namespace Terminal.Gui; /// public class TextFormatter { - private bool _autoSize; private Key _hotKey = new (); private int _hotKeyPos = -1; private List _lines = new (); @@ -34,39 +33,6 @@ public class TextFormatter set => _textAlignment = EnableNeedsFormat (value); } - /// Gets or sets whether the should be automatically changed to fit the . - /// - /// - /// Used when is using to resize the view's - /// to fit . - /// - /// - /// AutoSize is ignored if is used. - /// - /// - [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; - } - } - } - /// /// Gets the cursor position of the . If the 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); } /// Gets or sets the vertical text-alignment. @@ -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) - }; - } - /// Sets to and returns the value. /// /// diff --git a/Terminal.Gui/Views/Bar.cs b/Terminal.Gui/Views/Bar.cs index 92262371b..d9c794691 100644 --- a/Terminal.Gui/Views/Bar.cs +++ b/Terminal.Gui/Views/Bar.cs @@ -165,7 +165,7 @@ public class Bar : View List shortcuts = Subviews.Where (s => s is Shortcut && s.Visible).Cast ().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 ()); } diff --git a/Terminal.Gui/Views/Menu/Menu.cs b/Terminal.Gui/Views/Menu/Menu.cs index 34e8dab30..7ae998ee0 100644 --- a/Terminal.Gui/Views/Menu/Menu.cs +++ b/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 }; diff --git a/Terminal.Gui/Views/MessageBox.cs b/Terminal.Gui/Views/MessageBox.cs index 5d583250b..a9d0b542a 100644 --- a/Terminal.Gui/Views/MessageBox.cs +++ b/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; diff --git a/Terminal.Gui/Views/ProgressBar.cs b/Terminal.Gui/Views/ProgressBar.cs index b7afd2459..a205bb830 100644 --- a/Terminal.Gui/Views/ProgressBar.cs +++ b/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) diff --git a/UICatalog/Scenarios/TextAlignmentAndDirection.cs b/UICatalog/Scenarios/TextAlignmentAndDirection.cs index 117d64120..6861aed8d 100644 --- a/UICatalog/Scenarios/TextAlignmentAndDirection.cs +++ b/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 directionsEnum = Enum.GetValues (typeof (TextDirection)).Cast ().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', diff --git a/UICatalog/Scenarios/ViewExperiments.cs b/UICatalog/Scenarios/ViewExperiments.cs index 5d08f0aa6..adb9ab12b 100644 --- a/UICatalog/Scenarios/ViewExperiments.cs +++ b/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 diff --git a/UnitTests/Text/TextFormatterTests.cs b/UnitTests/Text/TextFormatterTests.cs index 31f4d2b64..3ae1e655c 100644 --- a/UnitTests/Text/TextFormatterTests.cs +++ b/UnitTests/Text/TextFormatterTests.cs @@ -1,7 +1,5 @@ using System.Text; -using Microsoft.VisualStudio.TestPlatform.Utilities; using Xunit.Abstractions; -using static Terminal.Gui.SpinnerStyle; // Alias Console to MockConsole so we don't accidentally use Console @@ -41,55 +39,6 @@ public class TextFormatterTests } }; - [Fact] - public void Basic_Usage_With_AutoSize_True () - { - var testText = "test"; - var testBounds = new Rectangle (0, 0, 100, 1); - var tf = new TextFormatter (); - - // Manually set AutoSize to true - tf.AutoSize = true; - - tf.Text = testText; - Size expectedSize = new (testText.Length, 1); - Assert.Equal (testText, tf.Text); - Assert.Equal (Alignment.Start, tf.Alignment); - Assert.Equal (expectedSize, tf.Size); - tf.Draw (testBounds, new Attribute (), new Attribute ()); - Assert.Equal (expectedSize, tf.Size); - Assert.NotEmpty (tf.GetLines ()); - - tf.Alignment = Alignment.End; - expectedSize = new (testText.Length, 1); - Assert.Equal (testText, tf.Text); - Assert.Equal (Alignment.End, tf.Alignment); - Assert.Equal (expectedSize, tf.Size); - tf.Draw (testBounds, new Attribute (), new Attribute ()); - Assert.Equal (expectedSize, tf.Size); - Assert.NotEmpty (tf.GetLines ()); - - tf.Alignment = Alignment.End; - expectedSize = new (testText.Length, 1); - tf.Size = expectedSize; - Assert.Equal (testText, tf.Text); - Assert.Equal (Alignment.End, tf.Alignment); - Assert.Equal (expectedSize, tf.Size); - tf.Draw (testBounds, new Attribute (), new Attribute ()); - Assert.Equal (expectedSize, tf.Size); - Assert.NotEmpty (tf.GetLines ()); - - tf.Alignment = Alignment.Center; - expectedSize = new (testText.Length, 1); - tf.Size = expectedSize; - Assert.Equal (testText, tf.Text); - Assert.Equal (Alignment.Center, tf.Alignment); - Assert.Equal (expectedSize, tf.Size); - tf.Draw (testBounds, new Attribute (), new Attribute ()); - Assert.Equal (expectedSize, tf.Size); - Assert.NotEmpty (tf.GetLines ()); - } - [Theory] [InlineData (null)] [InlineData ("")] @@ -169,7 +118,7 @@ public class TextFormatterTests public void CalcRect_Horizontal_Width_Correct (string text, TextDirection textDirection) { // The width is the number of columns in the text - Assert.Equal (new Size (text.GetColumns (), 1), TextFormatter.CalcRect (0, 0, text, textDirection).Size); + Assert.Equal (new (text.GetColumns (), 1), TextFormatter.CalcRect (0, 0, text, textDirection).Size); } [Theory] @@ -182,7 +131,7 @@ public class TextFormatterTests public void CalcRect_Vertical_Height_Correct (string text, TextDirection textDirection) { // The height is based both the number of lines and the number of wide chars - Assert.Equal (new Size (1 + text.GetColumns () - text.Length, text.Length), TextFormatter.CalcRect (0, 0, text, textDirection).Size); + Assert.Equal (new (1 + text.GetColumns () - text.Length, text.Length), TextFormatter.CalcRect (0, 0, text, textDirection).Size); } [Theory] @@ -438,8 +387,8 @@ ssb tf.Draw ( new (0, 0, width, height), - new Attribute (ColorName.White, ColorName.Black), - new Attribute (ColorName.Blue, ColorName.Black), + new (ColorName.White, ColorName.Black), + new (ColorName.Blue, ColorName.Black), default (Rectangle), driver ); @@ -456,8 +405,8 @@ ssb Attribute [] attrs = { - Attribute.Default, new Attribute (ColorName.Green, ColorName.BrightMagenta), - new Attribute (ColorName.Blue, ColorName.Cyan) + Attribute.Default, new (ColorName.Green, ColorName.BrightMagenta), + new (ColorName.Blue, ColorName.Cyan) }; var tf = new TextFormatter { Size = new (14, 3), Text = "Test\nTest long\nTest long long\n", MultiLine = true }; @@ -786,7 +735,7 @@ ssb for (int i = text.GetRuneCount (); i < maxWidth; i++) { - fmtText = TextFormatter.Format (text, i, Alignment.Fill, false, true) [0]; + fmtText = TextFormatter.Format (text, i, Alignment.Fill, true) [0]; Assert.Equal (i, fmtText.GetRuneCount ()); char c = fmtText [^1]; Assert.True (text.EndsWith (c)); @@ -984,7 +933,6 @@ ssb Assert.Equal (1, TextFormatter.GetMaxColsForWidth (text, 1)); } - [Theory] [InlineData (new [] { "0123456789" }, 1)] [InlineData (new [] { "Hello World" }, 1)] @@ -993,7 +941,6 @@ ssb public void GetColumnsRequiredForVerticalText_List_GetsWidth (IEnumerable text, int expectedWidth) { Assert.Equal (expectedWidth, TextFormatter.GetColumnsRequiredForVerticalText (text.ToList ())); - } [Theory] @@ -1220,7 +1167,6 @@ ssb Text = text, Size = new (maxWidth, maxHeight), WordWrap = false, MultiLine = multiLine }; - Assert.False (tf.AutoSize); Assert.False (tf.WordWrap); Assert.True (tf.MultiLine == multiLine); Assert.Equal (TextDirection.LeftRight_TopBottom, tf.Direction); @@ -1307,7 +1253,6 @@ ssb Direction = TextDirection.TopBottom_LeftRight }; - Assert.False (tf.AutoSize); Assert.False (tf.WordWrap); Assert.True (tf.MultiLine == multiLine); Assert.Equal (TextDirection.TopBottom_LeftRight, tf.Direction); @@ -1329,7 +1274,7 @@ ssb Assert.NotEmpty (tf.GetLines ()); Assert.False (tf.NeedsFormat); // get_Lines causes a Format Assert.Equal (testText, tf.Text); - tf.Draw (testBounds, new Attribute (), new Attribute ()); + tf.Draw (testBounds, new (), new ()); Assert.False (tf.NeedsFormat); tf.Size = new (1, 1); @@ -2059,7 +2004,7 @@ ssb if (char.IsHighSurrogate (text [index])) { // Rune array length isn't equal to string array - Assert.Equal (expected, new string (new [] { text [index], text [index + 1] })); + Assert.Equal (expected, new (new [] { text [index], text [index + 1] })); } else { @@ -2086,19 +2031,19 @@ ssb var text = "This is a \tTab"; var tf = new TextFormatter (); - tf.AutoSize = true; tf.Direction = textDirection; tf.TabWidth = tabWidth; tf.Text = text; + tf.Width = 20; + tf.Height = 20; Assert.True (tf.WordWrap); Assert.False (tf.PreserveTrailingSpaces); - Assert.Equal (new (width, height), tf.Size); tf.Draw ( new (0, 0, width, height), - new Attribute (ColorName.White, ColorName.Black), - new Attribute (ColorName.Blue, ColorName.Black), + new (ColorName.White, ColorName.Black), + new (ColorName.Blue, ColorName.Black), default (Rectangle), driver ); @@ -2125,20 +2070,20 @@ ssb var text = "This is a \tTab"; var tf = new TextFormatter (); - tf.AutoSize = true; tf.Direction = textDirection; tf.TabWidth = tabWidth; tf.PreserveTrailingSpaces = true; tf.Text = text; + tf.Width = 20; + tf.Height = 20; Assert.True (tf.WordWrap); - Assert.Equal (new (width, height), tf.Size); tf.Draw ( new (0, 0, width, height), - new Attribute (ColorName.White, ColorName.Black), - new Attribute (ColorName.Blue, ColorName.Black), + new (ColorName.White, ColorName.Black), + new (ColorName.Blue, ColorName.Black), default (Rectangle), driver ); @@ -2165,20 +2110,20 @@ ssb var text = "This is a \tTab"; var tf = new TextFormatter (); - tf.AutoSize = true; tf.Direction = textDirection; tf.TabWidth = tabWidth; tf.WordWrap = true; tf.Text = text; + tf.Width = 20; + tf.Height = 20; Assert.False (tf.PreserveTrailingSpaces); - Assert.Equal (new (width, height), tf.Size); tf.Draw ( new (0, 0, width, height), - new Attribute (ColorName.White, ColorName.Black), - new Attribute (ColorName.Blue, ColorName.Black), + new (ColorName.White, ColorName.Black), + new (ColorName.Blue, ColorName.Black), default (Rectangle), driver ); @@ -2206,42 +2151,17 @@ ssb } [Theory] + [InlineData ("你", TextDirection.LeftRight_TopBottom, 2, 1)] + [InlineData ("你", TextDirection.TopBottom_LeftRight, 2, 1)] [InlineData ("你你", TextDirection.LeftRight_TopBottom, 4, 1)] - [InlineData ("AB", TextDirection.LeftRight_TopBottom, 2, 1)] [InlineData ("你你", TextDirection.TopBottom_LeftRight, 2, 2)] - [InlineData ("AB", TextDirection.TopBottom_LeftRight, 1, 2)] - public void AutoSize_True_TextDirection_Correct_Size (string text, TextDirection textDirection, int expectedWidth, int expectedHeight) + public void Text_Set_SizeIsCorrect (string text, TextDirection textDirection, int expectedWidth, int expectedHeight) { var tf = new TextFormatter { Direction = textDirection, Text = text }; - Assert.False (tf.AutoSize); + tf.Width = 10; + tf.Height = 10; - // If autosize is false, no auto sizing! - Assert.Null (tf.Size); - - tf.Size = new (1, 1); // This should have no impact (autosize overrides) - tf.AutoSize = true; - - Assert.Equal (new Size (expectedWidth, expectedHeight), tf.Size); - } - [Theory] - [InlineData ("你", TextDirection.LeftRight_TopBottom, false, 0, 0)] - [InlineData ("你", TextDirection.LeftRight_TopBottom, true, 2, 1)] - [InlineData ("你", TextDirection.TopBottom_LeftRight, false, 0, 0)] - [InlineData ("你", TextDirection.TopBottom_LeftRight, true, 2, 1)] - - [InlineData ("你你", TextDirection.LeftRight_TopBottom, false, 0, 0)] - [InlineData ("你你", TextDirection.LeftRight_TopBottom, true, 4, 1)] - [InlineData ("你你", TextDirection.TopBottom_LeftRight, false, 0, 0)] - [InlineData ("你你", TextDirection.TopBottom_LeftRight, true, 2, 2)] - public void Text_Set_SizeIsCorrect (string text, TextDirection textDirection, bool autoSize, int expectedWidth, int expectedHeight) - { - var tf = new TextFormatter { Direction = textDirection, Text = text, AutoSize = autoSize }; - - if (!autoSize) - { - tf.Size = Size.Empty; - } - Assert.Equal (new Size (expectedWidth, expectedHeight), tf.Size); + Assert.Equal (new (expectedWidth, expectedHeight), tf.FormatAndGetSize ()); } [Fact] @@ -3140,181 +3060,166 @@ ssb ); Assert.Equal (resultLines, wrappedLines); } + [SetupFakeDriver] [Theory] - [InlineData ("A", 0, false, "")] - [InlineData ("A", 1, false, "A")] - [InlineData ("A", 2, false, "A")] - [InlineData ("AB", 1, false, "A")] - [InlineData ("AB", 2, false, "AB")] - [InlineData ("ABC", 3, false, "ABC")] - [InlineData ("ABC", 4, false, "ABC")] - [InlineData ("ABC", 6, false, "ABC")] - - [InlineData ("A", 0, true, "")] - [InlineData ("A", 1, true, "A")] - [InlineData ("A", 2, true, "A")] - [InlineData ("AB", 1, true, "A")] - [InlineData ("AB", 2, true, "AB")] - [InlineData ("ABC", 3, true, "ABC")] - [InlineData ("ABC", 4, true, "ABC")] - [InlineData ("ABC", 6, true, "ABC")] - public void Draw_Horizontal_Left (string text, int width, bool autoSize, string expectedText) + [InlineData ("A", 0, "")] + [InlineData ("A", 1, "A")] + [InlineData ("A", 2, "A")] + [InlineData ("AB", 1, "A")] + [InlineData ("AB", 2, "AB")] + [InlineData ("ABC", 3, "ABC")] + [InlineData ("ABC", 4, "ABC")] + [InlineData ("ABC", 6, "ABC")] + [InlineData ("A", 0, "")] + [InlineData ("A", 1, "A")] + [InlineData ("A", 2, "A")] + [InlineData ("AB", 1, "A")] + [InlineData ("AB", 2, "AB")] + [InlineData ("ABC", 3, "ABC")] + [InlineData ("ABC", 4, "ABC")] + [InlineData ("ABC", 6, "ABC")] + public void Draw_Horizontal_Left (string text, int width, string expectedText) { TextFormatter tf = new () { Text = text, - Alignment = Alignment.Start, - AutoSize = autoSize, + Alignment = Alignment.Start }; - if (!autoSize) - { - tf.Size = new Size (width, 1); - } - tf.Draw (new Rectangle (0, 0, width, 1), Attribute.Default, Attribute.Default); + tf.Width = width; + tf.Height = 1; + tf.Draw (new (0, 0, width, 1), Attribute.Default, Attribute.Default); TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output); } [SetupFakeDriver] [Theory] - [InlineData ("A", 0, false, "")] - [InlineData ("A", 1, false, "A")] - [InlineData ("A", 2, false, " A")] - [InlineData ("AB", 1, false, "B")] - [InlineData ("AB", 2, false, "AB")] - [InlineData ("ABC", 3, false, "ABC")] - [InlineData ("ABC", 4, false, " ABC")] - [InlineData ("ABC", 6, false, " ABC")] - - [InlineData ("A", 0, true, "")] - [InlineData ("A", 1, true, "A")] - [InlineData ("A", 2, true, " A")] - [InlineData ("AB", 1, true, "B")] - [InlineData ("AB", 2, true, "AB")] - [InlineData ("ABC", 3, true, "ABC")] - [InlineData ("ABC", 4, true, " ABC")] - [InlineData ("ABC", 6, true, " ABC")] - public void Draw_Horizontal_Right (string text, int width, bool autoSize, string expectedText) + [InlineData ("A", 0, "")] + [InlineData ("A", 1, "A")] + [InlineData ("A", 2, " A")] + [InlineData ("AB", 1, "B")] + [InlineData ("AB", 2, "AB")] + [InlineData ("ABC", 3, "ABC")] + [InlineData ("ABC", 4, " ABC")] + [InlineData ("ABC", 6, " ABC")] + [InlineData ("A", 0, "")] + [InlineData ("A", 1, "A")] + [InlineData ("A", 2, " A")] + [InlineData ("AB", 1, "B")] + [InlineData ("AB", 2, "AB")] + [InlineData ("ABC", 3, "ABC")] + [InlineData ("ABC", 4, " ABC")] + [InlineData ("ABC", 6, " ABC")] + public void Draw_Horizontal_Right (string text, int width, string expectedText) { TextFormatter tf = new () { Text = text, - Alignment = Alignment.End, - AutoSize = autoSize, + Alignment = Alignment.End }; - if (!autoSize) - { - tf.Size = new Size (width, 1); - } + tf.Width = width; + tf.Height = 1; - tf.Draw (new Rectangle (Point.Empty, new (width, 1)), Attribute.Default, Attribute.Default); + tf.Draw (new (Point.Empty, new (width, 1)), Attribute.Default, Attribute.Default); TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output); } [SetupFakeDriver] [Theory] - [InlineData ("A", 0, false, "")] - [InlineData ("A", 1, false, "A")] - [InlineData ("A", 2, false, "A")] - [InlineData ("A", 3, false, " A")] - [InlineData ("AB", 1, false, "A")] - [InlineData ("AB", 2, false, "AB")] - [InlineData ("ABC", 3, false, "ABC")] - [InlineData ("ABC", 4, false, "ABC")] - [InlineData ("ABC", 5, false, " ABC")] - [InlineData ("ABC", 6, false, " ABC")] - [InlineData ("ABC", 9, false, " ABC")] - - [InlineData ("A", 0, true, "")] - [InlineData ("A", 1, true, "A")] - [InlineData ("A", 2, true, "A")] - [InlineData ("A", 3, true, " A")] - [InlineData ("AB", 1, true, "A")] - [InlineData ("AB", 2, true, "AB")] - [InlineData ("ABC", 3, true, "ABC")] - [InlineData ("ABC", 4, true, "ABC")] - [InlineData ("ABC", 5, true, " ABC")] - [InlineData ("ABC", 6, true, " ABC")] - [InlineData ("ABC", 9, true, " ABC")] - public void Draw_Horizontal_Centered (string text, int width, bool autoSize, string expectedText) + [InlineData ("A", 0, "")] + [InlineData ("A", 1, "A")] + [InlineData ("A", 2, "A")] + [InlineData ("A", 3, " A")] + [InlineData ("AB", 1, "A")] + [InlineData ("AB", 2, "AB")] + [InlineData ("ABC", 3, "ABC")] + [InlineData ("ABC", 4, "ABC")] + [InlineData ("ABC", 5, " ABC")] + [InlineData ("ABC", 6, " ABC")] + [InlineData ("ABC", 9, " ABC")] + [InlineData ("A", 0, "")] + [InlineData ("A", 1, "A")] + [InlineData ("A", 2, "A")] + [InlineData ("A", 3, " A")] + [InlineData ("AB", 1, "A")] + [InlineData ("AB", 2, "AB")] + [InlineData ("ABC", 3, "ABC")] + [InlineData ("ABC", 4, "ABC")] + [InlineData ("ABC", 5, " ABC")] + [InlineData ("ABC", 6, " ABC")] + [InlineData ("ABC", 9, " ABC")] + public void Draw_Horizontal_Centered (string text, int width, string expectedText) { TextFormatter tf = new () { Text = text, - Alignment = Alignment.Center, - AutoSize = autoSize, + Alignment = Alignment.Center }; - if (!autoSize) - { - tf.Size = new Size (width, 1); - } - tf.Draw (new Rectangle (0, 0, width, 1), Attribute.Default, Attribute.Default); + tf.Width = width; + tf.Height = 1; + tf.Draw (new (0, 0, width, 1), Attribute.Default, Attribute.Default); TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output); } [SetupFakeDriver] [Theory] - [InlineData ("A", 0, false, "")] - [InlineData ("A", 1, false, "A")] - [InlineData ("A", 2, false, "A")] - [InlineData ("A B", 3, false, "A B")] - [InlineData ("A B", 1, false, "A")] - [InlineData ("A B", 2, false, "A")] - [InlineData ("A B", 4, false, "A B")] - [InlineData ("A B", 5, false, "A B")] - [InlineData ("A B", 6, false, "A B")] - [InlineData ("A B", 10, false, "A B")] - [InlineData ("ABC ABC", 10, false, "ABC ABC")] - - [InlineData ("A", 0, true, "")] - [InlineData ("A", 1, true, "A")] - [InlineData ("A", 2, true, "A")] - [InlineData ("A B", 1, true, "A")] - [InlineData ("A B", 2, true, "A")] - [InlineData ("A B", 3, true, "A B")] - [InlineData ("A B", 4, true, "A B")] - [InlineData ("A B", 5, true, "A B")] - [InlineData ("A B", 6, true, "A B")] - [InlineData ("A B", 10, true, "A B")] - [InlineData ("ABC ABC", 10, true, "ABC ABC")] - public void Draw_Horizontal_Justified (string text, int width, bool autoSize, string expectedText) + [InlineData ("A", 0, "")] + [InlineData ("A", 1, "A")] + [InlineData ("A", 2, "A")] + [InlineData ("A B", 3, "A B")] + [InlineData ("A B", 1, "A")] + [InlineData ("A B", 2, "A")] + [InlineData ("A B", 4, "A B")] + [InlineData ("A B", 5, "A B")] + [InlineData ("A B", 6, "A B")] + [InlineData ("A B", 10, "A B")] + [InlineData ("ABC ABC", 10, "ABC ABC")] + public void Draw_Horizontal_Justified (string text, int width, string expectedText) { TextFormatter tf = new () { Text = text, - Alignment = Alignment.Fill, - AutoSize = autoSize, + Alignment = Alignment.Fill }; - if (!autoSize) - { - tf.Size = new Size (width, 1); - } - tf.Draw (new Rectangle (0, 0, width, 1), Attribute.Default, Attribute.Default); + tf.Width = width; + tf.Height = 1; + tf.Draw (new (0, 0, width, 1), Attribute.Default, Attribute.Default); TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output); } [SetupFakeDriver] [Theory] - [InlineData ("A", 5, 5, false, "A")] - [InlineData ("AB12", 5, 5, false, @" + [InlineData ("A", 5, 5, "A")] + [InlineData ( + "AB12", + 5, + 5, + @" A B 1 2")] - [InlineData ("AB\n12", 5, 5, false, @" + [InlineData ( + "AB\n12", + 5, + 5, + @" A1 B2")] - [InlineData ("", 5, 1, false, "")] - - [InlineData ("Hello Worlds", 1, 12, true, @" + [InlineData ("", 5, 1, "")] + [InlineData ( + "Hello Worlds", + 1, + 12, + @" H e l @@ -3327,8 +3232,11 @@ r l d s")] - - [InlineData ("Hello Worlds", 1, 12, false, @" + [InlineData ( + "Hello Worlds", + 1, + 12, + @" H e l @@ -3341,36 +3249,38 @@ r l d s")] - - [InlineData ("Hello Worlds", 12, 1, false, @"HelloWorlds")] - - public void Draw_Vertical_TopBottom_LeftRight (string text, int width, int height, bool autoSize, string expectedText) + [InlineData ("Hello Worlds", 12, 1, @"HelloWorlds")] + public void Draw_Vertical_TopBottom_LeftRight (string text, int width, int height, string expectedText) { TextFormatter tf = new () { Text = text, - AutoSize = autoSize, - Direction = TextDirection.TopBottom_LeftRight, + Direction = TextDirection.TopBottom_LeftRight }; - if (!autoSize) - { - tf.Size = new Size (width, height); - } - tf.Draw (new Rectangle (0, 0, 20, 20), Attribute.Default, Attribute.Default); + tf.Width = width; + tf.Height = height; + tf.Draw (new (0, 0, 20, 20), Attribute.Default, Attribute.Default); TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output); } - [SetupFakeDriver] [Theory] [InlineData ("Hello World", 15, 1, "Hello World")] - [InlineData ("Well Done\nNice Work", 15, 2, @" + [InlineData ( + "Well Done\nNice Work", + 15, + 2, + @" Well Done Nice Work")] [InlineData ("你好 世界", 15, 1, "你好 世界")] - [InlineData ("做 得好\n幹 得好", 15, 2, @" + [InlineData ( + "做 得好\n幹 得好", + 15, + 2, + @" 做 得好 幹 得好")] public void Justify_Horizontal (string text, int width, int height, string expectedText) @@ -3383,7 +3293,7 @@ Nice Work")] MultiLine = true }; - tf.Draw (new Rectangle (0, 0, width, height), Attribute.Default, Attribute.Default); + tf.Draw (new (0, 0, width, height), Attribute.Default, Attribute.Default); TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output); } @@ -3391,7 +3301,11 @@ Nice Work")] [SetupFakeDriver] [Theory] [InlineData ("Hello World", 1, 15, "H\ne\nl\nl\no\n \n \n \n \n \nW\no\nr\nl\nd")] - [InlineData ("Well Done\nNice Work", 2, 15, @" + [InlineData ( + "Well Done\nNice Work", + 2, + 15, + @" WN ei lc @@ -3408,7 +3322,11 @@ oo nr ek")] [InlineData ("你好 世界", 2, 15, "你\n好\n \n \n \n \n \n \n \n \n \n \n \n世\n界")] - [InlineData ("做 得好\n幹 得好", 4, 15, @" + [InlineData ( + "做 得好\n幹 得好", + 4, + 15, + @" 做幹 @@ -3435,138 +3353,105 @@ ek")] MultiLine = true }; - tf.Draw (new Rectangle (0, 0, width, height), Attribute.Default, Attribute.Default); + tf.Draw (new (0, 0, width, height), Attribute.Default, Attribute.Default); TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output); } [SetupFakeDriver] [Theory] - [InlineData ("A", 0, 1, false, "", 0)] - [InlineData ("A", 1, 1, false, "A", 0)] - [InlineData ("A", 2, 2, false, " A", 1)] - [InlineData ("AB", 1, 1, false, "B", 0)] - [InlineData ("AB", 2, 2, false, " A\n B", 0)] - [InlineData ("ABC", 3, 2, false, " B\n C", 0)] - [InlineData ("ABC", 4, 2, false, " B\n C", 0)] - [InlineData ("ABC", 6, 2, false, " B\n C", 0)] - [InlineData ("こんにちは", 0, 1, false, "", 0)] - [InlineData ("こんにちは", 1, 0, false, "", 0)] - [InlineData ("こんにちは", 1, 1, false, "", 0)] - [InlineData ("こんにちは", 2, 1, false, "は", 0)] - [InlineData ("こんにちは", 2, 2, false, "ち\nは", 0)] - [InlineData ("こんにちは", 2, 3, false, "に\nち\nは", 0)] - [InlineData ("こんにちは", 2, 4, false, "ん\nに\nち\nは", 0)] - [InlineData ("こんにちは", 2, 5, false, "こ\nん\nに\nち\nは", 0)] - [InlineData ("こんにちは", 2, 6, false, "こ\nん\nに\nち\nは", 1)] - [InlineData ("ABCD\nこんにちは", 4, 7, false, " こ\n Aん\n Bに\n Cち\n Dは", 2)] - [InlineData ("こんにちは\nABCD", 3, 7, false, "こ \nんA\nにB\nちC\nはD", 2)] - - [InlineData ("A", 0, 1, true, "", 0)] - [InlineData ("A", 1, 1, true, "A", 0)] - [InlineData ("A", 2, 2, true, " A", 1)] - [InlineData ("AB", 1, 1, true, "B", 0)] - [InlineData ("AB", 2, 2, true, " A\n B", 0)] - [InlineData ("ABC", 3, 2, true, " B\n C", 0)] - [InlineData ("ABC", 4, 2, true, " B\n C", 0)] - [InlineData ("ABC", 6, 2, true, " B\n C", 0)] - [InlineData ("こんにちは", 0, 1, true, "", 0)] - [InlineData ("こんにちは", 1, 0, true, "", 0)] - [InlineData ("こんにちは", 1, 1, true, "", 0)] - [InlineData ("こんにちは", 2, 1, true, "は", 0)] - [InlineData ("こんにちは", 2, 2, true, "ち\nは", 0)] - [InlineData ("こんにちは", 2, 3, true, "に\nち\nは", 0)] - [InlineData ("こんにちは", 2, 4, true, "ん\nに\nち\nは", 0)] - [InlineData ("こんにちは", 2, 5, true, "こ\nん\nに\nち\nは", 0)] - [InlineData ("こんにちは", 2, 6, true, "こ\nん\nに\nち\nは", 1)] - [InlineData ("ABCD\nこんにちは", 4, 7, true, " こ\n Aん\n Bに\n Cち\n Dは", 2)] - [InlineData ("こんにちは\nABCD", 3, 7, true, "こ \nんA\nにB\nちC\nはD", 2)] - public void Draw_Vertical_Bottom_Horizontal_Right (string text, int width, int height, bool autoSize, string expectedText, int expectedY) + [InlineData ("A", 0, 1, "", 0)] + [InlineData ("A", 1, 1, "A", 0)] + [InlineData ("A", 2, 2, " A", 1)] + [InlineData ("AB", 1, 1, "B", 0)] + [InlineData ("AB", 2, 2, " A\n B", 0)] + [InlineData ("ABC", 3, 2, " B\n C", 0)] + [InlineData ("ABC", 4, 2, " B\n C", 0)] + [InlineData ("ABC", 6, 2, " B\n C", 0)] + [InlineData ("こんにちは", 0, 1, "", 0)] + [InlineData ("こんにちは", 1, 0, "", 0)] + [InlineData ("こんにちは", 1, 1, "", 0)] + [InlineData ("こんにちは", 2, 1, "は", 0)] + [InlineData ("こんにちは", 2, 2, "ち\nは", 0)] + [InlineData ("こんにちは", 2, 3, "に\nち\nは", 0)] + [InlineData ("こんにちは", 2, 4, "ん\nに\nち\nは", 0)] + [InlineData ("こんにちは", 2, 5, "こ\nん\nに\nち\nは", 0)] + [InlineData ("こんにちは", 2, 6, "こ\nん\nに\nち\nは", 1)] + [InlineData ("ABCD\nこんにちは", 4, 7, " こ\n Aん\n Bに\n Cち\n Dは", 2)] + [InlineData ("こんにちは\nABCD", 3, 7, "こ \nんA\nにB\nちC\nはD", 2)] + public void Draw_Vertical_Bottom_Horizontal_Right (string text, int width, int height, string expectedText, int expectedY) { TextFormatter tf = new () { Text = text, Alignment = Alignment.End, Direction = TextDirection.TopBottom_LeftRight, - VerticalAlignment = Alignment.End, - AutoSize = autoSize, + VerticalAlignment = Alignment.End }; - if (!autoSize) - { - tf.Size = new Size (width, height); - } + tf.Width = width; + tf.Height = height; - tf.Draw (new Rectangle (Point.Empty, new (width, height)), Attribute.Default, Attribute.Default); + tf.Draw (new (Point.Empty, new (width, height)), Attribute.Default, Attribute.Default); Rectangle rect = TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output); Assert.Equal (expectedY, rect.Y); } [SetupFakeDriver] [Theory] - [InlineData ("A", 5, false, "A")] - [InlineData ("AB12", 5, false, @" + [InlineData ("A", 5, "A")] + [InlineData ( + "AB12", + 5, + @" A B 1 2")] - [InlineData ("AB\n12", 5, false, @" + [InlineData ( + "AB\n12", + 5, + @" A1 B2")] - [InlineData ("", 1, false, "")] - [InlineData ("AB1 2", 2, false, @" + [InlineData ("", 1, "")] + [InlineData ( + "AB1 2", + 2, + @" A12 B ")] - [InlineData ("こんにちは", 1, false, @" + [InlineData ( + "こんにちは", + 1, + @" こん")] - [InlineData ("こんにちは", 2, false, @" + [InlineData ( + "こんにちは", + 2, + @" こに んち")] - [InlineData ("こんにちは", 5, false, @" + [InlineData ( + "こんにちは", + 5, + @" こ ん に ち は")] - - [InlineData ("A", 5, true, "A")] - [InlineData ("AB12", 5, true, @" -A -B -1 -2")] - [InlineData ("AB\n12", 5, true, @" -A1 -B2")] - [InlineData ("", 1, true, "")] - [InlineData ("AB1 2", 2, true, @" -A -B")] - [InlineData ("こんにちは", 1, true, @" -こ")] - [InlineData ("こんにちは", 2, true, @" -こ -ん")] - [InlineData ("こんにちは", 5, true, @" -こ -ん -に -ち -は")] - public void Draw_Vertical_TopBottom_LeftRight_Top (string text, int height, bool autoSize, string expectedText) + public void Draw_Vertical_TopBottom_LeftRight_Top (string text, int height, string expectedText) { TextFormatter tf = new () { Text = text, - AutoSize = autoSize, - Direction = TextDirection.TopBottom_LeftRight, + Direction = TextDirection.TopBottom_LeftRight }; - if (!autoSize) - { - tf.Size = new Size (5, height); - } - tf.Draw (new Rectangle (0, 0, 5, height), Attribute.Default, Attribute.Default); + tf.Width = 5; + tf.Height = height; + tf.Draw (new (0, 0, 5, height), Attribute.Default, Attribute.Default); TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output); } @@ -3575,273 +3460,160 @@ B")] [Theory] // The expectedY param is to probe that the expectedText param start at that Y coordinate - - [InlineData ("A", 0, false, "", 0)] - [InlineData ("A", 1, false, "A", 0)] - [InlineData ("A", 2, false, "A", 0)] - [InlineData ("A", 3, false, "A", 1)] - [InlineData ("AB", 1, false, "A", 0)] - [InlineData ("AB", 2, false, "A\nB", 0)] - [InlineData ("ABC", 2, false, "A\nB", 0)] - [InlineData ("ABC", 3, false, "A\nB\nC", 0)] - [InlineData ("ABC", 4, false, "A\nB\nC", 0)] - [InlineData ("ABC", 5, false, "A\nB\nC", 1)] - [InlineData ("ABC", 6, false, "A\nB\nC", 1)] - [InlineData ("ABC", 9, false, "A\nB\nC", 3)] - [InlineData ("ABCD", 2, false, "B\nC", 0)] - [InlineData ("こんにちは", 0, false, "", 0)] - [InlineData ("こんにちは", 1, false, "に", 0)] - [InlineData ("こんにちは", 2, false, "ん\nに", 0)] - [InlineData ("こんにちは", 3, false, "ん\nに\nち", 0)] - [InlineData ("こんにちは", 4, false, "こ\nん\nに\nち", 0)] - [InlineData ("こんにちは", 5, false, "こ\nん\nに\nち\nは", 0)] - [InlineData ("こんにちは", 6, false, "こ\nん\nに\nち\nは", 0)] - [InlineData ("ABCD\nこんにちは", 7, false, "Aこ\nBん\nCに\nDち\n は", 1)] - [InlineData ("こんにちは\nABCD", 7, false, "こA\nんB\nにC\nちD\nは ", 1)] - - [InlineData ("A", 0, true, "", 0)] - [InlineData ("A", 1, true, "A", 0)] - [InlineData ("A", 2, true, "A", 0)] - [InlineData ("A", 3, true, "A", 1)] - [InlineData ("AB", 1, true, "A", 0)] - [InlineData ("AB", 2, true, "A\nB", 0)] - [InlineData ("ABC", 2, true, "A\nB", 0)] - [InlineData ("ABC", 3, true, "A\nB\nC", 0)] - [InlineData ("ABC", 4, true, "A\nB\nC", 0)] - [InlineData ("ABC", 5, true, "A\nB\nC", 1)] - [InlineData ("ABC", 6, true, "A\nB\nC", 1)] - [InlineData ("ABC", 9, true, "A\nB\nC", 3)] - [InlineData ("ABCD", 2, true, "B\nC", 0)] - [InlineData ("こんにちは", 0, true, "", 0)] - [InlineData ("こんにちは", 1, true, "に", 0)] - [InlineData ("こんにちは", 2, true, "ん\nに", 0)] - [InlineData ("こんにちは", 3, true, "ん\nに\nち", 0)] - [InlineData ("こんにちは", 4, true, "こ\nん\nに\nち", 0)] - [InlineData ("こんにちは", 5, true, "こ\nん\nに\nち\nは", 0)] - [InlineData ("こんにちは", 6, true, "こ\nん\nに\nち\nは", 0)] - [InlineData ("こんにちは", 7, true, "こ\nん\nに\nち\nは", 1)] - [InlineData ("ABCD\nこんにちは", 7, true, "Aこ\nBん\nCに\nDち\n は", 1)] - [InlineData ("こんにちは\nABCD", 7, true, "こA\nんB\nにC\nちD\nは ", 1)] - public void Draw_Vertical_TopBottom_LeftRight_Middle (string text, int height, bool autoSize, string expectedText, int expectedY) + [InlineData ("A", 0, "", 0)] + [InlineData ("A", 1, "A", 0)] + [InlineData ("A", 2, "A", 0)] + [InlineData ("A", 3, "A", 1)] + [InlineData ("AB", 1, "A", 0)] + [InlineData ("AB", 2, "A\nB", 0)] + [InlineData ("ABC", 2, "A\nB", 0)] + [InlineData ("ABC", 3, "A\nB\nC", 0)] + [InlineData ("ABC", 4, "A\nB\nC", 0)] + [InlineData ("ABC", 5, "A\nB\nC", 1)] + [InlineData ("ABC", 6, "A\nB\nC", 1)] + [InlineData ("ABC", 9, "A\nB\nC", 3)] + [InlineData ("ABCD", 2, "B\nC", 0)] + [InlineData ("こんにちは", 0, "", 0)] + [InlineData ("こんにちは", 1, "に", 0)] + [InlineData ("こんにちは", 2, "ん\nに", 0)] + [InlineData ("こんにちは", 3, "ん\nに\nち", 0)] + [InlineData ("こんにちは", 4, "こ\nん\nに\nち", 0)] + [InlineData ("こんにちは", 5, "こ\nん\nに\nち\nは", 0)] + [InlineData ("こんにちは", 6, "こ\nん\nに\nち\nは", 0)] + [InlineData ("ABCD\nこんにちは", 7, "Aこ\nBん\nCに\nDち\n は", 1)] + [InlineData ("こんにちは\nABCD", 7, "こA\nんB\nにC\nちD\nは ", 1)] + public void Draw_Vertical_TopBottom_LeftRight_Middle (string text, int height, string expectedText, int expectedY) { TextFormatter tf = new () { Text = text, Direction = TextDirection.TopBottom_LeftRight, - VerticalAlignment = Alignment.Center, - AutoSize = autoSize, + VerticalAlignment = Alignment.Center }; - if (!autoSize) + int width = text.ToRunes ().Max (r => r.GetColumns ()); + + if (text.Contains ("\n")) { - int width = text.ToRunes ().Max (r => r.GetColumns ()); - - if (text.Contains ("\n")) - { - width++; - } - - tf.Size = new Size (width, height); + width++; } - tf.Draw (new Rectangle (0, 0, 5, height), Attribute.Default, Attribute.Default); + + tf.Width = width; + tf.Height = height; + tf.Draw (new (0, 0, 5, height), Attribute.Default, Attribute.Default); Rectangle rect = TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output); Assert.Equal (expectedY, rect.Y); } - [Theory] - [InlineData ("1234", 4)] - [InlineData ("_1234", 4)] - public void AutoSize_HotKey_Size_Correct (string text, int expected) - { - // Horizontal - TextFormatter tf = new () - { - AutoSize = true, - HotKeySpecifier = (Rune)'_', - Text = text, - }; - Assert.Equal (new (expected, 1), tf.Size); - - // Vertical - tf = new () - { - HotKeySpecifier = (Rune)'_', - Direction = TextDirection.TopBottom_LeftRight, - Text = text, - AutoSize = true, - }; - Assert.Equal (new (1, expected), tf.Size); - } - [SetupFakeDriver] [Theory] - [InlineData ("A", 1, 0, false, "")] - [InlineData ("A", 0, 1, false, "")] - [InlineData ("AB1 2", 2, 1, false, "2")] - [InlineData ("AB12", 5, 1, false, "21BA")] - [InlineData ("AB\n12", 5, 2, false, "BA\n21")] - [InlineData ("ABC 123 456", 7, 2, false, "654 321\nCBA ")] - [InlineData ("こんにちは", 1, 1, false, "")] - [InlineData ("こんにちは", 2, 1, false, "は")] - [InlineData ("こんにちは", 5, 1, false, "はち")] - [InlineData ("こんにちは", 10, 1, false, "はちにんこ")] - [InlineData ("こんにちは\nAB\n12", 10, 3, false, "はちにんこ\nBA \n21 ")] - - [InlineData ("A", 1, 0, true, "")] - [InlineData ("A", 0, 1, true, "")] - [InlineData ("AB1 2", 2, 1, true, "2")] - [InlineData ("AB12", 5, 1, true, "21BA")] - [InlineData ("AB\n12", 5, 2, true, "BA\n21")] - [InlineData ("ABC 123 456", 7, 2, true, "654 321")] - [InlineData ("こんにちは", 1, 1, true, "")] - [InlineData ("こんにちは", 2, 1, true, "は")] - [InlineData ("こんにちは", 5, 1, true, "はち")] - [InlineData ("こんにちは", 10, 1, true, "はちにんこ")] - [InlineData ("こんにちは\nAB\n12", 10, 3, true, "はちにんこ\nBA \n21 ")] - public void Draw_Horizontal_RightLeft_TopBottom (string text, int width, int height, bool autoSize, string expectedText) + [InlineData ("A", 1, 0, "")] + [InlineData ("A", 0, 1, "")] + [InlineData ("AB1 2", 2, 1, "2")] + [InlineData ("AB12", 5, 1, "21BA")] + [InlineData ("AB\n12", 5, 2, "BA\n21")] + [InlineData ("ABC 123 456", 7, 2, "654 321\nCBA ")] + [InlineData ("こんにちは", 1, 1, "")] + [InlineData ("こんにちは", 2, 1, "は")] + [InlineData ("こんにちは", 5, 1, "はち")] + [InlineData ("こんにちは", 10, 1, "はちにんこ")] + [InlineData ("こんにちは\nAB\n12", 10, 3, "はちにんこ\nBA \n21 ")] + public void Draw_Horizontal_RightLeft_TopBottom (string text, int width, int height, string expectedText) { TextFormatter tf = new () { Text = text, - Direction = TextDirection.RightLeft_TopBottom, - AutoSize = autoSize, + Direction = TextDirection.RightLeft_TopBottom }; - if (!autoSize) - { - tf.Size = new Size (width, height); - } - tf.Draw (new Rectangle (0, 0, width, height), Attribute.Default, Attribute.Default); + tf.Width = width; + tf.Height = height; + tf.Draw (new (0, 0, width, height), Attribute.Default, Attribute.Default); TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output); } [SetupFakeDriver] [Theory] - [InlineData ("A", 1, 0, false, "")] - [InlineData ("A", 0, 1, false, "")] - [InlineData ("AB1 2", 2, 1, false, "2")] - [InlineData ("AB12", 5, 1, false, "21BA")] - [InlineData ("AB\n12", 5, 2, false, "21\nBA")] - [InlineData ("ABC 123 456", 7, 2, false, "CBA \n654 321")] - [InlineData ("こんにちは", 1, 1, false, "")] - [InlineData ("こんにちは", 2, 1, false, "は")] - [InlineData ("こんにちは", 5, 1, false, "はち")] - [InlineData ("こんにちは", 10, 1, false, "はちにんこ")] - [InlineData ("こんにちは\nAB\n12", 10, 3, false, "21 \nBA \nはちにんこ")] - - [InlineData ("A", 1, 0, true, "")] - [InlineData ("A", 0, 1, true, "")] - [InlineData ("AB1 2", 2, 1, true, "2")] - [InlineData ("AB12", 5, 1, true, "21BA")] - [InlineData ("AB\n12", 5, 2, true, "21\nBA")] - [InlineData ("ABC 123 456", 7, 2, true, "654 321")] - [InlineData ("こんにちは", 1, 1, true, "")] - [InlineData ("こんにちは", 2, 1, true, "は")] - [InlineData ("こんにちは", 5, 1, true, "はち")] - [InlineData ("こんにちは", 10, 1, true, "はちにんこ")] - [InlineData ("こんにちは\nAB\n12", 10, 3, true, "21 \nBA \nはちにんこ")] - public void Draw_Horizontal_RightLeft_BottomTop (string text, int width, int height, bool autoSize, string expectedText) + [InlineData ("A", 1, 0, "")] + [InlineData ("A", 0, 1, "")] + [InlineData ("AB1 2", 2, 1, "2")] + [InlineData ("AB12", 5, 1, "21BA")] + [InlineData ("AB\n12", 5, 2, "21\nBA")] + [InlineData ("ABC 123 456", 7, 2, "CBA \n654 321")] + [InlineData ("こんにちは", 1, 1, "")] + [InlineData ("こんにちは", 2, 1, "は")] + [InlineData ("こんにちは", 5, 1, "はち")] + [InlineData ("こんにちは", 10, 1, "はちにんこ")] + [InlineData ("こんにちは\nAB\n12", 10, 3, "21 \nBA \nはちにんこ")] + public void Draw_Horizontal_RightLeft_BottomTop (string text, int width, int height, string expectedText) { TextFormatter tf = new () { Text = text, - Direction = TextDirection.RightLeft_BottomTop, - AutoSize = autoSize, + Direction = TextDirection.RightLeft_BottomTop }; - if (!autoSize) - { - tf.Size = new Size (width, height); - } - tf.Draw (new Rectangle (0, 0, width, height), Attribute.Default, Attribute.Default); + tf.Width = width; + tf.Height = height; + tf.Draw (new (0, 0, width, height), Attribute.Default, Attribute.Default); TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output); } [SetupFakeDriver] [Theory] - [InlineData ("A", 1, 0, false, "")] - [InlineData ("A", 0, 1, false, "")] - [InlineData ("AB1 2", 1, 2, false, "2")] - [InlineData ("AB12", 1, 5, false, "2\n1\nB\nA")] - [InlineData ("AB\n12", 2, 5, false, "B2\nA1")] - [InlineData ("ABC 123 456", 2, 7, false, "6C\n5B\n4A\n \n3 \n2 \n1 ")] - [InlineData ("こんにちは", 1, 1, false, "")] - [InlineData ("こんにちは", 2, 1, false, "は")] - [InlineData ("こんにちは", 2, 5, false, "は\nち\nに\nん\nこ")] - [InlineData ("こんにちは", 2, 10, false, "は\nち\nに\nん\nこ")] - [InlineData ("こんにちは\nAB\n12", 4, 10, false, "はB2\nちA1\nに \nん \nこ ")] - - [InlineData ("A", 1, 0, true, "")] - [InlineData ("A", 0, 1, true, "")] - [InlineData ("AB1 2", 1, 2, true, "2")] - [InlineData ("AB12", 1, 5, true, "2\n1\nB\nA")] - [InlineData ("AB\n12", 2, 5, true, "B2\nA1")] - [InlineData ("ABC 123 456", 2, 7, true, "6\n5\n4\n \n3\n2\n1")] - [InlineData ("こんにちは", 1, 1, true, "")] - [InlineData ("こんにちは", 2, 1, true, "は")] - [InlineData ("こんにちは", 2, 5, true, "は\nち\nに\nん\nこ")] - [InlineData ("こんにちは", 2, 10, true, "は\nち\nに\nん\nこ")] - [InlineData ("こんにちは\nAB\n12", 4, 10, true, "はB2\nちA1\nに \nん \nこ ")] - public void Draw_Vertical_BottomTop_LeftRight (string text, int width, int height, bool autoSize, string expectedText) + [InlineData ("A", 1, 0, "")] + [InlineData ("A", 0, 1, "")] + [InlineData ("AB1 2", 1, 2, "2")] + [InlineData ("AB12", 1, 5, "2\n1\nB\nA")] + [InlineData ("AB\n12", 2, 5, "B2\nA1")] + [InlineData ("ABC 123 456", 2, 7, "6C\n5B\n4A\n \n3 \n2 \n1 ")] + [InlineData ("こんにちは", 1, 1, "")] + [InlineData ("こんにちは", 2, 1, "は")] + [InlineData ("こんにちは", 2, 5, "は\nち\nに\nん\nこ")] + [InlineData ("こんにちは", 2, 10, "は\nち\nに\nん\nこ")] + [InlineData ("こんにちは\nAB\n12", 4, 10, "はB2\nちA1\nに \nん \nこ ")] + public void Draw_Vertical_BottomTop_LeftRight (string text, int width, int height, string expectedText) { TextFormatter tf = new () { Text = text, - Direction = TextDirection.BottomTop_LeftRight, - AutoSize = autoSize, + Direction = TextDirection.BottomTop_LeftRight }; - if (!autoSize) - { - tf.Size = new Size (width, height); - } - tf.Draw (new Rectangle (0, 0, width, height), Attribute.Default, Attribute.Default); + tf.Width = width; + tf.Height = height; + tf.Draw (new (0, 0, width, height), Attribute.Default, Attribute.Default); TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output); } [SetupFakeDriver] [Theory] - [InlineData ("A", 1, 0, false, "")] - [InlineData ("A", 0, 1, false, "")] - [InlineData ("AB1 2", 1, 2, false, "2")] - [InlineData ("AB12", 1, 5, false, "2\n1\nB\nA")] - [InlineData ("AB\n12", 2, 5, false, "2B\n1A")] - [InlineData ("ABC 123 456", 2, 7, false, "C6\nB5\nA4\n \n 3\n 2\n 1")] - [InlineData ("こんにちは", 1, 1, false, "")] - [InlineData ("こんにちは", 2, 1, false, "は")] - [InlineData ("こんにちは", 2, 5, false, "は\nち\nに\nん\nこ")] - [InlineData ("こんにちは", 2, 10, false, "は\nち\nに\nん\nこ")] - [InlineData ("こんにちは\nAB\n12", 4, 10, false, "2Bは\n1Aち\n に\n ん\n こ")] - - [InlineData ("A", 1, 0, true, "")] - [InlineData ("A", 0, 1, true, "")] - [InlineData ("AB1 2", 1, 2, true, "2")] - [InlineData ("AB12", 1, 5, true, "2\n1\nB\nA")] - [InlineData ("AB\n12", 2, 5, true, "2B\n1A")] - [InlineData ("ABC 123 456", 2, 7, true, "6\n5\n4\n \n3\n2\n1")] - [InlineData ("こんにちは", 1, 1, true, "")] - [InlineData ("こんにちは", 2, 1, true, "は")] - [InlineData ("こんにちは", 2, 5, true, "は\nち\nに\nん\nこ")] - [InlineData ("こんにちは", 2, 10, true, "は\nち\nに\nん\nこ")] - [InlineData ("こんにちは\nAB\n12", 4, 10, true, "2Bは\n1Aち\n に\n ん\n こ")] - public void Draw_Vertical_BottomTop_RightLeft (string text, int width, int height, bool autoSize, string expectedText) + [InlineData ("A", 1, 0, "")] + [InlineData ("A", 0, 1, "")] + [InlineData ("AB1 2", 1, 2, "2")] + [InlineData ("AB12", 1, 5, "2\n1\nB\nA")] + [InlineData ("AB\n12", 2, 5, "2B\n1A")] + [InlineData ("ABC 123 456", 2, 7, "C6\nB5\nA4\n \n 3\n 2\n 1")] + [InlineData ("こんにちは", 1, 1, "")] + [InlineData ("こんにちは", 2, 1, "は")] + [InlineData ("こんにちは", 2, 5, "は\nち\nに\nん\nこ")] + [InlineData ("こんにちは", 2, 10, "は\nち\nに\nん\nこ")] + [InlineData ("こんにちは\nAB\n12", 4, 10, "2Bは\n1Aち\n に\n ん\n こ")] + public void Draw_Vertical_BottomTop_RightLeft (string text, int width, int height, string expectedText) { TextFormatter tf = new () { Text = text, - Direction = TextDirection.BottomTop_RightLeft, - AutoSize = autoSize, + Direction = TextDirection.BottomTop_RightLeft }; - if (!autoSize) - { - tf.Size = new Size (width, height); - } - tf.Draw (new Rectangle (0, 0, width, height), Attribute.Default, Attribute.Default); + tf.Width = width; + tf.Height = height; + tf.Draw (new (0, 0, width, height), Attribute.Default, Attribute.Default); TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output); } @@ -3860,11 +3632,11 @@ B")] top.Add (view); Application.Iteration += (s, a) => - { - Assert.Equal (-2, view.Y); + { + Assert.Equal (-2, view.Y); - Application.RequestStop (); - }; + Application.RequestStop (); + }; try { @@ -3877,6 +3649,7 @@ B")] } top.Dispose (); + // Shutdown must be called to safely clean up Application if Init has been called Application.Shutdown (); } @@ -3886,7 +3659,12 @@ B")] // Horizontal with Alignment.Start // LeftRight_TopBottom - [InlineData ("0 2 4", Alignment.Start, Alignment.Start, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Start, + TextDirection.LeftRight_TopBottom, + @" 0 2 4** ******* ******* @@ -3894,7 +3672,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Start, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Start, + TextDirection.LeftRight_TopBottom, + @" **0 2 4 ******* ******* @@ -3902,7 +3685,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Start, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Start, + TextDirection.LeftRight_TopBottom, + @" *0 2 4* ******* ******* @@ -3910,7 +3698,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Start, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Start, + TextDirection.LeftRight_TopBottom, + @" 0 2 4 ******* ******* @@ -3918,8 +3711,12 @@ B")] ******* ******* *******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Start, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Start, + TextDirection.LeftRight_TopBottom, + @" 0 你 4* ******* ******* @@ -3927,7 +3724,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Start, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Start, + TextDirection.LeftRight_TopBottom, + @" *0 你 4 ******* ******* @@ -3935,7 +3737,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Start, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Start, + TextDirection.LeftRight_TopBottom, + @" 0 你 4* ******* ******* @@ -3943,7 +3750,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Start, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Start, + TextDirection.LeftRight_TopBottom, + @" 0 你 4 ******* ******* @@ -3953,7 +3765,12 @@ B")] *******")] // LeftRight_BottomTop - [InlineData ("0 2 4", Alignment.Start, Alignment.Start, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Start, + TextDirection.LeftRight_BottomTop, + @" 0 2 4** ******* ******* @@ -3961,7 +3778,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Start, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Start, + TextDirection.LeftRight_BottomTop, + @" **0 2 4 ******* ******* @@ -3969,7 +3791,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Start, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Start, + TextDirection.LeftRight_BottomTop, + @" *0 2 4* ******* ******* @@ -3977,7 +3804,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Start, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Start, + TextDirection.LeftRight_BottomTop, + @" 0 2 4 ******* ******* @@ -3985,8 +3817,12 @@ B")] ******* ******* *******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Start, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Start, + TextDirection.LeftRight_BottomTop, + @" 0 你 4* ******* ******* @@ -3994,7 +3830,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Start, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Start, + TextDirection.LeftRight_BottomTop, + @" *0 你 4 ******* ******* @@ -4002,7 +3843,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Start, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Start, + TextDirection.LeftRight_BottomTop, + @" 0 你 4* ******* ******* @@ -4010,7 +3856,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Start, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Start, + TextDirection.LeftRight_BottomTop, + @" 0 你 4 ******* ******* @@ -4020,7 +3871,12 @@ B")] *******")] // RightLeft_TopBottom - [InlineData ("0 2 4", Alignment.Start, Alignment.Start, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Start, + TextDirection.RightLeft_TopBottom, + @" 4 2 0** ******* ******* @@ -4028,7 +3884,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Start, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Start, + TextDirection.RightLeft_TopBottom, + @" **4 2 0 ******* ******* @@ -4036,7 +3897,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Start, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Start, + TextDirection.RightLeft_TopBottom, + @" *4 2 0* ******* ******* @@ -4044,7 +3910,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Start, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Start, + TextDirection.RightLeft_TopBottom, + @" 4 2 0 ******* ******* @@ -4052,8 +3923,12 @@ B")] ******* ******* *******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Start, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Start, + TextDirection.RightLeft_TopBottom, + @" 4 你 0* ******* ******* @@ -4061,7 +3936,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Start, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Start, + TextDirection.RightLeft_TopBottom, + @" *4 你 0 ******* ******* @@ -4069,7 +3949,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Start, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Start, + TextDirection.RightLeft_TopBottom, + @" 4 你 0* ******* ******* @@ -4077,7 +3962,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Start, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Start, + TextDirection.RightLeft_TopBottom, + @" 4 你 0 ******* ******* @@ -4087,7 +3977,12 @@ B")] *******")] // RightLeft_BottomTop - [InlineData ("0 2 4", Alignment.Start, Alignment.Start, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Start, + TextDirection.RightLeft_BottomTop, + @" 4 2 0** ******* ******* @@ -4095,7 +3990,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Start, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Start, + TextDirection.RightLeft_BottomTop, + @" **4 2 0 ******* ******* @@ -4103,7 +4003,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Start, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Start, + TextDirection.RightLeft_BottomTop, + @" *4 2 0* ******* ******* @@ -4111,7 +4016,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Start, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Start, + TextDirection.RightLeft_BottomTop, + @" 4 2 0 ******* ******* @@ -4119,8 +4029,12 @@ B")] ******* ******* *******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Start, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Start, + TextDirection.RightLeft_BottomTop, + @" 4 你 0* ******* ******* @@ -4128,7 +4042,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Start, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Start, + TextDirection.RightLeft_BottomTop, + @" *4 你 0 ******* ******* @@ -4136,7 +4055,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Start, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Start, + TextDirection.RightLeft_BottomTop, + @" 4 你 0* ******* ******* @@ -4144,7 +4068,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Start, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Start, + TextDirection.RightLeft_BottomTop, + @" 4 你 0 ******* ******* @@ -4155,7 +4084,12 @@ B")] // Horizontal with Alignment.End // LeftRight_TopBottom - [InlineData ("0 2 4", Alignment.Start, Alignment.End, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.End, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4163,7 +4097,12 @@ B")] ******* ******* 0 2 4**")] - [InlineData ("0 2 4", Alignment.End, Alignment.End, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.End, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4171,7 +4110,12 @@ B")] ******* ******* **0 2 4")] - [InlineData ("0 2 4", Alignment.Center, Alignment.End, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.End, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4179,7 +4123,12 @@ B")] ******* ******* *0 2 4*")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.End, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.End, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4187,8 +4136,12 @@ B")] ******* ******* 0 2 4")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.End, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.End, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4196,7 +4149,12 @@ B")] ******* ******* 0 你 4*")] - [InlineData ("0 你 4", Alignment.End, Alignment.End, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.End, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4204,7 +4162,12 @@ B")] ******* ******* *0 你 4")] - [InlineData ("0 你 4", Alignment.Center, Alignment.End, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.End, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4212,7 +4175,12 @@ B")] ******* ******* 0 你 4*")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.End, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.End, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4222,7 +4190,12 @@ B")] 0 你 4")] // LeftRight_BottomTop - [InlineData ("0 2 4", Alignment.Start, Alignment.End, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.End, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4230,7 +4203,12 @@ B")] ******* ******* 0 2 4**")] - [InlineData ("0 2 4", Alignment.End, Alignment.End, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.End, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4238,7 +4216,12 @@ B")] ******* ******* **0 2 4")] - [InlineData ("0 2 4", Alignment.Center, Alignment.End, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.End, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4246,7 +4229,12 @@ B")] ******* ******* *0 2 4*")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.End, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.End, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4254,8 +4242,12 @@ B")] ******* ******* 0 2 4")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.End, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.End, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4263,7 +4255,12 @@ B")] ******* ******* 0 你 4*")] - [InlineData ("0 你 4", Alignment.End, Alignment.End, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.End, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4271,7 +4268,12 @@ B")] ******* ******* *0 你 4")] - [InlineData ("0 你 4", Alignment.Center, Alignment.End, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.End, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4279,7 +4281,12 @@ B")] ******* ******* 0 你 4*")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.End, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.End, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4289,7 +4296,12 @@ B")] 0 你 4")] // RightLeft_TopBottom - [InlineData ("0 2 4", Alignment.Start, Alignment.End, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.End, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4297,7 +4309,12 @@ B")] ******* ******* 4 2 0**")] - [InlineData ("0 2 4", Alignment.End, Alignment.End, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.End, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4305,7 +4322,12 @@ B")] ******* ******* **4 2 0")] - [InlineData ("0 2 4", Alignment.Center, Alignment.End, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.End, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4313,7 +4335,12 @@ B")] ******* ******* *4 2 0*")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.End, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.End, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4321,8 +4348,12 @@ B")] ******* ******* 4 2 0")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.End, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.End, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4330,7 +4361,12 @@ B")] ******* ******* 4 你 0*")] - [InlineData ("0 你 4", Alignment.End, Alignment.End, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.End, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4338,7 +4374,12 @@ B")] ******* ******* *4 你 0")] - [InlineData ("0 你 4", Alignment.Center, Alignment.End, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.End, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4346,7 +4387,12 @@ B")] ******* ******* 4 你 0*")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.End, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.End, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4356,7 +4402,12 @@ B")] 4 你 0")] // RightLeft_BottomTop - [InlineData ("0 2 4", Alignment.Start, Alignment.End, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.End, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4364,7 +4415,12 @@ B")] ******* ******* 4 2 0**")] - [InlineData ("0 2 4", Alignment.End, Alignment.End, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.End, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4372,7 +4428,12 @@ B")] ******* ******* **4 2 0")] - [InlineData ("0 2 4", Alignment.Center, Alignment.End, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.End, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4380,7 +4441,12 @@ B")] ******* ******* *4 2 0*")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.End, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.End, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4388,8 +4454,12 @@ B")] ******* ******* 4 2 0")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.End, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.End, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4397,7 +4467,12 @@ B")] ******* ******* 4 你 0*")] - [InlineData ("0 你 4", Alignment.End, Alignment.End, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.End, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4405,7 +4480,12 @@ B")] ******* ******* *4 你 0")] - [InlineData ("0 你 4", Alignment.Center, Alignment.End, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.End, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4413,7 +4493,12 @@ B")] ******* ******* 4 你 0*")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.End, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.End, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4424,7 +4509,12 @@ B")] // Horizontal with alignment.Centered // LeftRight_TopBottom - [InlineData ("0 2 4", Alignment.Start, Alignment.Center, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Center, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4432,7 +4522,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Center, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Center, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4440,7 +4535,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Center, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Center, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4448,7 +4548,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Center, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Center, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4456,8 +4561,12 @@ B")] ******* ******* *******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Center, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Center, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4465,7 +4574,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Center, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Center, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4473,7 +4587,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Center, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Center, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4481,7 +4600,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Center, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Center, + TextDirection.LeftRight_TopBottom, + @" ******* ******* ******* @@ -4491,7 +4615,12 @@ B")] *******")] // LeftRight_BottomTop - [InlineData ("0 2 4", Alignment.Start, Alignment.Center, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Center, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4499,7 +4628,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Center, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Center, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4507,7 +4641,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Center, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Center, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4515,7 +4654,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Center, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Center, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4523,8 +4667,12 @@ B")] ******* ******* *******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Center, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Center, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4532,7 +4680,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Center, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Center, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4540,7 +4693,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Center, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Center, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4548,7 +4706,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Center, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Center, + TextDirection.LeftRight_BottomTop, + @" ******* ******* ******* @@ -4558,7 +4721,12 @@ B")] *******")] // RightLeft_TopBottom - [InlineData ("0 2 4", Alignment.Start, Alignment.Center, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Center, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4566,7 +4734,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Center, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Center, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4574,7 +4747,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Center, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Center, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4582,7 +4760,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Center, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Center, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4590,8 +4773,12 @@ B")] ******* ******* *******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Center, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Center, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4599,7 +4786,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Center, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Center, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4607,7 +4799,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Center, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Center, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4615,7 +4812,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Center, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Center, + TextDirection.RightLeft_TopBottom, + @" ******* ******* ******* @@ -4625,7 +4827,12 @@ B")] *******")] // RightLeft_BottomTop - [InlineData ("0 2 4", Alignment.Start, Alignment.Center, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Center, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4633,7 +4840,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Center, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Center, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4641,7 +4853,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Center, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Center, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4649,7 +4866,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Center, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Center, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4657,8 +4879,12 @@ B")] ******* ******* *******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Center, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Center, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4666,7 +4892,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Center, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Center, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4674,7 +4905,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Center, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Center, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4682,7 +4918,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Center, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Center, + TextDirection.RightLeft_BottomTop, + @" ******* ******* ******* @@ -4693,7 +4934,12 @@ B")] // Horizontal with alignment.Justified // LeftRight_TopBottom - [InlineData ("0 2 4", Alignment.Start, Alignment.Fill, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Fill, + TextDirection.LeftRight_TopBottom, + @" 0 2 4** ******* ******* @@ -4701,7 +4947,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Fill, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Fill, + TextDirection.LeftRight_TopBottom, + @" **0 2 4 ******* ******* @@ -4709,7 +4960,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Fill, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Fill, + TextDirection.LeftRight_TopBottom, + @" *0 2 4* ******* ******* @@ -4717,7 +4973,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Fill, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.LeftRight_TopBottom, + @" 0 2 4 ******* ******* @@ -4725,8 +4986,12 @@ B")] ******* ******* *******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Fill, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Fill, + TextDirection.LeftRight_TopBottom, + @" 0 你 4* ******* ******* @@ -4734,7 +4999,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Fill, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Fill, + TextDirection.LeftRight_TopBottom, + @" *0 你 4 ******* ******* @@ -4742,7 +5012,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Fill, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Fill, + TextDirection.LeftRight_TopBottom, + @" 0 你 4* ******* ******* @@ -4750,7 +5025,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Fill, TextDirection.LeftRight_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.LeftRight_TopBottom, + @" 0 你 4 ******* ******* @@ -4760,7 +5040,12 @@ B")] *******")] // LeftRight_BottomTop - [InlineData ("0 2 4", Alignment.Start, Alignment.Fill, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Fill, + TextDirection.LeftRight_BottomTop, + @" 0 2 4** ******* ******* @@ -4768,7 +5053,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Fill, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Fill, + TextDirection.LeftRight_BottomTop, + @" **0 2 4 ******* ******* @@ -4776,7 +5066,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Fill, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Fill, + TextDirection.LeftRight_BottomTop, + @" *0 2 4* ******* ******* @@ -4784,7 +5079,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Fill, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.LeftRight_BottomTop, + @" 0 2 4 ******* ******* @@ -4792,8 +5092,12 @@ B")] ******* ******* *******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Fill, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Fill, + TextDirection.LeftRight_BottomTop, + @" 0 你 4* ******* ******* @@ -4801,7 +5105,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Fill, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Fill, + TextDirection.LeftRight_BottomTop, + @" *0 你 4 ******* ******* @@ -4809,7 +5118,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Fill, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Fill, + TextDirection.LeftRight_BottomTop, + @" 0 你 4* ******* ******* @@ -4817,7 +5131,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Fill, TextDirection.LeftRight_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.LeftRight_BottomTop, + @" 0 你 4 ******* ******* @@ -4827,7 +5146,12 @@ B")] *******")] // RightLeft_TopBottom - [InlineData ("0 2 4", Alignment.Start, Alignment.Fill, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Fill, + TextDirection.RightLeft_TopBottom, + @" 4 2 0** ******* ******* @@ -4835,7 +5159,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Fill, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Fill, + TextDirection.RightLeft_TopBottom, + @" **4 2 0 ******* ******* @@ -4843,7 +5172,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Fill, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Fill, + TextDirection.RightLeft_TopBottom, + @" *4 2 0* ******* ******* @@ -4851,7 +5185,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Fill, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.RightLeft_TopBottom, + @" 4 2 0 ******* ******* @@ -4859,8 +5198,12 @@ B")] ******* ******* *******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Fill, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Fill, + TextDirection.RightLeft_TopBottom, + @" 4 你 0* ******* ******* @@ -4868,7 +5211,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Fill, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Fill, + TextDirection.RightLeft_TopBottom, + @" *4 你 0 ******* ******* @@ -4876,7 +5224,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Fill, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Fill, + TextDirection.RightLeft_TopBottom, + @" 4 你 0* ******* ******* @@ -4884,7 +5237,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Fill, TextDirection.RightLeft_TopBottom, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.RightLeft_TopBottom, + @" 4 你 0 ******* ******* @@ -4894,7 +5252,12 @@ B")] *******")] // RightLeft_BottomTop - [InlineData ("0 2 4", Alignment.Start, Alignment.Fill, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Fill, + TextDirection.RightLeft_BottomTop, + @" 4 2 0** ******* ******* @@ -4902,7 +5265,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Fill, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Fill, + TextDirection.RightLeft_BottomTop, + @" **4 2 0 ******* ******* @@ -4910,7 +5278,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Fill, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Fill, + TextDirection.RightLeft_BottomTop, + @" *4 2 0* ******* ******* @@ -4918,7 +5291,12 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Fill, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.RightLeft_BottomTop, + @" 4 2 0 ******* ******* @@ -4926,8 +5304,12 @@ B")] ******* ******* *******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Fill, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Fill, + TextDirection.RightLeft_BottomTop, + @" 4 你 0* ******* ******* @@ -4935,7 +5317,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Fill, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Fill, + TextDirection.RightLeft_BottomTop, + @" *4 你 0 ******* ******* @@ -4943,7 +5330,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Fill, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Fill, + TextDirection.RightLeft_BottomTop, + @" 4 你 0* ******* ******* @@ -4951,7 +5343,12 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Fill, TextDirection.RightLeft_BottomTop, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.RightLeft_BottomTop, + @" 4 你 0 ******* ******* @@ -4962,7 +5359,12 @@ B")] // Vertical with alignment.Left // TopBottom_LeftRight - [InlineData ("0 2 4", Alignment.Start, Alignment.Start, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Start, + TextDirection.TopBottom_LeftRight, + @" 0****** ****** 2****** @@ -4970,7 +5372,12 @@ B")] 4****** ******* *******")] - [InlineData ("0 2 4", Alignment.Start, Alignment.End, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.End, + TextDirection.TopBottom_LeftRight, + @" ******* ******* 0****** @@ -4978,7 +5385,12 @@ B")] 2****** ****** 4******")] - [InlineData ("0 2 4", Alignment.Start, Alignment.Center, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Center, + TextDirection.TopBottom_LeftRight, + @" ******* 0****** ****** @@ -4986,7 +5398,12 @@ B")] ****** 4****** *******")] - [InlineData ("0 2 4", Alignment.Start, Alignment.Fill, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Fill, + TextDirection.TopBottom_LeftRight, + @" 0****** ****** ****** @@ -4994,8 +5411,12 @@ B")] ****** ****** 4******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Start, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Start, + TextDirection.TopBottom_LeftRight, + @" 0****** ****** 你***** @@ -5003,7 +5424,12 @@ B")] 4****** ******* *******")] - [InlineData ("0 你 4", Alignment.Start, Alignment.End, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.End, + TextDirection.TopBottom_LeftRight, + @" ******* ******* 0****** @@ -5011,7 +5437,12 @@ B")] 你***** ****** 4******")] - [InlineData ("0 你 4", Alignment.Start, Alignment.Center, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Center, + TextDirection.TopBottom_LeftRight, + @" ******* 0****** ****** @@ -5019,7 +5450,12 @@ B")] ****** 4****** *******")] - [InlineData ("0 你 4", Alignment.Start, Alignment.Fill, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Fill, + TextDirection.TopBottom_LeftRight, + @" 0****** ****** ****** @@ -5029,7 +5465,12 @@ B")] 4******")] // TopBottom_RightLeft - [InlineData ("0 2 4", Alignment.Start, Alignment.Start, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Start, + TextDirection.TopBottom_RightLeft, + @" 0****** ****** 2****** @@ -5037,7 +5478,12 @@ B")] 4****** ******* *******")] - [InlineData ("0 2 4", Alignment.Start, Alignment.End, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.End, + TextDirection.TopBottom_RightLeft, + @" ******* ******* 0****** @@ -5045,7 +5491,12 @@ B")] 2****** ****** 4******")] - [InlineData ("0 2 4", Alignment.Start, Alignment.Center, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Center, + TextDirection.TopBottom_RightLeft, + @" ******* 0****** ****** @@ -5053,7 +5504,12 @@ B")] ****** 4****** *******")] - [InlineData ("0 2 4", Alignment.Start, Alignment.Fill, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Fill, + TextDirection.TopBottom_RightLeft, + @" 0****** ****** ****** @@ -5061,8 +5517,12 @@ B")] ****** ****** 4******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Start, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Start, + TextDirection.TopBottom_RightLeft, + @" 0****** ****** 你***** @@ -5070,7 +5530,12 @@ B")] 4****** ******* *******")] - [InlineData ("0 你 4", Alignment.Start, Alignment.End, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.End, + TextDirection.TopBottom_RightLeft, + @" ******* ******* 0****** @@ -5078,7 +5543,12 @@ B")] 你***** ****** 4******")] - [InlineData ("0 你 4", Alignment.Start, Alignment.Center, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Center, + TextDirection.TopBottom_RightLeft, + @" ******* 0****** ****** @@ -5086,7 +5556,12 @@ B")] ****** 4****** *******")] - [InlineData ("0 你 4", Alignment.Start, Alignment.Fill, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Fill, + TextDirection.TopBottom_RightLeft, + @" 0****** ****** ****** @@ -5096,7 +5571,12 @@ B")] 4******")] // BottomTop_LeftRight - [InlineData ("0 2 4", Alignment.Start, Alignment.Start, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Start, + TextDirection.BottomTop_LeftRight, + @" 4****** ****** 2****** @@ -5104,7 +5584,12 @@ B")] 0****** ******* *******")] - [InlineData ("0 2 4", Alignment.Start, Alignment.End, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.End, + TextDirection.BottomTop_LeftRight, + @" ******* ******* 4****** @@ -5112,7 +5597,12 @@ B")] 2****** ****** 0******")] - [InlineData ("0 2 4", Alignment.Start, Alignment.Center, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Center, + TextDirection.BottomTop_LeftRight, + @" ******* 4****** ****** @@ -5120,7 +5610,12 @@ B")] ****** 0****** *******")] - [InlineData ("0 2 4", Alignment.Start, Alignment.Fill, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Fill, + TextDirection.BottomTop_LeftRight, + @" 4****** ****** ****** @@ -5128,8 +5623,12 @@ B")] ****** ****** 0******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Start, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Start, + TextDirection.BottomTop_LeftRight, + @" 4****** ****** 你***** @@ -5137,7 +5636,12 @@ B")] 0****** ******* *******")] - [InlineData ("0 你 4", Alignment.Start, Alignment.End, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.End, + TextDirection.BottomTop_LeftRight, + @" ******* ******* 4****** @@ -5145,7 +5649,12 @@ B")] 你***** ****** 0******")] - [InlineData ("0 你 4", Alignment.Start, Alignment.Center, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Center, + TextDirection.BottomTop_LeftRight, + @" ******* 4****** ****** @@ -5153,7 +5662,12 @@ B")] ****** 0****** *******")] - [InlineData ("0 你 4", Alignment.Start, Alignment.Fill, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Fill, + TextDirection.BottomTop_LeftRight, + @" 4****** ****** ****** @@ -5163,7 +5677,12 @@ B")] 0******")] // BottomTop_RightLeft - [InlineData ("0 2 4", Alignment.Start, Alignment.Start, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Start, + TextDirection.BottomTop_RightLeft, + @" 4****** ****** 2****** @@ -5171,7 +5690,12 @@ B")] 0****** ******* *******")] - [InlineData ("0 2 4", Alignment.Start, Alignment.End, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.End, + TextDirection.BottomTop_RightLeft, + @" ******* ******* 4****** @@ -5179,7 +5703,12 @@ B")] 2****** ****** 0******")] - [InlineData ("0 2 4", Alignment.Start, Alignment.Center, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Center, + TextDirection.BottomTop_RightLeft, + @" ******* 4****** ****** @@ -5187,7 +5716,12 @@ B")] ****** 0****** *******")] - [InlineData ("0 2 4", Alignment.Start, Alignment.Fill, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Start, + Alignment.Fill, + TextDirection.BottomTop_RightLeft, + @" 4****** ****** ****** @@ -5195,8 +5729,12 @@ B")] ****** ****** 0******")] - - [InlineData ("0 你 4", Alignment.Start, Alignment.Start, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Start, + TextDirection.BottomTop_RightLeft, + @" 4****** ****** 你***** @@ -5204,7 +5742,12 @@ B")] 0****** ******* *******")] - [InlineData ("0 你 4", Alignment.Start, Alignment.End, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.End, + TextDirection.BottomTop_RightLeft, + @" ******* ******* 4****** @@ -5212,7 +5755,12 @@ B")] 你***** ****** 0******")] - [InlineData ("0 你 4", Alignment.Start, Alignment.Center, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Center, + TextDirection.BottomTop_RightLeft, + @" ******* 4****** ****** @@ -5220,7 +5768,12 @@ B")] ****** 0****** *******")] - [InlineData ("0 你 4", Alignment.Start, Alignment.Fill, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Start, + Alignment.Fill, + TextDirection.BottomTop_RightLeft, + @" 4****** ****** ****** @@ -5231,7 +5784,12 @@ B")] // Vertical with alignment.Right // TopBottom_LeftRight - [InlineData ("0 2 4", Alignment.End, Alignment.Start, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Start, + TextDirection.TopBottom_LeftRight, + @" ******0 ****** ******2 @@ -5239,7 +5797,12 @@ B")] ******4 ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.End, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.End, + TextDirection.TopBottom_LeftRight, + @" ******* ******* ******0 @@ -5247,7 +5810,12 @@ B")] ******2 ****** ******4")] - [InlineData ("0 2 4", Alignment.End, Alignment.Center, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Center, + TextDirection.TopBottom_LeftRight, + @" ******* ******0 ****** @@ -5255,7 +5823,12 @@ B")] ****** ******4 *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Fill, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Fill, + TextDirection.TopBottom_LeftRight, + @" ******0 ****** ****** @@ -5263,8 +5836,12 @@ B")] ****** ****** ******4")] - - [InlineData ("0 你 4", Alignment.End, Alignment.Start, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Start, + TextDirection.TopBottom_LeftRight, + @" *****0* ***** * *****你 @@ -5272,7 +5849,12 @@ B")] *****4* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.End, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.End, + TextDirection.TopBottom_LeftRight, + @" ******* ******* *****0* @@ -5280,7 +5862,12 @@ B")] *****你 ***** * *****4*")] - [InlineData ("0 你 4", Alignment.End, Alignment.Center, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Center, + TextDirection.TopBottom_LeftRight, + @" ******* *****0* ***** * @@ -5288,7 +5875,12 @@ B")] ***** * *****4* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Fill, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Fill, + TextDirection.TopBottom_LeftRight, + @" *****0* ***** * ***** * @@ -5298,7 +5890,12 @@ B")] *****4*")] // TopBottom_RightLeft - [InlineData ("0 2 4", Alignment.End, Alignment.Start, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Start, + TextDirection.TopBottom_RightLeft, + @" ******0 ****** ******2 @@ -5306,7 +5903,12 @@ B")] ******4 ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.End, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.End, + TextDirection.TopBottom_RightLeft, + @" ******* ******* ******0 @@ -5314,7 +5916,12 @@ B")] ******2 ****** ******4")] - [InlineData ("0 2 4", Alignment.End, Alignment.Center, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Center, + TextDirection.TopBottom_RightLeft, + @" ******* ******0 ****** @@ -5322,7 +5929,12 @@ B")] ****** ******4 *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Fill, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Fill, + TextDirection.TopBottom_RightLeft, + @" ******0 ****** ****** @@ -5330,8 +5942,12 @@ B")] ****** ****** ******4")] - - [InlineData ("0 你 4", Alignment.End, Alignment.Start, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Start, + TextDirection.TopBottom_RightLeft, + @" *****0* ***** * *****你 @@ -5339,7 +5955,12 @@ B")] *****4* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.End, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.End, + TextDirection.TopBottom_RightLeft, + @" ******* ******* *****0* @@ -5347,7 +5968,12 @@ B")] *****你 ***** * *****4*")] - [InlineData ("0 你 4", Alignment.End, Alignment.Center, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Center, + TextDirection.TopBottom_RightLeft, + @" ******* *****0* ***** * @@ -5355,7 +5981,12 @@ B")] ***** * *****4* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Fill, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Fill, + TextDirection.TopBottom_RightLeft, + @" *****0* ***** * ***** * @@ -5365,7 +5996,12 @@ B")] *****4*")] // BottomTop_LeftRight - [InlineData ("0 2 4", Alignment.End, Alignment.Start, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Start, + TextDirection.BottomTop_LeftRight, + @" ******4 ****** ******2 @@ -5373,7 +6009,12 @@ B")] ******0 ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.End, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.End, + TextDirection.BottomTop_LeftRight, + @" ******* ******* ******4 @@ -5381,7 +6022,12 @@ B")] ******2 ****** ******0")] - [InlineData ("0 2 4", Alignment.End, Alignment.Center, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Center, + TextDirection.BottomTop_LeftRight, + @" ******* ******4 ****** @@ -5389,7 +6035,12 @@ B")] ****** ******0 *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Fill, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Fill, + TextDirection.BottomTop_LeftRight, + @" ******4 ****** ****** @@ -5397,8 +6048,12 @@ B")] ****** ****** ******0")] - - [InlineData ("0 你 4", Alignment.End, Alignment.Start, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Start, + TextDirection.BottomTop_LeftRight, + @" *****4* ***** * *****你 @@ -5406,7 +6061,12 @@ B")] *****0* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.End, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.End, + TextDirection.BottomTop_LeftRight, + @" ******* ******* *****4* @@ -5414,7 +6074,12 @@ B")] *****你 ***** * *****0*")] - [InlineData ("0 你 4", Alignment.End, Alignment.Center, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Center, + TextDirection.BottomTop_LeftRight, + @" ******* *****4* ***** * @@ -5422,7 +6087,12 @@ B")] ***** * *****0* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Fill, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Fill, + TextDirection.BottomTop_LeftRight, + @" *****4* ***** * ***** * @@ -5432,7 +6102,12 @@ B")] *****0*")] // BottomTop_RightLeft - [InlineData ("0 2 4", Alignment.End, Alignment.Start, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Start, + TextDirection.BottomTop_RightLeft, + @" ******4 ****** ******2 @@ -5440,7 +6115,12 @@ B")] ******0 ******* *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.End, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.End, + TextDirection.BottomTop_RightLeft, + @" ******* ******* ******4 @@ -5448,7 +6128,12 @@ B")] ******2 ****** ******0")] - [InlineData ("0 2 4", Alignment.End, Alignment.Center, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Center, + TextDirection.BottomTop_RightLeft, + @" ******* ******4 ****** @@ -5456,7 +6141,12 @@ B")] ****** ******0 *******")] - [InlineData ("0 2 4", Alignment.End, Alignment.Fill, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.End, + Alignment.Fill, + TextDirection.BottomTop_RightLeft, + @" ******4 ****** ****** @@ -5464,8 +6154,12 @@ B")] ****** ****** ******0")] - - [InlineData ("0 你 4", Alignment.End, Alignment.Start, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Start, + TextDirection.BottomTop_RightLeft, + @" *****4* ***** * *****你 @@ -5473,7 +6167,12 @@ B")] *****0* ******* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.End, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.End, + TextDirection.BottomTop_RightLeft, + @" ******* ******* *****4* @@ -5481,7 +6180,12 @@ B")] *****你 ***** * *****0*")] - [InlineData ("0 你 4", Alignment.End, Alignment.Center, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Center, + TextDirection.BottomTop_RightLeft, + @" ******* *****4* ***** * @@ -5489,7 +6193,12 @@ B")] ***** * *****0* *******")] - [InlineData ("0 你 4", Alignment.End, Alignment.Fill, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.End, + Alignment.Fill, + TextDirection.BottomTop_RightLeft, + @" *****4* ***** * ***** * @@ -5500,7 +6209,12 @@ B")] // Vertical with alignment.Centered // TopBottom_LeftRight - [InlineData ("0 2 4", Alignment.Center, Alignment.Start, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Start, + TextDirection.TopBottom_LeftRight, + @" ***0*** *** *** ***2*** @@ -5508,7 +6222,12 @@ B")] ***4*** ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.End, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.End, + TextDirection.TopBottom_LeftRight, + @" ******* ******* ***0*** @@ -5516,7 +6235,12 @@ B")] ***2*** *** *** ***4***")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Center, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Center, + TextDirection.TopBottom_LeftRight, + @" ******* ***0*** *** *** @@ -5524,7 +6248,12 @@ B")] *** *** ***4*** *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Fill, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Fill, + TextDirection.TopBottom_LeftRight, + @" ***0*** *** *** *** *** @@ -5532,8 +6261,12 @@ B")] *** *** *** *** ***4***")] - - [InlineData ("0 你 4", Alignment.Center, Alignment.Start, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Start, + TextDirection.TopBottom_LeftRight, + @" **0**** ** **** **你*** @@ -5541,7 +6274,12 @@ B")] **4**** ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.End, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.End, + TextDirection.TopBottom_LeftRight, + @" ******* ******* **0**** @@ -5549,7 +6287,12 @@ B")] **你*** ** **** **4****")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Center, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Center, + TextDirection.TopBottom_LeftRight, + @" ******* **0**** ** **** @@ -5557,7 +6300,12 @@ B")] ** **** **4**** *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Fill, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Fill, + TextDirection.TopBottom_LeftRight, + @" **0**** ** **** ** **** @@ -5567,7 +6315,12 @@ B")] **4****")] // TopBottom_RightLeft - [InlineData ("0 2 4", Alignment.Center, Alignment.Start, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Start, + TextDirection.TopBottom_RightLeft, + @" ***0*** *** *** ***2*** @@ -5575,7 +6328,12 @@ B")] ***4*** ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.End, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.End, + TextDirection.TopBottom_RightLeft, + @" ******* ******* ***0*** @@ -5583,7 +6341,12 @@ B")] ***2*** *** *** ***4***")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Center, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Center, + TextDirection.TopBottom_RightLeft, + @" ******* ***0*** *** *** @@ -5591,7 +6354,12 @@ B")] *** *** ***4*** *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Fill, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Fill, + TextDirection.TopBottom_RightLeft, + @" ***0*** *** *** *** *** @@ -5599,8 +6367,12 @@ B")] *** *** *** *** ***4***")] - - [InlineData ("0 你 4", Alignment.Center, Alignment.Start, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Start, + TextDirection.TopBottom_RightLeft, + @" **0**** ** **** **你*** @@ -5608,7 +6380,12 @@ B")] **4**** ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.End, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.End, + TextDirection.TopBottom_RightLeft, + @" ******* ******* **0**** @@ -5616,7 +6393,12 @@ B")] **你*** ** **** **4****")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Center, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Center, + TextDirection.TopBottom_RightLeft, + @" ******* **0**** ** **** @@ -5624,7 +6406,12 @@ B")] ** **** **4**** *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Fill, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Fill, + TextDirection.TopBottom_RightLeft, + @" **0**** ** **** ** **** @@ -5634,7 +6421,12 @@ B")] **4****")] // BottomTop_LeftRight - [InlineData ("0 2 4", Alignment.Center, Alignment.Start, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Start, + TextDirection.BottomTop_LeftRight, + @" ***4*** *** *** ***2*** @@ -5642,7 +6434,12 @@ B")] ***0*** ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.End, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.End, + TextDirection.BottomTop_LeftRight, + @" ******* ******* ***4*** @@ -5650,7 +6447,12 @@ B")] ***2*** *** *** ***0***")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Center, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Center, + TextDirection.BottomTop_LeftRight, + @" ******* ***4*** *** *** @@ -5658,7 +6460,12 @@ B")] *** *** ***0*** *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Fill, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Fill, + TextDirection.BottomTop_LeftRight, + @" ***4*** *** *** *** *** @@ -5666,8 +6473,12 @@ B")] *** *** *** *** ***0***")] - - [InlineData ("0 你 4", Alignment.Center, Alignment.Start, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Start, + TextDirection.BottomTop_LeftRight, + @" **4**** ** **** **你*** @@ -5675,7 +6486,12 @@ B")] **0**** ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.End, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.End, + TextDirection.BottomTop_LeftRight, + @" ******* ******* **4**** @@ -5683,7 +6499,12 @@ B")] **你*** ** **** **0****")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Center, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Center, + TextDirection.BottomTop_LeftRight, + @" ******* **4**** ** **** @@ -5691,7 +6512,12 @@ B")] ** **** **0**** *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Fill, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Fill, + TextDirection.BottomTop_LeftRight, + @" **4**** ** **** ** **** @@ -5701,7 +6527,12 @@ B")] **0****")] // BottomTop_RightLeft - [InlineData ("0 2 4", Alignment.Center, Alignment.Start, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Start, + TextDirection.BottomTop_RightLeft, + @" ***4*** *** *** ***2*** @@ -5709,7 +6540,12 @@ B")] ***0*** ******* *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.End, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.End, + TextDirection.BottomTop_RightLeft, + @" ******* ******* ***4*** @@ -5717,7 +6553,12 @@ B")] ***2*** *** *** ***0***")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Center, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Center, + TextDirection.BottomTop_RightLeft, + @" ******* ***4*** *** *** @@ -5725,7 +6566,12 @@ B")] *** *** ***0*** *******")] - [InlineData ("0 2 4", Alignment.Center, Alignment.Fill, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Center, + Alignment.Fill, + TextDirection.BottomTop_RightLeft, + @" ***4*** *** *** *** *** @@ -5733,8 +6579,12 @@ B")] *** *** *** *** ***0***")] - - [InlineData ("0 你 4", Alignment.Center, Alignment.Start, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Start, + TextDirection.BottomTop_RightLeft, + @" **4**** ** **** **你*** @@ -5742,7 +6592,12 @@ B")] **0**** ******* *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.End, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.End, + TextDirection.BottomTop_RightLeft, + @" ******* ******* **4**** @@ -5750,7 +6605,12 @@ B")] **你*** ** **** **0****")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Center, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Center, + TextDirection.BottomTop_RightLeft, + @" ******* **4**** ** **** @@ -5758,7 +6618,12 @@ B")] ** **** **0**** *******")] - [InlineData ("0 你 4", Alignment.Center, Alignment.Fill, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Center, + Alignment.Fill, + TextDirection.BottomTop_RightLeft, + @" **4**** ** **** ** **** @@ -5769,7 +6634,12 @@ B")] // Vertical with alignment.Justified // TopBottom_LeftRight - [InlineData ("0 2 4", Alignment.Fill, Alignment.Start, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Start, + TextDirection.TopBottom_LeftRight, + @" 0****** ****** 2****** @@ -5777,7 +6647,12 @@ B")] 4****** ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.End, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.End, + TextDirection.TopBottom_LeftRight, + @" ******* ******* 0****** @@ -5785,7 +6660,12 @@ B")] 2****** ****** 4******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Center, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Center, + TextDirection.TopBottom_LeftRight, + @" ******* 0****** ****** @@ -5793,7 +6673,12 @@ B")] ****** 4****** *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Fill, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.TopBottom_LeftRight, + @" 0****** ****** ****** @@ -5801,8 +6686,12 @@ B")] ****** ****** 4******")] - - [InlineData ("0 你 4", Alignment.Fill, Alignment.Start, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Start, + TextDirection.TopBottom_LeftRight, + @" 0****** ****** 你***** @@ -5810,7 +6699,12 @@ B")] 4****** ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.End, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.End, + TextDirection.TopBottom_LeftRight, + @" ******* ******* 0****** @@ -5818,7 +6712,12 @@ B")] 你***** ****** 4******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Center, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Center, + TextDirection.TopBottom_LeftRight, + @" ******* 0****** ****** @@ -5826,7 +6725,12 @@ B")] ****** 4****** *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Fill, TextDirection.TopBottom_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.TopBottom_LeftRight, + @" 0****** ****** ****** @@ -5836,7 +6740,12 @@ B")] 4******")] // TopBottom_RightLeft - [InlineData ("0 2 4", Alignment.Fill, Alignment.Start, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Start, + TextDirection.TopBottom_RightLeft, + @" 0****** ****** 2****** @@ -5844,7 +6753,12 @@ B")] 4****** ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.End, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.End, + TextDirection.TopBottom_RightLeft, + @" ******* ******* 0****** @@ -5852,7 +6766,12 @@ B")] 2****** ****** 4******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Center, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Center, + TextDirection.TopBottom_RightLeft, + @" ******* 0****** ****** @@ -5860,7 +6779,12 @@ B")] ****** 4****** *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Fill, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.TopBottom_RightLeft, + @" 0****** ****** ****** @@ -5868,8 +6792,12 @@ B")] ****** ****** 4******")] - - [InlineData ("0 你 4", Alignment.Fill, Alignment.Start, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Start, + TextDirection.TopBottom_RightLeft, + @" 0****** ****** 你***** @@ -5877,7 +6805,12 @@ B")] 4****** ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.End, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.End, + TextDirection.TopBottom_RightLeft, + @" ******* ******* 0****** @@ -5885,7 +6818,12 @@ B")] 你***** ****** 4******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Center, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Center, + TextDirection.TopBottom_RightLeft, + @" ******* 0****** ****** @@ -5893,7 +6831,12 @@ B")] ****** 4****** *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Fill, TextDirection.TopBottom_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.TopBottom_RightLeft, + @" 0****** ****** ****** @@ -5903,7 +6846,12 @@ B")] 4******")] // BottomTop_LeftRight - [InlineData ("0 2 4", Alignment.Fill, Alignment.Start, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Start, + TextDirection.BottomTop_LeftRight, + @" 4****** ****** 2****** @@ -5911,7 +6859,12 @@ B")] 0****** ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.End, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.End, + TextDirection.BottomTop_LeftRight, + @" ******* ******* 4****** @@ -5919,7 +6872,12 @@ B")] 2****** ****** 0******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Center, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Center, + TextDirection.BottomTop_LeftRight, + @" ******* 4****** ****** @@ -5927,7 +6885,12 @@ B")] ****** 0****** *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Fill, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.BottomTop_LeftRight, + @" 4****** ****** ****** @@ -5935,8 +6898,12 @@ B")] ****** ****** 0******")] - - [InlineData ("0 你 4", Alignment.Fill, Alignment.Start, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Start, + TextDirection.BottomTop_LeftRight, + @" 4****** ****** 你***** @@ -5944,7 +6911,12 @@ B")] 0****** ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.End, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.End, + TextDirection.BottomTop_LeftRight, + @" ******* ******* 4****** @@ -5952,7 +6924,12 @@ B")] 你***** ****** 0******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Center, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Center, + TextDirection.BottomTop_LeftRight, + @" ******* 4****** ****** @@ -5960,7 +6937,12 @@ B")] ****** 0****** *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Fill, TextDirection.BottomTop_LeftRight, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.BottomTop_LeftRight, + @" 4****** ****** ****** @@ -5970,7 +6952,12 @@ B")] 0******")] // BottomTop_RightLeft - [InlineData ("0 2 4", Alignment.Fill, Alignment.Start, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Start, + TextDirection.BottomTop_RightLeft, + @" 4****** ****** 2****** @@ -5978,7 +6965,12 @@ B")] 0****** ******* *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.End, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.End, + TextDirection.BottomTop_RightLeft, + @" ******* ******* 4****** @@ -5986,7 +6978,12 @@ B")] 2****** ****** 0******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Center, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Center, + TextDirection.BottomTop_RightLeft, + @" ******* 4****** ****** @@ -5994,7 +6991,12 @@ B")] ****** 0****** *******")] - [InlineData ("0 2 4", Alignment.Fill, Alignment.Fill, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 2 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.BottomTop_RightLeft, + @" 4****** ****** ****** @@ -6002,8 +7004,12 @@ B")] ****** ****** 0******")] - - [InlineData ("0 你 4", Alignment.Fill, Alignment.Start, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Start, + TextDirection.BottomTop_RightLeft, + @" 4****** ****** 你***** @@ -6011,7 +7017,12 @@ B")] 0****** ******* *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.End, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.End, + TextDirection.BottomTop_RightLeft, + @" ******* ******* 4****** @@ -6019,7 +7030,12 @@ B")] 你***** ****** 0******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Center, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Center, + TextDirection.BottomTop_RightLeft, + @" ******* 4****** ****** @@ -6027,7 +7043,12 @@ B")] ****** 0****** *******")] - [InlineData ("0 你 4", Alignment.Fill, Alignment.Fill, TextDirection.BottomTop_RightLeft, @" + [InlineData ( + "0 你 4", + Alignment.Fill, + Alignment.Fill, + TextDirection.BottomTop_RightLeft, + @" 4****** ****** ****** @@ -6035,7 +7056,6 @@ B")] ****** ****** 0******")] - public void Draw_Text_Justification (string text, Alignment horizontalTextAlignment, Alignment alignment, TextDirection textDirection, string expectedText) { TextFormatter tf = new () @@ -6047,12 +7067,11 @@ B")] Text = text }; - Application.Driver.FillRect (new Rectangle (0, 0, 7, 7), (Rune)'*'); - tf.Draw (new Rectangle (0, 0, 7, 7), Attribute.Default, Attribute.Default); + Application.Driver.FillRect (new (0, 0, 7, 7), (Rune)'*'); + tf.Draw (new (0, 0, 7, 7), Attribute.Default, Attribute.Default); TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output); } - // Test that changing TextFormatter does not impact View dimensions if Dim.Auto is not in play [Fact] public void Not_Used_TextFormatter_Does_Not_Change_View_Size () @@ -6061,31 +7080,24 @@ B")] { Text = "_1234" }; - Assert.False (view.TextFormatter.AutoSize); Assert.Equal (Size.Empty, view.Frame.Size); view.TextFormatter.Text = "ABC"; - Assert.False (view.TextFormatter.AutoSize); Assert.Equal (Size.Empty, view.Frame.Size); view.TextFormatter.Alignment = Alignment.Fill; - Assert.False (view.TextFormatter.AutoSize); Assert.Equal (Size.Empty, view.Frame.Size); view.TextFormatter.VerticalAlignment = Alignment.Center; - Assert.False (view.TextFormatter.AutoSize); Assert.Equal (Size.Empty, view.Frame.Size); view.TextFormatter.HotKeySpecifier = (Rune)'*'; - Assert.False (view.TextFormatter.AutoSize); Assert.Equal (Size.Empty, view.Frame.Size); view.TextFormatter.Text = "*ABC"; - Assert.False (view.TextFormatter.AutoSize); Assert.Equal (Size.Empty, view.Frame.Size); } - [Fact] public void Not_Used_TextSettings_Do_Not_Change_View_Size () { @@ -6093,27 +7105,21 @@ B")] { Text = "_1234" }; - Assert.False (view.TextFormatter.AutoSize); Assert.Equal (Size.Empty, view.Frame.Size); view.TextAlignment = Alignment.Fill; - Assert.False (view.TextFormatter.AutoSize); Assert.Equal (Size.Empty, view.Frame.Size); view.VerticalTextAlignment = Alignment.Center; - Assert.False (view.TextFormatter.AutoSize); Assert.Equal (Size.Empty, view.Frame.Size); view.HotKeySpecifier = (Rune)'*'; - Assert.False (view.TextFormatter.AutoSize); Assert.Equal (Size.Empty, view.Frame.Size); view.Text = "*ABC"; - Assert.False (view.TextFormatter.AutoSize); Assert.Equal (Size.Empty, view.Frame.Size); } - #region FormatAndGetSizeTests // TODO: Add multi-line examples @@ -6123,47 +7129,96 @@ B")] [SetupFakeDriver] [InlineData ("界1234", 10, 10, TextDirection.LeftRight_TopBottom, 6, 1, @"界1234")] [InlineData ("01234", 10, 10, TextDirection.LeftRight_TopBottom, 5, 1, @"01234")] - [InlineData ("界1234", 10, 10, TextDirection.TopBottom_LeftRight, 2, 5, """ - 界 - 1 - 2 - 3 - 4 - """)] - [InlineData ("01234", 10, 10, TextDirection.TopBottom_LeftRight, 1, 5, """ - 0 - 1 - 2 - 3 - 4 - """)] - [InlineData ("界1234", 3, 3, TextDirection.LeftRight_TopBottom, 3, 2, """ - 界1 - 234 - """)] - [InlineData ("01234", 3, 3, TextDirection.LeftRight_TopBottom, 3, 2, """ - 012 - 34 - """)] - [InlineData ("界1234", 3, 3, TextDirection.TopBottom_LeftRight, 3, 3, """ - 界3 - 1 4 - 2 - """)] - [InlineData ("01234", 3, 3, TextDirection.TopBottom_LeftRight, 2, 3, """ - 03 - 14 - 2 - """)] - + [InlineData ( + "界1234", + 10, + 10, + TextDirection.TopBottom_LeftRight, + 2, + 5, + """ + 界 + 1 + 2 + 3 + 4 + """)] + [InlineData ( + "01234", + 10, + 10, + TextDirection.TopBottom_LeftRight, + 1, + 5, + """ + 0 + 1 + 2 + 3 + 4 + """)] + [InlineData ( + "界1234", + 3, + 3, + TextDirection.LeftRight_TopBottom, + 3, + 2, + """ + 界1 + 234 + """)] + [InlineData ( + "01234", + 3, + 3, + TextDirection.LeftRight_TopBottom, + 3, + 2, + """ + 012 + 34 + """)] + [InlineData ( + "界1234", + 3, + 3, + TextDirection.TopBottom_LeftRight, + 3, + 3, + """ + 界3 + 1 4 + 2 + """)] + [InlineData ( + "01234", + 3, + 3, + TextDirection.TopBottom_LeftRight, + 2, + 3, + """ + 03 + 14 + 2 + """)] [InlineData ("01234", 2, 1, TextDirection.LeftRight_TopBottom, 2, 1, @"01")] - - public void FormatAndGetSize_Returns_Correct_Size (string text, int width, int height, TextDirection direction, int expectedWidth, int expectedHeight, string expectedDraw) + public void FormatAndGetSize_Returns_Correct_Size ( + string text, + int width, + int height, + TextDirection direction, + int expectedWidth, + int expectedHeight, + string expectedDraw + ) { TextFormatter tf = new () { Direction = direction, - Size = new (width, height), + Width = width, + Height = height, Text = text }; Assert.True (tf.WordWrap); @@ -6179,33 +7234,69 @@ B")] [SetupFakeDriver] [InlineData ("界1234", 10, 10, TextDirection.LeftRight_TopBottom, 6, 1, @"界1234")] [InlineData ("01234", 10, 10, TextDirection.LeftRight_TopBottom, 5, 1, @"01234")] - [InlineData ("界1234", 10, 10, TextDirection.TopBottom_LeftRight, 2, 5, """ - 界 - 1 - 2 - 3 - 4 - """)] - [InlineData ("01234", 10, 10, TextDirection.TopBottom_LeftRight, 1, 5, """ - 0 - 1 - 2 - 3 - 4 - """)] + [InlineData ( + "界1234", + 10, + 10, + TextDirection.TopBottom_LeftRight, + 2, + 5, + """ + 界 + 1 + 2 + 3 + 4 + """)] + [InlineData ( + "01234", + 10, + 10, + TextDirection.TopBottom_LeftRight, + 1, + 5, + """ + 0 + 1 + 2 + 3 + 4 + """)] [InlineData ("界1234", 3, 3, TextDirection.LeftRight_TopBottom, 3, 1, @"界1")] [InlineData ("01234", 3, 3, TextDirection.LeftRight_TopBottom, 3, 1, @"012")] - [InlineData ("界1234", 3, 3, TextDirection.TopBottom_LeftRight, 2, 3, """ - 界 - 1 - 2 - """)] - [InlineData ("01234", 3, 3, TextDirection.TopBottom_LeftRight, 1, 3, """ - 0 - 1 - 2 - """)] - public void FormatAndGetSize_WordWrap_False_Returns_Correct_Size (string text, int width, int height, TextDirection direction, int expectedWidth, int expectedHeight, string expectedDraw) + [InlineData ( + "界1234", + 3, + 3, + TextDirection.TopBottom_LeftRight, + 2, + 3, + """ + 界 + 1 + 2 + """)] + [InlineData ( + "01234", + 3, + 3, + TextDirection.TopBottom_LeftRight, + 1, + 3, + """ + 0 + 1 + 2 + """)] + public void FormatAndGetSize_WordWrap_False_Returns_Correct_Size ( + string text, + int width, + int height, + TextDirection direction, + int expectedWidth, + int expectedHeight, + string expectedDraw + ) { TextFormatter tf = new () { diff --git a/UnitTests/View/DrawTests.cs b/UnitTests/View/DrawTests.cs index 272d78780..930876482 100644 --- a/UnitTests/View/DrawTests.cs +++ b/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 diff --git a/UnitTests/View/Layout/Dim.AutoTests.cs b/UnitTests/View/Layout/Dim.AutoTests.cs index 27ccc197d..431b673a5 100644 --- a/UnitTests/View/Layout/Dim.AutoTests.cs +++ b/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)] diff --git a/UnitTests/View/Layout/Pos.Tests.cs b/UnitTests/View/Layout/Pos.Tests.cs index 9a98cf8ff..c3e6bb9a2 100644 --- a/UnitTests/View/Layout/Pos.Tests.cs +++ b/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 () diff --git a/UnitTests/View/TextTests.cs b/UnitTests/View/TextTests.cs index a54664d49..201336d34 100644 --- a/UnitTests/View/TextTests.cs +++ b/UnitTests/View/TextTests.cs @@ -5,8 +5,7 @@ using Xunit.Abstractions; namespace Terminal.Gui.ViewTests; /// -/// Tests of the and properties (independent of -/// AutoSize). +/// Tests of the and properties. /// 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 } diff --git a/UnitTests/View/ViewTests.cs b/UnitTests/View/ViewTests.cs index bb7d3747a..877a72292 100644 --- a/UnitTests/View/ViewTests.cs +++ b/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 (); diff --git a/UnitTests/Views/LabelTests.cs b/UnitTests/Views/LabelTests.cs index baeab4aa9..9bfce36f7 100644 --- a/UnitTests/Views/LabelTests.cs +++ b/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