|
@@ -3060,8 +3060,6 @@ Demo Simple Rune
|
|
|
Application.Top.Add (label);
|
|
|
Application.Begin (Application.Top);
|
|
|
|
|
|
- Assert.True (label.AutoSize);
|
|
|
- Assert.Equal (new Rect (0, 0, 1, 16), label.Frame);
|
|
|
Assert.NotNull (label.Width);
|
|
|
Assert.NotNull (label.Height);
|
|
|
|
|
@@ -3115,9 +3113,6 @@ e
|
|
|
Application.Top.Add (label);
|
|
|
Application.Begin (Application.Top);
|
|
|
|
|
|
- Assert.True (label.AutoSize);
|
|
|
- Assert.Equal (new Rect (0, 0, 2, 7), label.Frame);
|
|
|
-
|
|
|
var expected = @"
|
|
|
デ
|
|
|
モ
|
|
@@ -4176,7 +4171,7 @@ This TextFormatter (tf2) is rewritten.
|
|
|
((FakeDriver)Application.Driver).SetBufferSize (10, 4);
|
|
|
|
|
|
var expected = @"
|
|
|
-┌ 𝔹 ────┐
|
|
|
+┌┤𝔹├────┐
|
|
|
│𝔹 │
|
|
|
│𝔹 │
|
|
|
└────────┘";
|
|
@@ -4194,7 +4189,7 @@ This TextFormatter (tf2) is rewritten.
|
|
|
};
|
|
|
|
|
|
TestHelpers.AssertDriverColorsAre (@"
|
|
|
-0222200000
|
|
|
+0022000000
|
|
|
0000000000
|
|
|
0111000000
|
|
|
0000000000", expectedColors);
|
|
@@ -4292,7 +4287,8 @@ t ", output);
|
|
|
[Fact, AutoInitShutdown]
|
|
|
public void Draw_Negative_Bounds_Horizontal_Without_New_Lines ()
|
|
|
{
|
|
|
- var subView = new View () { Id = "subView", Y = 1, Width = 7, Text = "subView" };
|
|
|
+ // BUGBUG: This previously assumed the default height of a View was 1.
|
|
|
+ var subView = new View () { Id = "subView", Y = 1, Width = 7, Height = 1, Text = "subView" };
|
|
|
var view = new View () { Id = "view", Width = 20, Height = 2, Text = "01234567890123456789" };
|
|
|
view.Add (subView);
|
|
|
var content = new View () { Id = "content", Width = 20, Height = 20 };
|
|
@@ -4301,7 +4297,13 @@ t ", output);
|
|
|
container.Add (content);
|
|
|
var top = Application.Top;
|
|
|
top.Add (container);
|
|
|
- Application.Driver.Clip = container.Frame;
|
|
|
+ // BUGBUG: v2 - it's bogus to reference .Frame before BeginInit. And why is the clip being set anyway???
|
|
|
+
|
|
|
+ void Top_LayoutComplete (object sender, LayoutEventArgs e)
|
|
|
+ {
|
|
|
+ Application.Driver.Clip = container.Frame;
|
|
|
+ }
|
|
|
+ top.LayoutComplete += Top_LayoutComplete;
|
|
|
Application.Begin (top);
|
|
|
|
|
|
TestHelpers.AssertDriverContentsWithFrameAre (@"
|
|
@@ -4329,6 +4331,7 @@ t ", output);
|
|
|
TestHelpers.AssertDriverContentsWithFrameAre ("", output);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
[Fact, AutoInitShutdown]
|
|
|
public void Draw_Negative_Bounds_Horizontal_With_New_Lines ()
|
|
|
{
|