System.Drawing.Tests.FontTests.Equals_TestData C# (CSharp) Method

Equals_TestData() public static method

public static Equals_TestData ( ) : IEnumerable
return IEnumerable
        public static IEnumerable<object[]> Equals_TestData()
        {
            FontFamily family = FontFamily.GenericSansSerif;
            var font = new Font(family, 10, FontStyle.Bold, GraphicsUnit.Inch, 10, gdiVerticalFont: true);

            yield return new object[] { font, font, true };
            // [ActiveIssue("https://github.com/dotnet/runtime/issues/22221", TestPlatforms.AnyUnix)]
            if (PlatformDetection.IsWindows)
            {
                yield return new object[] { font.Clone(), new Font(family, 10, FontStyle.Bold, GraphicsUnit.Inch, 10, gdiVerticalFont: true), false };
            }
            yield return new object[] { font.Clone(), new Font(family, 9, FontStyle.Bold, GraphicsUnit.Inch, 10, gdiVerticalFont: true), false };
            yield return new object[] { font.Clone(), new Font(family, 10, FontStyle.Italic, GraphicsUnit.Millimeter, 10, gdiVerticalFont: true), false };
            yield return new object[] { font.Clone(), new Font(family, 10, FontStyle.Bold, GraphicsUnit.Inch, 9, gdiVerticalFont: true), false };
            yield return new object[] { font.Clone(), new Font(family, 10, FontStyle.Bold, GraphicsUnit.Inch, 10, gdiVerticalFont: false), false };

            yield return new object[] { new Font(family, 10), new object(), false };
            yield return new object[] { new Font(family, 10), null, false };
        }
FontTests