Remove duplicate tests, fix typo
authorFrederik Carlier <frederik.carlier@quamotion.mobi>
Wed, 20 Sep 2017 19:12:58 +0000 (21:12 +0200)
committerFrederik Carlier <frederik.carlier@quamotion.mobi>
Thu, 21 Sep 2017 21:33:33 +0000 (23:33 +0200)
Commit migrated from https://github.com/dotnet/corefx/commit/d284084addaee43add43a0a31272352eb25aeb11

src/libraries/System.Drawing.Common/tests/Imaging/MetafileTests.cs
src/libraries/System.Drawing.Common/tests/mono/System.Imaging/MetafileTest.cs

index 145eaf0..21a33ee 100644 (file)
@@ -131,7 +131,6 @@ namespace System.Drawing.Imaging.Tests
             yield return new object[] { EmfType.EmfPlusOnly };
         }
 
-        [ActiveIssue(20884, TestPlatforms.AnyUnix)]
         [ConditionalTheory(Helpers.GdiplusIsAvailable)]
         [MemberData(nameof(EmfType_TestData))]
         public void Ctor_IntPtrEmfType_Success(EmfType emfType)
@@ -152,7 +151,6 @@ namespace System.Drawing.Imaging.Tests
             yield return new object[] { (EmfType)int.MinValue };
         }
 
-        [ActiveIssue(20884, TestPlatforms.AnyUnix)]
         [ConditionalTheory(Helpers.GdiplusIsAvailable)]
         [MemberData(nameof(EmfType_Invalid_TestData))]
         public void Ctor_IntPtrInvalidEmfType_ThrowsArgumentException(EmfType emfType)
@@ -389,7 +387,6 @@ namespace System.Drawing.Imaging.Tests
             File.Delete(fileName);
         }
 
-        [ActiveIssue(20884, TestPlatforms.AnyUnix)]
         [ConditionalTheory(Helpers.GdiplusIsAvailable)]
         [MemberData(nameof(EmfType_TestData))]
         public void Ctor_StringIntPtrEmfType_Success(EmfType emfType)
@@ -918,7 +915,6 @@ namespace System.Drawing.Imaging.Tests
             }
         }
 
-        [ActiveIssue(20884, TestPlatforms.AnyUnix)]
         [ConditionalFact(Helpers.GdiplusIsAvailable)]
         public void Static_GetMetafileHeader_String_ReturnsExpected()
         {
@@ -978,7 +974,6 @@ namespace System.Drawing.Imaging.Tests
             }
         }
 
-        [ActiveIssue(20884, TestPlatforms.AnyUnix)]
         [ConditionalFact(Helpers.GdiplusIsAvailable)]
         public void GetMetafileHeader_ReturnsExpected()
         {
@@ -987,7 +982,7 @@ namespace System.Drawing.Imaging.Tests
                 MetafileHeader headerA = metafile.GetMetafileHeader();
                 MetafileHeader headerB = metafile.GetMetafileHeader();
                 AssertMetafileHeader(headerA);
-                Assert.False(ReferenceEquals(headerA, headerB));
+                Assert.NotSame(headerA, headerB);
             }
         }
 
index 64a8d0f..f58f13d 100644 (file)
@@ -99,19 +99,6 @@ namespace MonoTests.System.Drawing.Imaging
         }
 
         [ConditionalFact(Helpers.GdiplusIsAvailable)]
-        public void GetMetafileHeader_WmfPlaceable()
-        {
-            using (Metafile mf = new Metafile(Helpers.GetTestBitmapPath(WmfPlaceable)))
-            {
-                MetafileHeader header1 = mf.GetMetafileHeader();
-                Check_MetafileHeader_WmfPlaceable(header1);
-
-                MetafileHeader header2 = mf.GetMetafileHeader();
-                Assert.NotSame(header1, header2));
-            }
-        }
-
-        [ConditionalFact(Helpers.GdiplusIsAvailable)]
         public void GetMetafileHeader_FromFile_WmfPlaceable()
         {
             using (Metafile mf = new Metafile(Helpers.GetTestBitmapPath(WmfPlaceable)))
@@ -123,7 +110,7 @@ namespace MonoTests.System.Drawing.Imaging
                 Check_MetaHeader_WmfPlaceable(mh1);
 
                 MetaHeader mh2 = mf.GetMetafileHeader().WmfHeader;
-                Assert.NotSame(mh1, mh2));
+                Assert.NotSame(mh1, mh2);
             }
         }
 
