Skip to content

Commit 76c956b

Browse files
committed
Fix BadContent test
1 parent 7fce557 commit 76c956b

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

MonoGame.Framework.Content.Pipeline/TextureImporter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public override TextureContent Import(string filename, ContentImporterContext co
8484
var fBitmap = FreeImage.Load(format, filename, 0);
8585
//if freeimage can not recognize the image type
8686
if(format == FREE_IMAGE_FORMAT.FIF_UNKNOWN)
87-
throw new ContentLoadException("TextureImporter failed to load '" + filename + "'");
87+
throw new InvalidContentException("TextureImporter failed to load '" + filename + "'");
8888
//if freeimage can recognize the file headers but can't read its contents
8989
else if(fBitmap == IntPtr.Zero)
9090
throw new InvalidContentException("TextureImporter couldn't understand the contents of '" + filename + "'", output.Identity);

Tests/Assets/Textures/rgbf.tif

-6.56 KB
Binary file not shown.

Tools/MonoGame.Tools.Tests/TextureImporterTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ public void ImportTif( )
105105
/// Note that the image was created with Freeimage from a bitmap
106106
/// </summary>
107107
[Test]
108-
#if MACOS || LINUX
109-
[Ignore("Does not work on Unix based systems. Its odd the test passes?")]
110-
#endif
111108
public void ImportImageWithBadContent( )
112109
{
113110
Assert.Throws(typeof(InvalidContentException), ( ) => ImportStandard("Assets/Textures/rgbf.tif", SurfaceFormat.Vector4, 64));

0 commit comments

Comments
 (0)