|
@@ -83,11 +83,11 @@ namespace Terminal.Gui.TypeTests {
|
|
|
var testVal = Rect.Empty;
|
|
|
testVal = Rect.Empty;
|
|
|
dim = Dim.Width (new View (testVal));
|
|
|
- Assert.Equal ($"DimView(Width,View()({{X={testVal.X},Y={testVal.Y},Width={testVal.Width},Height={testVal.Height}}}))", dim.ToString ());
|
|
|
+ Assert.Equal ($"View(Width,View()({{X={testVal.X},Y={testVal.Y},Width={testVal.Width},Height={testVal.Height}}}))", dim.ToString ());
|
|
|
|
|
|
testVal = new Rect (1, 2, 3, 4);
|
|
|
dim = Dim.Width (new View (testVal));
|
|
|
- Assert.Equal ($"DimView(Width,View()({{X={testVal.X},Y={testVal.Y},Width={testVal.Width},Height={testVal.Height}}}))", dim.ToString ());
|
|
|
+ Assert.Equal ($"View(Width,View()({{X={testVal.X},Y={testVal.Y},Width={testVal.Width},Height={testVal.Height}}}))", dim.ToString ());
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
@@ -141,11 +141,11 @@ namespace Terminal.Gui.TypeTests {
|
|
|
var testVal = Rect.Empty;
|
|
|
testVal = Rect.Empty;
|
|
|
dim = Dim.Height (new View (testVal));
|
|
|
- Assert.Equal ($"DimView(Height,View()({{X={testVal.X},Y={testVal.Y},Width={testVal.Width},Height={testVal.Height}}}))", dim.ToString ());
|
|
|
+ Assert.Equal ($"View(Height,View()({{X={testVal.X},Y={testVal.Y},Width={testVal.Width},Height={testVal.Height}}}))", dim.ToString ());
|
|
|
|
|
|
testVal = new Rect (1, 2, 3, 4);
|
|
|
dim = Dim.Height (new View (testVal));
|
|
|
- Assert.Equal ($"DimView(Height,View()({{X={testVal.X},Y={testVal.Y},Width={testVal.Width},Height={testVal.Height}}}))", dim.ToString ());
|
|
|
+ Assert.Equal ($"View(Height,View()({{X={testVal.X},Y={testVal.Y},Width={testVal.Width},Height={testVal.Height}}}))", dim.ToString ());
|
|
|
}
|
|
|
|
|
|
// TODO: Other Dim.Height tests (e.g. Equal?)
|
|
@@ -435,12 +435,12 @@ namespace Terminal.Gui.TypeTests {
|
|
|
Assert.Equal (49, f2.Frame.Width); // 50-1=49
|
|
|
Assert.Equal (5, f2.Frame.Height);
|
|
|
|
|
|
- Assert.Equal ("Combine(DimView(Width,FrameView()({X=0,Y=0,Width=49,Height=5}))-Absolute(2))", v1.Width.ToString ());
|
|
|
+ Assert.Equal ("Combine(View(Width,FrameView()({X=0,Y=0,Width=49,Height=5}))-Absolute(2))", v1.Width.ToString ());
|
|
|
Assert.Equal ("Combine(Fill(0)-Absolute(2))", v1.Height.ToString ());
|
|
|
Assert.Equal (47, v1.Frame.Width); // 49-2=47
|
|
|
Assert.Equal (89, v1.Frame.Height); // 98-5-2-2=89
|
|
|
|
|
|
- Assert.Equal ("Combine(DimView(Width,FrameView()({X=49,Y=0,Width=49,Height=5}))-Absolute(2))", v2.Width.ToString ());
|
|
|
+ Assert.Equal ("Combine(View(Width,FrameView()({X=49,Y=0,Width=49,Height=5}))-Absolute(2))", v2.Width.ToString ());
|
|
|
Assert.Equal ("Combine(Fill(0)-Absolute(2))", v2.Height.ToString ());
|
|
|
Assert.Equal (47, v2.Frame.Width); // 49-2=47
|
|
|
Assert.Equal (89, v2.Frame.Height); // 98-5-2-2=89
|
|
@@ -455,8 +455,8 @@ namespace Terminal.Gui.TypeTests {
|
|
|
Assert.Equal (50, v4.Frame.Width);
|
|
|
Assert.Equal (50, v4.Frame.Height);
|
|
|
|
|
|
- Assert.Equal ("Combine(DimView(Width,Button()({X=2,Y=7,Width=47,Height=89}))-DimView(Width,Button()({X=0,Y=0,Width=9,Height=9})))", v5.Width.ToString ());
|
|
|
- Assert.Equal ("Combine(DimView(Height,Button()({X=2,Y=7,Width=47,Height=89}))-DimView(Height,Button()({X=0,Y=0,Width=9,Height=9})))", v5.Height.ToString ());
|
|
|
+ Assert.Equal ("Combine(View(Width,Button()({X=2,Y=7,Width=47,Height=89}))-View(Width,Button()({X=0,Y=0,Width=9,Height=9})))", v5.Width.ToString ());
|
|
|
+ Assert.Equal ("Combine(View(Height,Button()({X=2,Y=7,Width=47,Height=89}))-View(Height,Button()({X=0,Y=0,Width=9,Height=9})))", v5.Height.ToString ());
|
|
|
Assert.Equal (38, v5.Frame.Width); // 47-9=38
|
|
|
Assert.Equal (80, v5.Frame.Height); // 89-9=80
|
|
|
|
|
@@ -487,13 +487,13 @@ namespace Terminal.Gui.TypeTests {
|
|
|
Assert.Equal (5, f2.Frame.Height);
|
|
|
|
|
|
v1.Text = "Button1";
|
|
|
- Assert.Equal ("Combine(DimView(Width,FrameView()({X=0,Y=0,Width=99,Height=5}))-Absolute(2))", v1.Width.ToString ());
|
|
|
+ Assert.Equal ("Combine(View(Width,FrameView()({X=0,Y=0,Width=99,Height=5}))-Absolute(2))", v1.Width.ToString ());
|
|
|
Assert.Equal ("Combine(Fill(0)-Absolute(2))", v1.Height.ToString ());
|
|
|
Assert.Equal (97, v1.Frame.Width); // 99-2=97
|
|
|
Assert.Equal (189, v1.Frame.Height); // 198-2-7=189
|
|
|
|
|
|
v2.Text = "Button2";
|
|
|
- Assert.Equal ("Combine(DimView(Width,FrameView()({X=99,Y=0,Width=99,Height=5}))-Absolute(2))", v2.Width.ToString ());
|
|
|
+ Assert.Equal ("Combine(View(Width,FrameView()({X=99,Y=0,Width=99,Height=5}))-Absolute(2))", v2.Width.ToString ());
|
|
|
Assert.Equal ("Combine(Fill(0)-Absolute(2))", v2.Height.ToString ());
|
|
|
Assert.Equal (97, v2.Frame.Width); // 99-2=97
|
|
|
Assert.Equal (189, v2.Frame.Height); // 198-2-7=189
|
|
@@ -517,8 +517,8 @@ namespace Terminal.Gui.TypeTests {
|
|
|
Assert.Equal (1, v4.Frame.Height); // 1 because is Dim.DimAbsolute
|
|
|
|
|
|
v5.Text = "Button5";
|
|
|
- Assert.Equal ("Combine(DimView(Width,Button()({X=2,Y=7,Width=97,Height=189}))-DimView(Width,Button()({X=0,Y=0,Width=19,Height=19})))", v5.Width.ToString ());
|
|
|
- Assert.Equal ("Combine(DimView(Height,Button()({X=2,Y=7,Width=97,Height=189}))-DimView(Height,Button()({X=0,Y=0,Width=19,Height=19})))", v5.Height.ToString ());
|
|
|
+ Assert.Equal ("Combine(View(Width,Button()({X=2,Y=7,Width=97,Height=189}))-View(Width,Button()({X=0,Y=0,Width=19,Height=19})))", v5.Width.ToString ());
|
|
|
+ Assert.Equal ("Combine(View(Height,Button()({X=2,Y=7,Width=97,Height=189}))-View(Height,Button()({X=0,Y=0,Width=19,Height=19})))", v5.Height.ToString ());
|
|
|
Assert.Equal (78, v5.Frame.Width); // 97-19=78
|
|
|
Assert.Equal (170, v5.Frame.Height); // 189-19=170
|
|
|
|