Skip to content

Commit

Permalink
[Nunit] Fixed few Unix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-cpp committed Mar 7, 2016
1 parent 904ad76 commit cc8823c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Build/Projects/MonoGame.Tests.definition
Original file line number Diff line number Diff line change
Expand Up @@ -816,11 +816,11 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

<Content Include="Assets\Textures\logo555.bmp">
<Content Include="Assets\Textures\Logo555.bmp">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

<Content Include="Assets\Textures\logo565.bmp">
<Content Include="Assets\Textures\Logo565.bmp">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 5 additions & 3 deletions Test/ContentPipeline/IntermediateDeserializerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -404,13 +404,15 @@ public void ExternalReferences()
{
Deserialize<ExternalReferences>("17_ExternalReferences.xml", externalReferences =>
{
var pathSeparator = Path.DirectorySeparatorChar.ToString();
Assert.NotNull(externalReferences.Texture);
Assert.IsTrue(externalReferences.Texture.Filename.EndsWith(@"\Xml\grass.tga"));
Assert.IsTrue(externalReferences.Texture.Filename.EndsWith(pathSeparator + "Xml" + pathSeparator + "grass.tga"));
Assert.NotNull(externalReferences.Texture2);
Assert.IsTrue(externalReferences.Texture2.Filename.EndsWith(@"\Xml\grass.tga"));
Assert.IsTrue(externalReferences.Texture2.Filename.EndsWith(pathSeparator + "Xml" + pathSeparator + "grass.tga"));
Assert.AreNotSame(externalReferences.Texture, externalReferences.Texture2);
Assert.NotNull(externalReferences.Shader);
Assert.IsTrue(externalReferences.Shader.Filename.EndsWith(@"\Xml\foliage.fx"));
Assert.IsTrue(externalReferences.Shader.Filename.EndsWith(pathSeparator + "Xml" + pathSeparator + "foliage.fx"));
});
}

Expand Down
17 changes: 9 additions & 8 deletions Test/ContentPipeline/TextureImporterTests.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
using System;
using System.Linq;
using System.Runtime.InteropServices;
using Microsoft.Xna.Framework;
using System.IO;
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
using Microsoft.Xna.Framework.Content.Pipeline.Processors;
using NUnit.Framework;
using Microsoft.Xna.Framework.Graphics.PackedVector;
using Microsoft.Xna.Framework.Graphics;
using System.IO;
using NUnit.Framework;

namespace MonoGame.Tests.ContentPipeline
{
Expand Down Expand Up @@ -46,16 +40,19 @@ public void ImportBmp( )
{
ImportStandard("Assets/Textures/LogoOnly_64px.bmp", SurfaceFormat.Color);
}

[Test]
public void ImportBmpRGB555( )
{
ImportStandard("Assets/Textures/Logo555.bmp", SurfaceFormat.Color);
}

[Test]
public void ImportBmpRGB565( )
{
ImportStandard("Assets/Textures/Logo565.bmp", SurfaceFormat.Color);
}

[Test]
public void ImportBmp4bits( )
{
Expand Down Expand Up @@ -97,6 +94,7 @@ public void ImportTif( )
{
ImportStandard("Assets/Textures/LogoOnly_64px.tif", SurfaceFormat.Color);
}

/// <summary>
/// This test tries to load a tiff file encoded in rgbf, but freeimage seems to be failing to read files with this encoding
/// Might be necessary to modify this test with future updates of freeimage.
Expand All @@ -109,6 +107,7 @@ public void ImportImageWithBadContent( )
Assert.Throws(typeof(InvalidContentException), ( ) => ImportStandard("Assets/Textures/rgbf.tif", SurfaceFormat.Vector4));
//ImportStandard("Assets/Textures/rgbf.tif", SurfaceFormat.Color);
}

[Test]
public void ImportRGBA16Png()
{
Expand All @@ -133,6 +132,7 @@ public void ImportRGBA16Png()
{
}
}

[Test]
public void ImportDdsCubemapDxt1()
{
Expand Down Expand Up @@ -163,6 +163,7 @@ public void ImportDds()
{
ImportStandard("Assets/Textures/LogoOnly_64px.dds", SurfaceFormat.Dxt3);
}

[Test]
public void ImportDdsMipMap()
{
Expand Down

0 comments on commit cc8823c

Please sign in to comment.