mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 08:50:25 +01:00
fixed culture issue
This commit is contained in:
@@ -97,12 +97,15 @@ namespace Terminal.Gui {
|
||||
[Fact]
|
||||
public void Percent_SetsValue ()
|
||||
{
|
||||
var dim = Dim.Percent (0);
|
||||
Assert.Equal ("Dim.Factor(0)", dim.ToString ());
|
||||
dim = Dim.Percent (0.5F);
|
||||
Assert.Equal ("Dim.Factor(0.005)", dim.ToString ());
|
||||
dim = Dim.Percent (100);
|
||||
Assert.Equal ("Dim.Factor(1)", dim.ToString ());
|
||||
float f = 0;
|
||||
var dim = Dim.Percent (f);
|
||||
Assert.Equal ($"Dim.Factor({f/100:0.###})", dim.ToString ());
|
||||
f = 0.5F;
|
||||
dim = Dim.Percent (f);
|
||||
Assert.Equal ($"Dim.Factor({f/100:0.###})", dim.ToString ());
|
||||
f = 100;
|
||||
dim = Dim.Percent (f);
|
||||
Assert.Equal ($"Dim.Factor({f/100:0.###})", dim.ToString ());
|
||||
}
|
||||
|
||||
// TODO: Other Dim.Percent tests (e.g. Equal?)
|
||||
|
||||
@@ -155,12 +155,15 @@ namespace Terminal.Gui {
|
||||
[Fact]
|
||||
public void Percent_SetsValue ()
|
||||
{
|
||||
var pos = Pos.Percent (0);
|
||||
Assert.Equal ("Pos.Factor(0)", pos.ToString ());
|
||||
pos = Pos.Percent (0.5F);
|
||||
Assert.Equal ("Pos.Factor(0.005)", pos.ToString ());
|
||||
pos = Pos.Percent (100);
|
||||
Assert.Equal ("Pos.Factor(1)", pos.ToString ());
|
||||
float f = 0;
|
||||
var pos = Pos.Percent (f);
|
||||
Assert.Equal ($"Pos.Factor({f / 100:0.###})", pos.ToString ());
|
||||
f = 0.5F;
|
||||
pos = Pos.Percent (f);
|
||||
Assert.Equal ($"Pos.Factor({f / 100:0.###})", pos.ToString ());
|
||||
f = 100;
|
||||
pos = Pos.Percent (f);
|
||||
Assert.Equal ($"Pos.Factor({f / 100:0.###})", pos.ToString ());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user