Skip to content

Commit

Permalink
[Tests] Fix an monotouch-test test that landed broken. (xamarin#15503)
Browse files Browse the repository at this point in the history
  • Loading branch information
mandel-macaque authored Jul 15, 2022
1 parent 12925a7 commit 161de84
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/monotouch-test/UIKit/SimpleTextPrintFormatterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ public void DefaultCtor ()
{
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");
Expand Down Expand Up @@ -62,11 +66,7 @@ public void StringCtor ()
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.NotNull (stpf.Font, "Font");
Assert.That (stpf.Text, Is.EqualTo ("Xamarin"), "Text");
}
}
Expand Down

0 comments on commit 161de84

Please sign in to comment.