@@ -140,7 +127,7 @@ namespace MonoTests.System.Drawing.Imaging
                 Check_MetaHeader_WmfPlaceable(mh1);
 
                 MetaHeader mh2 = mf.GetMetafileHeader().WmfHeader;
-                Assert.NotSame(mh1, mh2));
+                Assert.NotSame(mh1, mh2);
             }
         }
 
@@ -158,7 +145,7 @@ namespace MonoTests.System.Drawing.Imaging
                 Check_MetaHeader_WmfPlaceable(mh1);
 
                 MetaHeader mh2 = mf.GetMetafileHeader().WmfHeader;
-                Assert.NotSame(mh1, mh2));
+                Assert.NotSame(mh1, mh2);
             }
         }
 
@@ -216,14 +203,6 @@ namespace MonoTests.System.Drawing.Imaging
                 Check_MetafileHeader_Emf(header1);
             }
         }
-
-        [ConditionalFact(Helpers.GdiplusIsAvailable)]
-        public void Static_GetMetafileHeader_Filename()
-        {
-            string filename = Helpers.GetTestBitmapPath(WmfPlaceable);
-            MetafileHeader header = Metafile.GetMetafileHeader(filename);
-            Check_MetafileHeader_WmfPlaceable(header);
-        }
     }
 
     public class MetafileFulltrustTest
@@ -274,30 +253,6 @@ namespace MonoTests.System.Drawing.Imaging
         }
 
         [ConditionalFact(Helpers.GdiplusIsAvailable)]
-        public void Metafile_IntPtrEmfType_Invalid()
-        {
-            Assert.Throws<ArgumentException>(() => Metafile_IntPtrEmfType((EmfType)Int32.MinValue));
-        }
-
-        [ConditionalFact(Helpers.GdiplusIsAvailable)]
-        public void Metafile_IntPtrEmfType_EmfOnly()
-        {
-            Metafile_IntPtrEmfType(EmfType.EmfOnly);
-        }
-
-        [ConditionalFact(Helpers.GdiplusIsAvailable)]
-        public void Metafile_IntPtrEmfType_EmfPlusDual()
-        {
-            Metafile_IntPtrEmfType(EmfType.EmfPlusDual);
-        }
-
-        [ConditionalFact(Helpers.GdiplusIsAvailable)]
-        public void Metafile_IntPtrEmfType_EmfPlusOnly()
-        {
-            Metafile_IntPtrEmfType(EmfType.EmfPlusOnly);
-        }
-
-        [ConditionalFact(Helpers.GdiplusIsAvailable)]
         public void Metafile_IntPtrRectangle_Empty()
         {
             using (Bitmap bmp = new Bitmap(10, 10, PixelFormat.Format32bppArgb))
@@ -436,24 +391,6 @@ namespace MonoTests.System.Drawing.Imaging
         }
 
         [ConditionalFact(Helpers.GdiplusIsAvailable)]
-        public void CreateFilename_MultipleGraphics_EmfOnly()
-        {
-            Assert.Throws<OutOfMemoryException>(() => CreateFilename(EmfType.EmfOnly, false));
-        }
-
-        [ConditionalFact(Helpers.GdiplusIsAvailable)]
-        public void CreateFilename_MultipleGraphics_EmfPlusDual()
-        {
-            Assert.Throws<OutOfMemoryException>(() => CreateFilename(EmfType.EmfPlusDual, false));
-        }
-
-        [ConditionalFact(Helpers.GdiplusIsAvailable)]
-        public void CreateFilename_MultipleGraphics_EmfPlusOnly()
-        {
-            Assert.Throws<OutOfMemoryException>(() => CreateFilename(EmfType.EmfPlusOnly, false));
-        }
-
-        [ConditionalFact(Helpers.GdiplusIsAvailable)]
         public void Measure()
         {
             Font test_font = new Font(FontFamily.GenericMonospace, 12);