New test.
[mono.git] / mcs / class / System.Drawing / Test / DrawingTest / Test / Pen.cs
index be0dda8967beeac09e5a4344deeb7e0510a11cb1..be83d18e83397a5f1b9c69031c9e304468f77cce 100644 (file)
@@ -26,6 +26,13 @@ namespace Test.Sys.Drawing
                        DrawingTest.ShowForms = false;\r
                }\r
 \r
+               [TearDown]\r
+               public void TearDown ()\r
+               {\r
+                       if (t != null)\r
+                               t.Dispose ();\r
+               }\r
+\r
                #region InitAlignment\r
                [Test]\r
                public void InitAlignment () {\r
@@ -119,9 +126,7 @@ namespace Test.Sys.Drawing
                #region DashCustomStyle\r
                //The following tests DashOffset and DashPattern\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: Bug in dashed line\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void DashCustomStyle_1 () {\r
                        p.DashStyle = DashStyle.Custom;\r
                        p.Width = 10;\r
@@ -144,9 +149,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: Bug in dashed line\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void DashCustomStyle_4 () {\r
                        p.DashPattern = new float [] {2, 3, 1.15F, 0.05F, 1.74321F};\r
                        p.DashOffset = 10.2F;\r
@@ -155,9 +158,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: Bug in dashed line\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void DashCustomStyle_5 () {\r
                        p.DashPattern = new float [] {2, 3, 1.15F, 0.05F, 1.74321F};\r
                        p.DashOffset = 10.2F;\r
@@ -169,9 +170,6 @@ namespace Test.Sys.Drawing
 \r
                #region DashCapTest\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: Bug in dashed line\r
-#endif\r
                public void DashCapTest_Flat () {\r
                        p.Width = 15;\r
                        Assert.AreEqual (DashCap.Flat, p.DashCap);\r
@@ -181,9 +179,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: Bug in dashed line\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void DashCapTest_Round () {\r
                        p.Width = 15;\r
                        p.DashStyle = DashStyle.DashDot;\r
@@ -193,9 +189,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] // FIXME: DashCap.Triangle is not sopported by GH\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void DashCapTest_Triangle () {\r
                        p.Width = 15;\r
                        p.DashStyle = DashStyle.DashDot;\r
@@ -236,9 +230,6 @@ namespace Test.Sys.Drawing
 \r
                #region LineJoin Miter\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] // FIXME: Currently Only MiterClipper is sopported by GH\r
-#endif\r
                public void LineJoinTest_Miter_1 () {\r
                        p.LineJoin = LineJoin.Miter;\r
                        Point [] points = new Point [] {\r
@@ -251,9 +242,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] // FIXME: Currently Only MiterClipper is sopported by GH\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void LineJoinTest_Miter_2 () {\r
                        p.LineJoin = LineJoin.Miter;\r
                        Point [] points = new Point [] {\r
@@ -266,9 +255,6 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] // FIXME: Currently Only MiterClipper is sopported by GH\r
-#endif\r
                public void LineJoinTest_Miter_3 () {\r
                        p.LineJoin = LineJoin.Miter;\r
                        Point [] points = new Point [] {\r
@@ -417,9 +403,7 @@ namespace Test.Sys.Drawing
                }\r
 \r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: Bug in pen aligment\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void PenAlignmentTest_3 () {\r
                        Point [] points = new Point [] {\r
                                                                                           new Point (30, 30), new Point (100, 100), new Point (170, 30),\r
@@ -553,9 +537,6 @@ namespace Test.Sys.Drawing
                \r
                #region Line StartCap\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
                public void StartCap_Flat() {\r
                        Assert.AreEqual(LineCap.Flat, p.StartCap);\r
                        p.StartCap = LineCap.Flat;\r
@@ -566,9 +547,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void StartCap_Round() {\r
                        p.StartCap = LineCap.Round;\r
                        p.Width = 25;\r
@@ -578,9 +557,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void StartCap_Square() {\r
                        p.StartCap = LineCap.Square;\r
                        p.Width = 25;\r
@@ -590,9 +567,6 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
                public void StartCap_AnchorMask() {\r
                        p.StartCap = LineCap.AnchorMask;\r
                        p.Width = 25;\r
@@ -602,9 +576,6 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
                public void StartCap_ArrowAnchor() {\r
                        p.StartCap = LineCap.ArrowAnchor;\r
                        p.Width = 25;\r
@@ -614,9 +585,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void StartCap_DiamondAnchor() {\r
                        p.StartCap = LineCap.DiamondAnchor;\r
                        p.Width = 25;\r
@@ -626,9 +595,6 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
                public void StartCap_NoAnchor() {\r
                        p.StartCap = LineCap.NoAnchor;\r
                        p.Width = 25;\r
@@ -638,9 +604,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void StartCap_RoundAnchor() {\r
                        p.StartCap = LineCap.RoundAnchor;\r
                        p.Width = 25;\r
@@ -650,9 +614,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void StartCap_SquareAnchor() {\r
                        p.StartCap = LineCap.SquareAnchor;\r
                        p.Width = 25;\r
@@ -662,9 +624,6 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
                public void StartCap_Triangle() {\r
                        p.StartCap = LineCap.Triangle;\r
                        p.Width = 25;\r
@@ -674,9 +633,6 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
                public void StartCap_Custom() {\r
                        p.StartCap = LineCap.Custom;\r
                        p.Width = 25;\r
@@ -689,9 +645,6 @@ namespace Test.Sys.Drawing
 \r
                #region Line EndCap\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
                public void EndCap_Flat() \r
                {\r
                        Assert.AreEqual(LineCap.Flat, p.EndCap);\r
@@ -703,9 +656,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void EndCap_Round() \r
                {\r
                        p.EndCap = LineCap.Round;\r
@@ -716,9 +667,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void EndCap_Square() {\r
                        p.EndCap = LineCap.Square;\r
                        p.Width = 25;\r
@@ -728,9 +677,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void EndCap_AnchorMask() {\r
                        p.EndCap = LineCap.AnchorMask;\r
                        p.Width = 25;\r
@@ -740,9 +687,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void EndCap_ArrowAnchor() {\r
                        p.EndCap = LineCap.ArrowAnchor;\r
                        p.Width = 25;\r
@@ -752,9 +697,6 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
                public void EndCap_DiamondAnchor() {\r
                        p.EndCap = LineCap.DiamondAnchor;\r
                        p.Width = 25;\r
@@ -764,9 +706,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void EndCap_NoAnchor() {\r
                        p.EndCap = LineCap.NoAnchor;\r
                        p.Width = 25;\r
@@ -776,9 +716,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void EndCap_RoundAnchor() {\r
                        p.EndCap = LineCap.RoundAnchor;\r
                        p.Width = 25;\r
@@ -788,9 +726,6 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
                public void EndCap_SquareAnchor() {\r
                        p.EndCap = LineCap.SquareAnchor;\r
                        p.Width = 25;\r
@@ -800,9 +735,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void EndCap_Triangle() {\r
                        p.EndCap = LineCap.Triangle;\r
                        p.Width = 25;\r
@@ -812,9 +745,7 @@ namespace Test.Sys.Drawing
                        Assert.IsTrue (t.Compare (TOLERANCE));\r
                }\r
                [Test]\r
-#if TARGET_JVM\r
-               [Category ("NotWorking")] //FIXME: cannot apply start or end line caps separately\r
-#endif\r
+               [Category ("NotWorking")]\r
                public void EndCap_Custom() {\r
                        p.EndCap = LineCap.Custom;\r
                        p.Width = 25;\r