[Tests] Fix an monotouch-test test that landed broken. (#15503)
This commit is contained in:
Родитель
12925a7952
Коммит
161de84bcf
|
@ -30,7 +30,11 @@ namespace MonoTouchFixtures.UIKit {
|
|||
{
|
||||
using (var stpf = new UISimpleTextPrintFormatter ()) {
|
||||
Assert.That (stpf.Handle, Is.Not.EqualTo (IntPtr.Zero), "Handle");
|
||||
if (TestRuntime.CheckXcodeVersion (11, 0)) {
|
||||
if (TestRuntime.CheckXcodeVersion (14, 0)) {
|
||||
Assert.NotNull (stpf.Color, "Color");
|
||||
Assert.NotNull (stpf.Font, "Font");
|
||||
Assert.That (stpf.TextAlignment, Is.EqualTo (UITextAlignment.Natural), "TextAlignment");
|
||||
} else if (TestRuntime.CheckXcodeVersion (11, 0)) {
|
||||
Assert.NotNull (stpf.Color, "Color");
|
||||
Assert.Null (stpf.Font, "Font");
|
||||
Assert.That (stpf.TextAlignment, Is.EqualTo (UITextAlignment.Natural), "TextAlignment");
|
||||
|
@ -62,11 +66,7 @@ namespace MonoTouchFixtures.UIKit {
|
|||
Assert.That (stpf.Color, Is.EqualTo (UIColor.Black), "Color");
|
||||
Assert.That (stpf.TextAlignment, Is.EqualTo (UITextAlignment.Left), "TextAlignment");
|
||||
}
|
||||
if (TestRuntime.CheckXcodeVersion (14, 0)) {
|
||||
Assert.Null (stpf.Font, "Font");
|
||||
} else {
|
||||
Assert.NotNull (stpf.Font, "Font");
|
||||
}
|
||||
Assert.That (stpf.Text, Is.EqualTo ("Xamarin"), "Text");
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче