Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adds a testing harness and XNA conformance tests.

On Windows, the Tests solution contains a version of the tests which can
be run against XNA as well as a version that can be run against
MonoGame.  These are standard NUnit test assemblies, and should be run
as normal with NUnit.

For Mac and Linux, the state of NUnit is trickier.  Mono/MonoDevelop
ship with quite an old version, so a custom runner is used.  So, rather
than using NUnit or MonoDevelop's built-in runner, a custom runner is
provided that executes the tests using the version of NUnit in
ThirdParty/Libs.  After the tests have completed, the default browser is
invoked to view the HTML version of the results.

GameTest
- Collects various tests that make assertions about the contract of the
  Game class in XNA vs the current contract in MonoGame.

GameTest+Properties
- Makes assertions about the Game class's properties.
- Tests for default values, read-only or read-write status, availability
  during the lifetime of the Game, etc.

CommandLineInterface
- Wraps the core logic for invoking NUnit into an opaque wrapper that
  can be easily invoked from different platforms.
- Currently writes NUnit results in an abbreviated format to stdout, the
  standard NUnit xml format as test_results.xml, and an xsl-transformed
  test_results.html for easy viewing.

Game
- Added InactiveSleepTime as a to-be-implemented property.

MonoGame.Tests/Resources
- Houses the xsl used by CommandLineInterface, as well as sample data
  and a Makefile for easy development (well, easy on Mac, anyway).
  • Loading branch information...
commit cc28c98b448d83ad8b86b6a31c7a6251d305b65e 1 parent d83c072
Christopher Chambers authored
Showing with 2,718 additions and 17 deletions.
  1. +1 −1  LICENSE.txt
  2. +6 −0 MonoGame.Framework/Game.cs
  3. +2 −2 MonoGame.Framework/LaunchParameters.cs
  4. +4 −4 MonoGame.Framework/Linux/LinuxGamePlatform.cs
  5. +2 −6 MonoGame.Framework/MacOS/MacGamePlatform.cs
  6. +2 −1  MonoGame.Framework/MonoGame.Framework.Linux.csproj
  7. +3 −3 MonoGame.Framework/MonoGame.Framework.MacOS.csproj
  8. +470 −0 MonoGame.Tests/GameTest+Properties.cs
  9. +439 −0 MonoGame.Tests/GameTest.cs
  10. +193 −0 MonoGame.Tests/Interface/CommandLineInterface.cs
  11. +80 −0 MonoGame.Tests/Linux/Program.cs
  12. +91 −0 MonoGame.Tests/MacOS/Program.cs
  13. +104 −0 MonoGame.Tests/MonoGame.Tests.Linux.csproj
  14. +61 −0 MonoGame.Tests/MonoGame.Tests.Linux.sln
  15. +80 −0 MonoGame.Tests/MonoGame.Tests.MacOS.csproj
  16. +62 −0 MonoGame.Tests/MonoGame.Tests.MacOS.sln
  17. +76 −0 MonoGame.Tests/MonoGame.Tests.Windows.csproj
  18. +53 −0 MonoGame.Tests/MonoGame.Tests.Windows.sln
  19. +73 −0 MonoGame.Tests/MonoGame.Tests.XNA.csproj
  20. +36 −0 MonoGame.Tests/Properties/AssemblyInfo.cs
  21. +9 −0 MonoGame.Tests/Resources/Makefile
  22. +523 −0 MonoGame.Tests/Resources/test_results.xml
  23. +348 −0 MonoGame.Tests/Resources/tests.xsl
2  LICENSE.txt
View
@@ -1,5 +1,5 @@
Microsoft Public License (Ms-PL)
-MonoGame - Copyright © 2009-2011 The MonoGame Team
+MonoGame - Copyright © 2009-2012 The MonoGame Team
All rights reserved.
6 MonoGame.Framework/Game.cs
View
@@ -187,6 +187,12 @@ public GameComponentCollection Components
get { return _components; }
}
+ public TimeSpan InactiveSleepTime
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
public bool IsActive
{
get { return _platform.IsActive; }
4 MonoGame.Framework/LaunchParameters.cs
View
@@ -1,7 +1,7 @@
-#region License
+#region License
/*
Microsoft Public License (Ms-PL)
-MonoGame - Copyright © 2009-2011 The MonoGame Team
+MonoGame - Copyright © 2009-2012 The MonoGame Team
All rights reserved.
8 MonoGame.Framework/Linux/LinuxGamePlatform.cs
View
@@ -84,7 +84,7 @@ public LinuxGamePlatform(Game game)
public override GameRunBehavior DefaultRunBehavior
{
- get { return GameRunBehavior.Asynchronous; }
+ get { return GameRunBehavior.Synchronous; }
}
public override void Exit()
@@ -99,13 +99,13 @@ public override void Exit()
public override void RunLoop()
{
- throw new NotImplementedException();
+ ResetWindowBounds(false);
+ Window.Run(1 / Game.TargetElapsedTime.TotalSeconds);
}
public override void StartRunLoop()
{
- ResetWindowBounds(false);
- Window.Run(1 / Game.TargetElapsedTime.TotalSeconds);
+ throw new NotImplementedException("Asynchronous Game loops are not supported on this platform.");
}
public override bool BeforeUpdate(GameTime gameTime)
8 MonoGame.Framework/MacOS/MacGamePlatform.cs
View
@@ -221,10 +221,10 @@ public override bool BeforeRun()
public override void Exit()
{
- if (_state != RunState.Running)
+ if (State != RunState.Running)
return;
- _state = RunState.Exiting;
+ State = RunState.Exiting;
if (_mainWindow != null)
{
@@ -480,9 +480,5 @@ public override void WillClose(NSNotification notification)
_owner.State = MacGamePlatform.RunState.Exited);
}
}
-
- #region _mainWindow Event Handlers
-
- #endregion _mainWindow Event Handlers
}
}
3  MonoGame.Framework/MonoGame.Framework.Linux.csproj
View
@@ -334,6 +334,7 @@
<Compile Include="Desktop\Input\GamePad.cs" />
<Compile Include="Desktop\Input\Mouse.cs" />
<Compile Include="Desktop\Input\MouseState.cs" />
+ <Compile Include="LaunchParameters.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ThirdParty\Lidgren.Network\Lidgren.Network.Linux.csproj">
@@ -341,4 +342,4 @@
<Name>Lidgren.Network.Linux</Name>
</ProjectReference>
</ItemGroup>
-</Project>
+</Project>
6 MonoGame.Framework/MonoGame.Framework.MacOS.csproj
View
@@ -8,7 +8,7 @@
<ProjectGuid>{36C538E6-C32A-4A8D-A39C-566173D7118E}</ProjectGuid>
<ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
- <RootNamespace>Microsoft.Xna.Framework.GamerServices</RootNamespace>
+ <RootNamespace>Microsoft.Xna.Framework</RootNamespace>
<AssemblyName>MonoGame.Framework.MacOS</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -353,8 +353,8 @@
<Compile Include="MacOS\Audio\OpenALSupport.cs" />
<Compile Include="MacOS\Audio\SoundEffect.cs" />
<Compile Include="MacOS\Audio\SoundEffectInstance.cs" />
- <Compile Include="MacOS\MacGamePlatform+Synchronous.cs" />
<Compile Include="LaunchParameters.cs" />
+ <Compile Include="MacOS\MacGamePlatform+Synchronous.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="MacOS\" />
@@ -380,4 +380,4 @@
<Name>Lidgren.Network.MacOS</Name>
</ProjectReference>
</ItemGroup>
-</Project>
+</Project>
470 MonoGame.Tests/GameTest+Properties.cs
View
@@ -0,0 +1,470 @@
+#region License
+/*
+Microsoft Public License (Ms-PL)
+MonoGame - Copyright © 2009-2012 The MonoGame Team
+
+All rights reserved.
+
+This license governs use of the accompanying software. If you use the software,
+you accept this license. If you do not accept the license, do not use the
+software.
+
+1. Definitions
+
+The terms "reproduce," "reproduction," "derivative works," and "distribution"
+have the same meaning here as under U.S. copyright law.
+
+A "contribution" is the original software, or any additions or changes to the
+software.
+
+A "contributor" is any person that distributes its contribution under this
+license.
+
+"Licensed patents" are a contributor's patent claims that read directly on its
+contribution.
+
+2. Grant of Rights
+
+(A) Copyright Grant- Subject to the terms of this license, including the
+license conditions and limitations in section 3, each contributor grants you a
+non-exclusive, worldwide, royalty-free copyright license to reproduce its
+contribution, prepare derivative works of its contribution, and distribute its
+contribution or any derivative works that you create.
+
+(B) Patent Grant- Subject to the terms of this license, including the license
+conditions and limitations in section 3, each contributor grants you a
+non-exclusive, worldwide, royalty-free license under its licensed patents to
+make, have made, use, sell, offer for sale, import, and/or otherwise dispose of
+its contribution in the software or derivative works of the contribution in the
+software.
+
+3. Conditions and Limitations
+
+(A) No Trademark License- This license does not grant you rights to use any
+contributors' name, logo, or trademarks.
+
+(B) If you bring a patent claim against any contributor over patents that you
+claim are infringed by the software, your patent license from such contributor
+to the software ends automatically.
+
+(C) If you distribute any portion of the software, you must retain all
+copyright, patent, trademark, and attribution notices that are present in the
+software.
+
+(D) If you distribute any portion of the software in source code form, you may
+do so only under this license by including a complete copy of this license with
+your distribution. If you distribute any portion of the software in compiled or
+object code form, you may only do so under a license that complies with this
+license.
+
+(E) The software is licensed "as-is." You bear the risk of using it. The
+contributors give no express warranties, guarantees or conditions. You may have
+additional consumer rights under your local laws which this license cannot
+change. To the extent permitted under your local laws, the contributors exclude
+the implied warranties of merchantability, fitness for a particular purpose and
+non-infringement.
+*/
+#endregion License
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Reflection;
+using System.Text;
+
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Graphics;
+
+using Moq;
+
+using NUnit.Framework;
+using NUnit.Framework.Constraints;
+
+namespace MonoGame.Framework.Tests {
+ partial class GameTest {
+ public static class Properties {
+ [TestFixture]
+ class Components : ReadOnlyPropertyFixtureBase<GameComponentCollection> {
+ public Components ()
+ : base (g => g.Components)
+ { }
+
+ [Ignore]
+ public override void Has_correct_default_value () { }
+
+ [Test]
+ public void Is_available_before_Run ()
+ {
+ Assert.That (Game, HasThisProperty.Not.Null);
+ }
+ }
+
+ [TestFixture]
+ class Content : ReadWritePropertyFixtureBase<ContentManager> {
+ public Content ()
+ : base (g => g.Content)
+ {
+ var mockServiceProvider = new Mock<IServiceProvider> ();
+ mockServiceProvider.Setup (x => x.GetService (It.IsAny<Type> ()))
+ .Returns (null);
+
+ AddLegalValue (new ContentManager (mockServiceProvider.Object));
+
+ AddIllegalValue<ArgumentNullException> (null);
+ }
+
+ [SetUp]
+ public override void SetUp ()
+ {
+ base.SetUp ();
+ }
+
+ [Ignore]
+ public override void Has_correct_default_value () { }
+
+ [Test]
+ public void Is_available_before_Run ()
+ {
+ Assert.That (Game, HasThisProperty.Not.Null);
+ }
+
+ [Test]
+ public void Is_not_provided_as_a_service ()
+ {
+ Assert.IsNull (Game.Services.GetService (typeof (ContentManager)));
+ }
+ }
+
+ [TestFixture]
+ class GraphicsDevice_ : ReadOnlyPropertyFixtureBase<GraphicsDevice> {
+ public GraphicsDevice_ ()
+ : base (g => g.GraphicsDevice)
+ { }
+
+ [Ignore]
+ public override void Has_correct_default_value () { }
+
+ [Test]
+ public void Is_invalid_without_IGraphicsDeviceService ()
+ {
+ Assert.IsNull (Game.Services.GetService (typeof (IGraphicsDeviceService)));
+ Assert.Throws<InvalidOperationException> (() =>
+ {
+ var device = ThisProperty;
+ });
+ }
+
+ [Test]
+ public void Is_valid_with_IGraphicsDeviceService ()
+ {
+ // TODO: It might be nice to try to use a real, live
+ // GraphicsDevice here rather than null.
+ GraphicsDevice graphicsDevice = null;
+ var mockService = new Mock<IGraphicsDeviceService> ();
+ mockService.Setup (service => service.GraphicsDevice)
+ .Returns ((GraphicsDevice) graphicsDevice);
+
+ Game.Services.AddService (typeof (IGraphicsDeviceService), mockService.Object);
+
+ Assert.That (Game, HasThisProperty.SameAs (graphicsDevice));
+ }
+
+ [Test]
+ public void Is_not_available_in_graphical_game_before_Run ()
+ {
+ Game.MakeGraphical ();
+ Assert.That (Game, HasThisProperty.Null);
+ }
+ }
+
+ [TestFixture]
+ class InactiveSleepTime : ReadWritePropertyFixtureBase<TimeSpan> {
+ public InactiveSleepTime ()
+ : base (g => g.InactiveSleepTime)
+ {
+ DefaultValue = TimeSpan.FromSeconds (0.02);
+
+ AddLegalValue (TimeSpan.Zero);
+ AddLegalValue (TimeSpan.Zero);
+ AddLegalValue (TimeSpan.FromSeconds (1));
+ AddLegalValue (TimeSpan.MaxValue);
+
+ AddIllegalValue<ArgumentOutOfRangeException> (TimeSpan.FromSeconds (-1));
+ AddIllegalValue<ArgumentOutOfRangeException> (TimeSpan.MinValue);
+ }
+ }
+
+ [TestFixture]
+ class IsActive : ReadOnlyPropertyFixtureBase<bool> {
+ public IsActive ()
+ : base (g => g.IsActive)
+ {
+ DefaultValue = false;
+ }
+ }
+
+ [TestFixture]
+ class IsFixedTimeStep : ReadWritePropertyFixtureBase<bool> {
+ public IsFixedTimeStep ()
+ : base (g => g.IsFixedTimeStep)
+ {
+ DefaultValue = true;
+
+ AddLegalValue (true);
+ AddLegalValue (false);
+ }
+
+ [Ignore]
+ public override void Cannot_set_illegal_value (Tuple<bool, Type> valueAndException) { }
+ }
+
+ [TestFixture]
+ class IsMouseVisible : ReadWritePropertyFixtureBase<bool> {
+ public IsMouseVisible ()
+ : base (g => g.IsMouseVisible)
+ {
+ DefaultValue = false;
+
+ AddLegalValue (true);
+ AddLegalValue (false);
+ }
+
+ [Ignore]
+ public override void Cannot_set_illegal_value (Tuple<bool, Type> valueAndException) { }
+ }
+
+ [TestFixture]
+ class LaunchParameters_ : ReadOnlyPropertyFixtureBase<LaunchParameters> {
+ public LaunchParameters_ ()
+ : base (g => g.LaunchParameters)
+ { }
+
+ [Ignore]
+ public override void Has_correct_default_value () { }
+
+ [Test]
+ public void Is_available_before_Run ()
+ {
+ Assert.That (Game, HasThisProperty.Not.Null);
+ }
+ }
+
+ [TestFixture]
+ class Services : ReadOnlyPropertyFixtureBase<GameServiceContainer> {
+ public Services ()
+ : base (g => g.Services)
+ { }
+
+ [Ignore]
+ public override void Has_correct_default_value () { }
+
+ [Test]
+ public void Is_available_before_Run ()
+ {
+ Assert.That (Game, HasThisProperty.Not.Null);
+ }
+ }
+
+ [TestFixture]
+ class TargetElapsedTime : ReadWritePropertyFixtureBase<TimeSpan> {
+ public TargetElapsedTime ()
+ : base (g => g.TargetElapsedTime)
+ {
+ DefaultValue = TimeSpan.FromTicks (166667);
+
+ AddLegalValue (TimeSpan.FromSeconds (1));
+ AddLegalValue (TimeSpan.MaxValue);
+
+ AddIllegalValue<ArgumentOutOfRangeException> (TimeSpan.Zero);
+ AddIllegalValue<ArgumentOutOfRangeException> (TimeSpan.FromSeconds (-1));
+ AddIllegalValue<ArgumentOutOfRangeException> (TimeSpan.MinValue);
+ }
+ }
+
+ [TestFixture]
+ class Window : ReadOnlyPropertyFixtureBase<GameWindow> {
+ public Window ()
+ : base (g => g.Window)
+ { }
+
+ [Ignore]
+ public override void Has_correct_default_value () { }
+
+ [Test]
+ public void Is_available_before_Run ()
+ {
+ Game.MakeGraphical ();
+ Assert.That (Game, HasThisProperty.Not.Null);
+ }
+
+ [Test]
+ public void Is_available_in_non_graphical_game ()
+ {
+ Assert.That (Game, HasThisProperty.Not.Null);
+ }
+ }
+
+ abstract class PropertyFixtureBase<PropertyT> : FixtureBase {
+ private Func<Game, PropertyT> _getter;
+ protected PropertyFixtureBase (Expression<Func<Game, PropertyT> > propertyExpression)
+ {
+ MemberExpression member = (MemberExpression) propertyExpression.Body;
+
+ _propertyInfo = (PropertyInfo) member.Member;
+ _getter = propertyExpression.Compile ();
+ }
+
+ protected PropertyT _GetValue ()
+ {
+ return _getter (Game);
+ }
+
+ protected void _SetValue (PropertyT value)
+ {
+ }
+
+ protected ResolvableConstraintExpression HasThisProperty {
+ get { return Has.Property (_propertyInfo.Name); }
+ }
+
+ private PropertyInfo _propertyInfo;
+
+ protected PropertyInfo PropertyInfo {
+ get { return _propertyInfo; }
+ }
+
+ protected virtual PropertyT ThisProperty {
+ get { return _getter (Game); }
+ }
+
+ private Maybe<PropertyT> _defaultValue;
+
+ protected PropertyT DefaultValue {
+ get {
+ if (!_defaultValue.HasValue)
+ throw new InvalidOperationException (
+ "DefaultValue has never been set.");
+ return _defaultValue.Value;
+ }
+ set {
+ _defaultValue = value;
+ }
+ }
+
+ [Test]
+ public virtual void Has_correct_default_value ()
+ {
+ if (!_defaultValue.HasValue)
+ throw new IgnoreException ("No DefaultValue available");
+ Assert.That (Game, HasThisProperty.EqualTo (_defaultValue.Value));
+ }
+
+ private struct Maybe<T> {
+ public Maybe (T value)
+ {
+ _hasValue = true;
+ _value = value;
+ }
+
+ private readonly bool _hasValue;
+
+ public bool HasValue {
+ get { return _hasValue; }
+ }
+
+ private readonly T _value;
+
+ public T Value {
+ get { return _value; }
+ }
+
+ public static implicit operator Maybe<T> (T value)
+ {
+ return new Maybe<T> (value);
+ }
+ }
+ }
+
+ abstract class ReadOnlyPropertyFixtureBase<PropertyT> : PropertyFixtureBase<PropertyT> {
+ protected ReadOnlyPropertyFixtureBase (Expression<Func<Game,
+ PropertyT> > propertyExpression)
+ : base (propertyExpression)
+ { }
+
+ [Test]
+ public void Is_read_only ()
+ {
+ if (PropertyInfo.GetGetMethod() == null)
+ Assert.Fail ("Property {0} is not readable.", PropertyInfo.Name);
+ if (PropertyInfo.GetSetMethod() != null)
+ Assert.Fail ("Property {0} is writeable.", PropertyInfo.Name);
+ }
+ }
+
+ abstract class ReadWritePropertyFixtureBase<PropertyT> : PropertyFixtureBase<PropertyT> {
+ protected ReadWritePropertyFixtureBase (Expression<Func<Game,
+ PropertyT> > propertyExpression)
+ : base (propertyExpression)
+ { }
+
+ protected new PropertyT ThisProperty {
+ get { return base.ThisProperty; }
+ set {
+ try { PropertyInfo.SetValue (Game, value, null);
+ } catch (TargetInvocationException ex) {
+ // Unpack the real exception
+ throw ex.InnerException;
+ }
+ }
+ }
+
+ [Test]
+ public void Is_read_write ()
+ {
+ if (PropertyInfo.GetGetMethod() == null)
+ Assert.Fail ("Property {0} is not readable.", PropertyInfo.Name);
+ if (PropertyInfo.GetSetMethod() == null)
+ Assert.Fail ("Property {0} is not writeable.", PropertyInfo.Name);
+ }
+
+ protected void AddLegalValue (PropertyT value)
+ {
+ _legalValues.Add (value);
+ }
+
+ protected void AddIllegalValue<ExceptionT> (PropertyT value)
+ {
+ _illegalValues.Add (Tuple.Create (value, typeof (ExceptionT)));
+ }
+
+ private List<PropertyT> _legalValues = new List<PropertyT> ();
+
+ protected List<PropertyT> LegalValues {
+ get { return _legalValues; }
+ }
+
+ private List<Tuple<PropertyT, Type> > _illegalValues = new List<Tuple<PropertyT, Type> > ();
+
+ protected List<Tuple<PropertyT, Type> > IllegalValues {
+ get { return _illegalValues; }
+ }
+
+ [Test, TestCaseSource ("LegalValues")]
+ public virtual void Can_set_legal_value (PropertyT value)
+ {
+ Assert.DoesNotThrow (() => ThisProperty = value);
+ }
+
+ [Test, TestCaseSource ("IllegalValues")]
+ public virtual void Cannot_set_illegal_value (Tuple<PropertyT, Type> valueAndException)
+ {
+ var value = valueAndException.Item1;
+ var exceptionType = valueAndException.Item2;
+ Assert.Throws (exceptionType, () => ThisProperty = value);
+ }
+ }
+ }
+ }
+}
439 MonoGame.Tests/GameTest.cs
View
@@ -0,0 +1,439 @@
+#region License
+/*
+Microsoft Public License (Ms-PL)
+MonoGame - Copyright © 2009-2012 The MonoGame Team
+
+All rights reserved.
+
+This license governs use of the accompanying software. If you use the software,
+you accept this license. If you do not accept the license, do not use the
+software.
+
+1. Definitions
+
+The terms "reproduce," "reproduction," "derivative works," and "distribution"
+have the same meaning here as under U.S. copyright law.
+
+A "contribution" is the original software, or any additions or changes to the
+software.
+
+A "contributor" is any person that distributes its contribution under this
+license.
+
+"Licensed patents" are a contributor's patent claims that read directly on its
+contribution.
+
+2. Grant of Rights
+
+(A) Copyright Grant- Subject to the terms of this license, including the
+license conditions and limitations in section 3, each contributor grants you a
+non-exclusive, worldwide, royalty-free copyright license to reproduce its
+contribution, prepare derivative works of its contribution, and distribute its
+contribution or any derivative works that you create.
+
+(B) Patent Grant- Subject to the terms of this license, including the license
+conditions and limitations in section 3, each contributor grants you a
+non-exclusive, worldwide, royalty-free license under its licensed patents to
+make, have made, use, sell, offer for sale, import, and/or otherwise dispose of
+its contribution in the software or derivative works of the contribution in the
+software.
+
+3. Conditions and Limitations
+
+(A) No Trademark License- This license does not grant you rights to use any
+contributors' name, logo, or trademarks.
+
+(B) If you bring a patent claim against any contributor over patents that you
+claim are infringed by the software, your patent license from such contributor
+to the software ends automatically.
+
+(C) If you distribute any portion of the software, you must retain all
+copyright, patent, trademark, and attribution notices that are present in the
+software.
+
+(D) If you distribute any portion of the software in source code form, you may
+do so only under this license by including a complete copy of this license with
+your distribution. If you distribute any portion of the software in compiled or
+object code form, you may only do so under a license that complies with this
+license.
+
+(E) The software is licensed "as-is." You bear the risk of using it. The
+contributors give no express warranties, guarantees or conditions. You may have
+additional consumer rights under your local laws which this license cannot
+change. To the extent permitted under your local laws, the contributors exclude
+the implied warranties of merchantability, fitness for a particular purpose and
+non-infringement.
+*/
+#endregion License
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Reflection;
+using System.Text;
+using System.Threading;
+
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Graphics;
+
+using Moq;
+
+using NUnit.Framework;
+using NUnit.Framework.Constraints;
+
+namespace MonoGame.Framework.Tests {
+ static partial class GameTest {
+ abstract class FixtureBase {
+ private MockGame _game;
+
+ protected MockGame Game {
+ get { return _game; }
+ }
+
+ [SetUp]
+ public virtual void SetUp ()
+ {
+ _game = new MockGame ();
+ }
+
+ [TearDown]
+ public virtual void TearDown ()
+ {
+ _game.Dispose ();
+ _game = null;
+ }
+ }
+
+ [TestFixture]
+ class Disposal : FixtureBase {
+ [TestCase ("Components", false)]
+ [TestCase ("Content", false)]
+ [TestCase ("GraphicsDevice", false)]
+ [TestCase ("InactiveSleepTime", false)]
+ [TestCase ("IsActive", false)]
+ [TestCase ("IsFixedTimeStep", false)]
+ [TestCase ("IsMouseVisible", false)]
+ [TestCase ("LaunchParameters", false)]
+ [TestCase ("Services", false)]
+ [TestCase ("TargetElapsedTime", false)]
+ [TestCase ("Window", false)]
+ public void Property_throws_after_Dispose (string propertyName, bool shouldThrow)
+ {
+ var propertyInfo = Game.GetType ().GetProperty (propertyName);
+ if (propertyInfo == null)
+ Assert.Fail("Property '{0}' not found", propertyName);
+
+ Action action = () => propertyInfo.GetValue (Game, null);
+ RunDisposeAndTry (action, propertyName, shouldThrow);
+ }
+
+ [TestCase ("Dispose", false)]
+ [TestCase ("Exit", false)]
+ [TestCase ("ResetElapsedTime", false)]
+ [TestCase ("Run", true)]
+ [TestCase ("RunOneFrame", false)]
+ [TestCase ("SuppressDraw", false)]
+ [TestCase ("Tick", false)]
+ public void Method_throws_after_Dispose (string methodName, bool shouldThrow)
+ {
+ var methodInfo = Game.GetType ().GetMethod (methodName, new Type [0]);
+ if (methodInfo == null)
+ Assert.Fail("Method '{0}' not found", methodName);
+
+ Action action = () => methodInfo.Invoke (Game, null);
+ RunDisposeAndTry (action, "Method " + methodName, shouldThrow);
+ }
+
+ private void RunAndDispose ()
+ {
+ Game.MakeGraphical ();
+ Game.Run ();
+ Game.Dispose ();
+ }
+
+ private void RunDisposeAndTry (Action action, string name, bool shouldThrow)
+ {
+ RunAndDispose ();
+ bool didThrow = false;
+ try {
+ action ();
+ } catch (ObjectDisposedException) {
+ if (!shouldThrow)
+ Assert.Fail ("{0} threw ObjectDisposed when it shouldn't have.", name);
+ didThrow = true;
+ } catch (TargetInvocationException ex) {
+ if (!(ex.InnerException is ObjectDisposedException))
+ throw;
+
+ if (!shouldThrow)
+ Assert.Fail ("{0} threw ObjectDisposed when it shouldn't have.", name);
+ didThrow = true;
+ }
+ if (didThrow && !shouldThrow)
+ Assert.Fail ("{0} did not throw ObjectDisposedException when it should have.",
+ name);
+ }
+ }
+
+ [TestFixture]
+ class Behaviors : FixtureBase {
+ [Test]
+ public void Nongraphical_run_succeeds ()
+ {
+ Game.Run ();
+
+ Assert.That (Game, Has.Property ("UpdateCount").EqualTo (1));
+ Assert.That (Game, Has.Property ("DrawCount").EqualTo (0));
+ }
+
+ [Test, Ignore]
+ public void Fixed_time_step_skips_draw_when_update_is_slow ()
+ {
+ Game.MakeGraphical ();
+
+ var targetElapsedTime = TimeSpan.FromSeconds (1f / 10f);
+ var slowUpdateTime = TimeSpan.FromSeconds (targetElapsedTime.TotalSeconds * 2);
+
+ var slowUpdater = new SlowUpdater (Game, slowUpdateTime);
+ Game.Components.Add (slowUpdater);
+
+ var logger = new RunLoopLogger (Game);
+ Game.Components.Add (logger);
+
+ Game.MaxUpdateCount = int.MaxValue;
+ Game.MaxDrawCount = 100;
+
+ Game.IsFixedTimeStep = true;
+ Game.TargetElapsedTime = targetElapsedTime;
+ Game.Run ();
+
+ //Assert.That(_game, Has.Property("UpdateCount").GreaterThan(11));
+ //Assert.That(_game, Has.Property("DrawCount").EqualTo(10));
+ }
+ }
+
+ private class MockGameBase : Game {
+ public new void Run ()
+ {
+#if XNA
+ base.Run ();
+#else
+ base.Run (GameRunBehavior.Synchronous);
+#endif
+ }
+ }
+
+ private class MockGame : MockGameBase {
+ public MockGame ()
+ {
+ MinUpdateCount = int.MaxValue;
+ MinDrawCount = int.MaxValue;
+ MaxUpdateCount = 1;
+ MaxDrawCount = 1;
+ }
+
+ public MockGame MakeGraphical ()
+ {
+ if (Services.GetService (typeof (IGraphicsDeviceManager)) == null)
+ new GraphicsDeviceManager (this);
+ return this;
+ }
+
+ public int MinUpdateCount {
+ get; set;
+ }
+
+ public int MaxUpdateCount {
+ get; set;
+ }
+
+ public int MinDrawCount {
+ get; set;
+ }
+
+ public int MaxDrawCount {
+ get; set;
+ }
+
+ public int UpdateCount {
+ get; private set;
+ }
+
+ public int DrawCount {
+ get; private set;
+ }
+
+ public ExitReason ExitReason {
+ get; private set;
+ }
+
+ private void EvaluateExitCriteria ()
+ {
+ ExitReason reason;
+ if (UpdateCount >= MinUpdateCount && DrawCount >= MinDrawCount)
+ reason = ExitReason.MinimumsSatisfied;
+ else if (UpdateCount >= MaxUpdateCount)
+ reason = ExitReason.MaxUpdateSatisfied;
+ else if (DrawCount >= MaxDrawCount)
+ reason = ExitReason.MaxDrawSatisfied;
+ else
+ reason = ExitReason.None;
+
+ if (reason != ExitReason.None) {
+ ExitReason = reason;
+ Exit ();
+ }
+ }
+
+ protected override void BeginRun ()
+ {
+ base.BeginRun ();
+ UpdateCount = 0;
+ DrawCount = 0;
+ }
+
+ protected override void Update (GameTime gameTime)
+ {
+ base.Update (gameTime);
+ UpdateCount++;
+ EvaluateExitCriteria ();
+ }
+
+ protected override void Draw (GameTime gameTime)
+ {
+ base.Draw (gameTime);
+ DrawCount++;
+ EvaluateExitCriteria ();
+ }
+ }
+
+ private enum ExitReason {
+ None,
+ MinimumsSatisfied,
+ MaxUpdateSatisfied,
+ MaxDrawSatisfied
+ }
+
+ private class SlowUpdater : GameComponent {
+ private TimeSpan _updateTime;
+ public SlowUpdater (Game game, TimeSpan updateTime) :
+ base (game)
+ {
+ _updateTime = updateTime;
+ }
+
+ int _count = 0;
+ public override void Update (GameTime gameTime)
+ {
+ base.Update (gameTime);
+
+ if (_count >= 4)
+ return;
+
+ _count++;
+
+ //if (!gameTime.IsRunningSlowly)
+ {
+ var endTick = Stopwatch.GetTimestamp () +
+ (long) (Stopwatch.Frequency * _updateTime.TotalSeconds);
+ //long endTick = (long)(_updateTime.TotalMilliseconds * 10) + DateTime.Now.Ticks;
+ while (Stopwatch.GetTimestamp () < endTick) {
+ // Be busy!
+ }
+ }
+ }
+ }
+
+ private class RunLoopLogger : DrawableGameComponent {
+ public RunLoopLogger (Game game) :
+ base (game)
+ {
+ }
+
+ private List<Entry> _entries = new List<Entry> ();
+ public IEnumerable<Entry> GetEntries ()
+ {
+ return _entries.ToArray ();
+ }
+
+ public override void Update (GameTime gameTime)
+ {
+ base.Update (gameTime);
+ _entries.Add (Entry.FromUpdate (gameTime));
+ }
+
+ public override void Draw (GameTime gameTime)
+ {
+ base.Draw (gameTime);
+ _entries.Add (Entry.FromDraw (gameTime));
+ }
+
+ public string GetLogString ()
+ {
+ return string.Join (" ", _entries);
+ }
+
+ public struct Entry {
+ public static Entry FromDraw (GameTime gameTime)
+ {
+ return new Entry {
+ Action = RunLoopAction.Draw,
+ ElapsedGameTime = gameTime.ElapsedGameTime,
+ TotalGameTime = gameTime.TotalGameTime,
+ WasRunningSlowly = gameTime.IsRunningSlowly
+ };
+ }
+
+ public static Entry FromUpdate (GameTime gameTime)
+ {
+ return new Entry {
+ Action = RunLoopAction.Update,
+ ElapsedGameTime = gameTime.ElapsedGameTime,
+ TotalGameTime = gameTime.TotalGameTime,
+ WasRunningSlowly = gameTime.IsRunningSlowly
+ };
+ }
+
+ public RunLoopAction Action {
+ get; set;
+ }
+
+ public TimeSpan ElapsedGameTime {
+ get; set;
+ }
+
+ public TimeSpan TotalGameTime {
+ get; set;
+ }
+
+ public bool WasRunningSlowly {
+ get; set;
+ }
+
+ public override string ToString ()
+ {
+ char actionInitial;
+ switch (Action) {
+ case RunLoopAction.Draw: actionInitial = 'd'; break;
+ case RunLoopAction.Update: actionInitial = 'u'; break;
+ default: throw new NotSupportedException (Action.ToString ());
+ }
+
+ return string.Format (
+ "{0}({1:0}{2})",
+ actionInitial,
+ ElapsedGameTime.TotalMilliseconds,
+ WasRunningSlowly ? "!" : "");
+ }
+ }
+ }
+
+ private enum RunLoopAction {
+ Draw,
+ Update
+ }
+ }
+}
193 MonoGame.Tests/Interface/CommandLineInterface.cs
View
@@ -0,0 +1,193 @@
+#region License
+/*
+Microsoft Public License (Ms-PL)
+MonoGame - Copyright © 2009-2012 The MonoGame Team
+
+All rights reserved.
+
+This license governs use of the accompanying software. If you use the software,
+you accept this license. If you do not accept the license, do not use the
+software.
+
+1. Definitions
+
+The terms "reproduce," "reproduction," "derivative works," and "distribution"
+have the same meaning here as under U.S. copyright law.
+
+A "contribution" is the original software, or any additions or changes to the
+software.
+
+A "contributor" is any person that distributes its contribution under this
+license.
+
+"Licensed patents" are a contributor's patent claims that read directly on its
+contribution.
+
+2. Grant of Rights
+
+(A) Copyright Grant- Subject to the terms of this license, including the
+license conditions and limitations in section 3, each contributor grants you a
+non-exclusive, worldwide, royalty-free copyright license to reproduce its
+contribution, prepare derivative works of its contribution, and distribute its
+contribution or any derivative works that you create.
+
+(B) Patent Grant- Subject to the terms of this license, including the license
+conditions and limitations in section 3, each contributor grants you a
+non-exclusive, worldwide, royalty-free license under its licensed patents to
+make, have made, use, sell, offer for sale, import, and/or otherwise dispose of
+its contribution in the software or derivative works of the contribution in the
+software.
+
+3. Conditions and Limitations
+
+(A) No Trademark License- This license does not grant you rights to use any
+contributors' name, logo, or trademarks.
+
+(B) If you bring a patent claim against any contributor over patents that you
+claim are infringed by the software, your patent license from such contributor
+to the software ends automatically.
+
+(C) If you distribute any portion of the software, you must retain all
+copyright, patent, trademark, and attribution notices that are present in the
+software.
+
+(D) If you distribute any portion of the software in source code form, you may
+do so only under this license by including a complete copy of this license with
+your distribution. If you distribute any portion of the software in compiled or
+object code form, you may only do so under a license that complies with this
+license.
+
+(E) The software is licensed "as-is." You bear the risk of using it. The
+contributors give no express warranties, guarantees or conditions. You may have
+additional consumer rights under your local laws which this license cannot
+change. To the extent permitted under your local laws, the contributors exclude
+the implied warranties of merchantability, fitness for a particular purpose and
+non-infringement
+*/
+#endregion License
+
+using System;
+using System.IO;
+using System.Reflection;
+using System.Xml.Xsl;
+
+using NUnit.Core;
+using NUnit.Util;
+
+namespace MonoGame.Tests
+{
+ class CommandLineInterface : EventListener
+ {
+ public static void RunMain(string [] args)
+ {
+ CoreExtensions.Host.InitializeService ();
+
+ var assembly = Assembly.GetExecutingAssembly ();
+
+ var simpleTestRunner = new SimpleTestRunner ();
+ TestPackage package = new TestPackage (assembly.GetName ().Name);
+ package.Assemblies.Add (assembly.Location);
+ if (!simpleTestRunner.Load (package)) {
+ Console.WriteLine ("Could not find the tests.");
+ return;
+ }
+
+ var result = simpleTestRunner.Run (new CommandLineInterface ());
+
+ string outputPath = Path.Combine (Directory.GetCurrentDirectory (), "test_results.xml");
+ var resultWriter = new XmlResultWriter (outputPath);
+ resultWriter.SaveTestResult (result);
+
+ var htmlOutputPath = Path.Combine (Directory.GetCurrentDirectory (), "test_results.html");
+ var transform = new XslTransform();
+ transform.Load(Path.Combine("Resources", "tests.xsl"));
+ transform.Transform (outputPath, htmlOutputPath);
+
+ System.Diagnostics.Process.Start (htmlOutputPath);
+ }
+
+ private TextWriter stdout_standin;
+ private StreamWriter stdout;
+ private CommandLineInterface ()
+ {
+ stdout_standin = new StringWriter ();
+ Console.SetOut (stdout_standin);
+ stdout = new StreamWriter (Console.OpenStandardOutput ());
+ stdout.AutoFlush = true;
+ }
+
+ public void RunStarted (string name, int testCount)
+ {
+ stdout.WriteLine("Run Started: {0}", name);
+ }
+
+ public void RunFinished (Exception exception)
+ {
+ // Console.WriteLine("RunFinished error");
+ }
+
+ public void RunFinished (TestResult result)
+ {
+ // Console.WriteLine("RunFinished success");
+ }
+
+ public void SuiteFinished (TestResult result)
+ {
+ // Console.WriteLine("SuiteFinished");
+ }
+
+ public void SuiteStarted (TestName testName)
+ {
+ // Console.WriteLine("SuiteStarted");
+ }
+
+ public void TestStarted (TestName testName)
+ {
+ // Console.WriteLine("Test {0}", testName.FullName);
+ }
+
+ public void TestFinished (TestResult result)
+ {
+ char output;
+ switch (result.ResultState) {
+ case ResultState.Cancelled:
+ output = 'C';
+ break;
+ case ResultState.Error:
+ output = 'E';
+ break;
+ case ResultState.Failure:
+ output = 'F';
+ break;
+ case ResultState.Ignored:
+ output = 'I';
+ break;
+ case ResultState.Inconclusive:
+ output = '?';
+ break;
+ case ResultState.NotRunnable:
+ output = 'N';
+ break;
+ case ResultState.Skipped:
+ output = 'S';
+ break;
+ default:
+ case ResultState.Success:
+ output = '.';
+ break;
+ }
+
+ stdout.Write (output);
+ }
+
+ public void TestOutput (TestOutput testOutput)
+ {
+ // Console.WriteLine("TestOutput");
+ }
+
+ public void UnhandledException (Exception exception)
+ {
+ // Console.WriteLine("UnhandledException");
+ }
+ }
+}
80 MonoGame.Tests/Linux/Program.cs
View
@@ -0,0 +1,80 @@
+#region License
+/*
+Microsoft Public License (Ms-PL)
+MonoGame - Copyright © 2009-2012 The MonoGame Team
+
+All rights reserved.
+
+This license governs use of the accompanying software. If you use the software,
+you accept this license. If you do not accept the license, do not use the
+software.
+
+1. Definitions
+
+The terms "reproduce," "reproduction," "derivative works," and "distribution"
+have the same meaning here as under U.S. copyright law.
+
+A "contribution" is the original software, or any additions or changes to the
+software.
+
+A "contributor" is any person that distributes its contribution under this
+license.
+
+"Licensed patents" are a contributor's patent claims that read directly on its
+contribution.
+
+2. Grant of Rights
+
+(A) Copyright Grant- Subject to the terms of this license, including the
+license conditions and limitations in section 3, each contributor grants you a
+non-exclusive, worldwide, royalty-free copyright license to reproduce its
+contribution, prepare derivative works of its contribution, and distribute its
+contribution or any derivative works that you create.
+
+(B) Patent Grant- Subject to the terms of this license, including the license
+conditions and limitations in section 3, each contributor grants you a
+non-exclusive, worldwide, royalty-free license under its licensed patents to
+make, have made, use, sell, offer for sale, import, and/or otherwise dispose of
+its contribution in the software or derivative works of the contribution in the
+software.
+
+3. Conditions and Limitations
+
+(A) No Trademark License- This license does not grant you rights to use any
+contributors' name, logo, or trademarks.
+
+(B) If you bring a patent claim against any contributor over patents that you
+claim are infringed by the software, your patent license from such contributor
+to the software ends automatically.
+
+(C) If you distribute any portion of the software, you must retain all
+copyright, patent, trademark, and attribution notices that are present in the
+software.
+
+(D) If you distribute any portion of the software in source code form, you may
+do so only under this license by including a complete copy of this license with
+your distribution. If you distribute any portion of the software in compiled or
+object code form, you may only do so under a license that complies with this
+license.
+
+(E) The software is licensed "as-is." You bear the risk of using it. The
+contributors give no express warranties, guarantees or conditions. You may have
+additional consumer rights under your local laws which this license cannot
+change. To the extent permitted under your local laws, the contributors exclude
+the implied warranties of merchantability, fitness for a particular purpose and
+non-infringement
+*/
+#endregion License
+
+using System;
+
+namespace MonoGame.Tests
+{
+ static class Program
+ {
+ static void Main(string [] args)
+ {
+ CommandLineInterface.RunMain(args);
+ }
+ }
+}
91 MonoGame.Tests/MacOS/Program.cs
View
@@ -0,0 +1,91 @@
+#region License
+/*
+Microsoft Public License (Ms-PL)
+MonoGame - Copyright © 2009-2012 The MonoGame Team
+
+All rights reserved.
+
+This license governs use of the accompanying software. If you use the software,
+you accept this license. If you do not accept the license, do not use the
+software.
+
+1. Definitions
+
+The terms "reproduce," "reproduction," "derivative works," and "distribution"
+have the same meaning here as under U.S. copyright law.
+
+A "contribution" is the original software, or any additions or changes to the
+software.
+
+A "contributor" is any person that distributes its contribution under this
+license.
+
+"Licensed patents" are a contributor's patent claims that read directly on its
+contribution.
+
+2. Grant of Rights
+
+(A) Copyright Grant- Subject to the terms of this license, including the
+license conditions and limitations in section 3, each contributor grants you a
+non-exclusive, worldwide, royalty-free copyright license to reproduce its
+contribution, prepare derivative works of its contribution, and distribute its
+contribution or any derivative works that you create.
+
+(B) Patent Grant- Subject to the terms of this license, including the license
+conditions and limitations in section 3, each contributor grants you a
+non-exclusive, worldwide, royalty-free license under its licensed patents to
+make, have made, use, sell, offer for sale, import, and/or otherwise dispose of
+its contribution in the software or derivative works of the contribution in the
+software.
+
+3. Conditions and Limitations
+
+(A) No Trademark License- This license does not grant you rights to use any
+contributors' name, logo, or trademarks.
+
+(B) If you bring a patent claim against any contributor over patents that you
+claim are infringed by the software, your patent license from such contributor
+to the software ends automatically.
+
+(C) If you distribute any portion of the software, you must retain all
+copyright, patent, trademark, and attribution notices that are present in the
+software.
+
+(D) If you distribute any portion of the software in source code form, you may
+do so only under this license by including a complete copy of this license with
+your distribution. If you distribute any portion of the software in compiled or
+object code form, you may only do so under a license that complies with this
+license.
+
+(E) The software is licensed "as-is." You bear the risk of using it. The
+contributors give no express warranties, guarantees or conditions. You may have
+additional consumer rights under your local laws which this license cannot
+change. To the extent permitted under your local laws, the contributors exclude
+the implied warranties of merchantability, fitness for a particular purpose and
+non-infringement
+*/
+#endregion License
+
+using System;
+
+using MonoMac.Foundation;
+using MonoMac.AppKit;
+
+namespace MonoGame.Tests
+{
+ static class Program
+ {
+ static void Main (string [] args)
+ {
+ NSApplication.Init ();
+
+ var application = NSApplication.SharedApplication;
+ application.ActivationPolicy = NSApplicationActivationPolicy.Regular;
+ application.ActivateIgnoringOtherApps (true);
+
+ using (var pool = new NSAutoreleasePool ()) {
+ CommandLineInterface.RunMain(args);
+ }
+ }
+ }
+}
104 MonoGame.Tests/MonoGame.Tests.Linux.csproj
View
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{B3AA784F-A3DF-49CD-8C7B-8B9E1D66E5E3}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>MonoGame.Tests</RootNamespace>
+ <AssemblyName>MonoGame.Framework.Tests</AssemblyName>
+ <FileAlignment>512</FileAlignment>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-CLI|AnyCPU'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\Debug-CLI\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
+ <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+ <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
+ <WarningLevel>4</WarningLevel>
+ <Optimize>false</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ <Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920">
+ <HintPath>..\ThirdParty\Libs\Moq.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.core, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
+ <HintPath>..\ThirdParty\Libs\nunit.core.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.core.interfaces, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
+ <HintPath>..\ThirdParty\Libs\nunit.core.interfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
+ <HintPath>..\ThirdParty\Libs\nunit.framework.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.util, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
+ <HintPath>..\ThirdParty\Libs\nunit.util.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="GameTest+Properties.cs" />
+ <Compile Include="GameTest.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Linux\Program.cs" />
+ <Compile Include="Interface\CommandLineInterface.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ItemGroup>
+ <ProjectReference Include="..\MonoGame.Framework\MonoGame.Framework.Linux.csproj">
+ <Project>{35253CE1-C864-4CD3-8249-4D1319748E8F}</Project>
+ <Name>MonoGame.Framework.Linux</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\ThirdParty\Lidgren.Network\Lidgren.Network.Linux.csproj">
+ <Project>{AE483C29-042E-4226-BA52-D247CE7676DA}</Project>
+ <Name>Lidgren.Network.Linux</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Linux\" />
+ <Folder Include="Interface\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Resources\tests.xsl">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
+</Project>
61 MonoGame.Tests/MonoGame.Tests.Linux.sln
View
@@ -0,0 +1,61 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Tests.Linux", "MonoGame.Tests.Linux.csproj", "{B3AA784F-A3DF-49CD-8C7B-8B9E1D66E5E3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network.Linux", "..\ThirdParty\Lidgren.Network\Lidgren.Network.Linux.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Framework.Linux", "..\MonoGame.Framework\MonoGame.Framework.Linux.csproj", "{35253CE1-C864-4CD3-8249-4D1319748E8F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ Debug-CLI|Any CPU = Debug-CLI|Any CPU
+ Debug|x86 = Debug|x86
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|Any CPU.Build.0 = Debug|x86
+ {35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|x86.ActiveCfg = Debug|x86
+ {35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug|x86.Build.0 = Debug|x86
+ {35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug-CLI|Any CPU.ActiveCfg = Debug|x86
+ {35253CE1-C864-4CD3-8249-4D1319748E8F}.Debug-CLI|Any CPU.Build.0 = Debug|x86
+ {35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|Any CPU.ActiveCfg = Release|x86
+ {35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|Any CPU.Build.0 = Release|x86
+ {35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|x86.ActiveCfg = Release|x86
+ {35253CE1-C864-4CD3-8249-4D1319748E8F}.Release|x86.Build.0 = Release|x86
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Debug-CLI|Any CPU.ActiveCfg = Debug|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Debug-CLI|Any CPU.Build.0 = Debug|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B3AA784F-A3DF-49CD-8C7B-8B9E1D66E5E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B3AA784F-A3DF-49CD-8C7B-8B9E1D66E5E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B3AA784F-A3DF-49CD-8C7B-8B9E1D66E5E3}.Debug-CLI|Any CPU.ActiveCfg = Debug-CLI|Any CPU
+ {B3AA784F-A3DF-49CD-8C7B-8B9E1D66E5E3}.Debug-CLI|Any CPU.Build.0 = Debug-CLI|Any CPU
+ {B3AA784F-A3DF-49CD-8C7B-8B9E1D66E5E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B3AA784F-A3DF-49CD-8C7B-8B9E1D66E5E3}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = MonoGame.Tests.Linux.csproj
+ Policies = $0
+ $0.TextStylePolicy = $1
+ $1.inheritsSet = Mono
+ $1.inheritsScope = text/plain
+ $1.scope = text/x-csharp
+ $0.CSharpFormattingPolicy = $2
+ $2.inheritsSet = Mono
+ $2.inheritsScope = text/x-csharp
+ $2.scope = text/x-csharp
+ $0.TextStylePolicy = $3
+ $3.inheritsSet = Mono
+ $3.inheritsScope = text/plain
+ $3.scope = text/plain
+ $0.DotNetNamingPolicy = $4
+ $4.DirectoryNamespaceAssociation = None
+ $4.ResourceNamePolicy = FileFormatDefault
+ EndGlobalSection
+EndGlobal
80 MonoGame.Tests/MonoGame.Tests.MacOS.csproj
View
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{A8199859-43CC-42CC-B348-96E2D5B63DFD}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>MonoGame.Tests</RootNamespace>
+ <AssemblyName>MonoGame.Tests.MacOS</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="MonoMac" />
+ <Reference Include="Moq">
+ <HintPath>..\ThirdParty\Libs\Moq.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.core">
+ <HintPath>..\ThirdParty\Libs\nunit.core.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.core.interfaces">
+ <HintPath>..\ThirdParty\Libs\nunit.core.interfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.framework">
+ <HintPath>..\ThirdParty\Libs\nunit.framework.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.util">
+ <HintPath>..\ThirdParty\Libs\nunit.util.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
+ <ItemGroup>
+ <Compile Include="GameTest.cs" />
+ <Compile Include="GameTest+Properties.cs" />
+ <Compile Include="MacOS\Program.cs" />
+ <Compile Include="Interface\CommandLineInterface.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\ThirdParty\Lidgren.Network\Lidgren.Network.MacOS.csproj">
+ <Project>{AE483C29-042E-4226-BA52-D247CE7676DA}</Project>
+ <Name>Lidgren.Network.MacOS</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\MonoGame.Framework\MonoGame.Framework.MacOS.csproj">
+ <Project>{36C538E6-C32A-4A8D-A39C-566173D7118E}</Project>
+ <Name>MonoGame.Framework.MacOS</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="MacOS\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Resources\tests.xsl">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
+</Project>
62 MonoGame.Tests/MonoGame.Tests.MacOS.sln
View
@@ -0,0 +1,62 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Tests.MacOS", "..\..\monogame\MonoGame.Tests\MonoGame.Tests.MacOS.csproj", "{A8199859-43CC-42CC-B348-96E2D5B63DFD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network.MacOS", "..\..\monogame\ThirdParty\Lidgren.Network\Lidgren.Network.MacOS.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Framework.MacOS", "..\..\monogame\MonoGame.Framework\MonoGame.Framework.MacOS.csproj", "{36C538E6-C32A-4A8D-A39C-566173D7118E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ Debug-CLI|Any CPU = Debug-CLI|Any CPU
+ Distribution|Any CPU = Distribution|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {36C538E6-C32A-4A8D-A39C-566173D7118E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {36C538E6-C32A-4A8D-A39C-566173D7118E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {36C538E6-C32A-4A8D-A39C-566173D7118E}.Debug-CLI|Any CPU.ActiveCfg = Debug|Any CPU
+ {36C538E6-C32A-4A8D-A39C-566173D7118E}.Debug-CLI|Any CPU.Build.0 = Debug|Any CPU
+ {36C538E6-C32A-4A8D-A39C-566173D7118E}.Distribution|Any CPU.ActiveCfg = Distribution|Any CPU
+ {36C538E6-C32A-4A8D-A39C-566173D7118E}.Distribution|Any CPU.Build.0 = Distribution|Any CPU
+ {36C538E6-C32A-4A8D-A39C-566173D7118E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {36C538E6-C32A-4A8D-A39C-566173D7118E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A8199859-43CC-42CC-B348-96E2D5B63DFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A8199859-43CC-42CC-B348-96E2D5B63DFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A8199859-43CC-42CC-B348-96E2D5B63DFD}.Debug-CLI|Any CPU.ActiveCfg = Debug-CLI|Any CPU
+ {A8199859-43CC-42CC-B348-96E2D5B63DFD}.Debug-CLI|Any CPU.Build.0 = Debug-CLI|Any CPU
+ {A8199859-43CC-42CC-B348-96E2D5B63DFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A8199859-43CC-42CC-B348-96E2D5B63DFD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Debug-CLI|Any CPU.ActiveCfg = Debug|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Debug-CLI|Any CPU.Build.0 = Debug|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Distribution|Any CPU.ActiveCfg = Debug|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Distribution|Any CPU.Build.0 = Debug|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AE483C29-042E-4226-BA52-D247CE7676DA}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = ..\..\monogame\MonoGame.Tests\MonoGame.Tests.MacOS.csproj
+ Policies = $0
+ $0.TextStylePolicy = $1
+ $1.RemoveTrailingWhitespace = True
+ $1.inheritsSet = Mono
+ $1.inheritsScope = text/plain
+ $1.scope = text/x-csharp
+ $0.CSharpFormattingPolicy = $2
+ $2.inheritsSet = Mono
+ $2.inheritsScope = text/x-csharp
+ $2.scope = text/x-csharp
+ $0.TextStylePolicy = $3
+ $3.RemoveTrailingWhitespace = True
+ $3.inheritsSet = Mono
+ $3.inheritsScope = text/plain
+ $3.scope = text/plain
+ $0.StandardHeader = $4
+ $4.Text =
+ $4.IncludeInNewFiles = True
+ EndGlobalSection
+EndGlobal
76 MonoGame.Tests/MonoGame.Tests.Windows.csproj
View
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{F172852C-3ACF-49F8-9A1B-3D4B1A90C1D2}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>MonoGame.Tests</RootNamespace>
+ <AssemblyName>MonoGame.Tests.Windows</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-CLI|AnyCPU'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\Debug-CLI\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
+ <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+ <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
+ <HintPath>..\Lib\Moq\Moq.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="GameTest+Properties.cs" />
+ <Compile Include="GameTest.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\MonoGame.Framework\MonoGame.Framework.Windows.csproj">
+ <Project>{7DE47032-A904-4C29-BD22-2D235E8D91BA}</Project>
+ <Name>MonoGame.Framework.Windows</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
53 MonoGame.Tests/MonoGame.Tests.Windows.sln
View
@@ -0,0 +1,53 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Tests.XNA", "MonoGame.Tests.XNA.csproj", "{7134181E-E02F-482F-9250-343ABC60E861}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Tests.Windows", "MonoGame.Tests.Windows.csproj", "{F172852C-3ACF-49F8-9A1B-3D4B1A90C1D2}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Framework.Windows", "..\MonoGame.Framework\MonoGame.Framework.Windows.csproj", "{7DE47032-A904-4C29-BD22-2D235E8D91BA}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x86 = Debug|x86
+ Debug-CLI|Any CPU = Debug-CLI|Any CPU
+ Debug-CLI|x86 = Debug-CLI|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {7134181E-E02F-482F-9250-343ABC60E861}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7134181E-E02F-482F-9250-343ABC60E861}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7134181E-E02F-482F-9250-343ABC60E861}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7134181E-E02F-482F-9250-343ABC60E861}.Debug-CLI|Any CPU.ActiveCfg = Debug-CLI|Any CPU
+ {7134181E-E02F-482F-9250-343ABC60E861}.Debug-CLI|Any CPU.Build.0 = Debug-CLI|Any CPU
+ {7134181E-E02F-482F-9250-343ABC60E861}.Debug-CLI|x86.ActiveCfg = Debug-CLI|Any CPU
+ {7134181E-E02F-482F-9250-343ABC60E861}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7134181E-E02F-482F-9250-343ABC60E861}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7134181E-E02F-482F-9250-343ABC60E861}.Release|x86.ActiveCfg = Release|Any CPU
+ {F172852C-3ACF-49F8-9A1B-3D4B1A90C1D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F172852C-3ACF-49F8-9A1B-3D4B1A90C1D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F172852C-3ACF-49F8-9A1B-3D4B1A90C1D2}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F172852C-3ACF-49F8-9A1B-3D4B1A90C1D2}.Debug-CLI|Any CPU.ActiveCfg = Debug-CLI|Any CPU
+ {F172852C-3ACF-49F8-9A1B-3D4B1A90C1D2}.Debug-CLI|Any CPU.Build.0 = Debug-CLI|Any CPU
+ {F172852C-3ACF-49F8-9A1B-3D4B1A90C1D2}.Debug-CLI|x86.ActiveCfg = Debug-CLI|Any CPU
+ {F172852C-3ACF-49F8-9A1B-3D4B1A90C1D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F172852C-3ACF-49F8-9A1B-3D4B1A90C1D2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F172852C-3ACF-49F8-9A1B-3D4B1A90C1D2}.Release|x86.ActiveCfg = Release|Any CPU
+ {7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|x86.ActiveCfg = Debug|x86
+ {7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug|x86.Build.0 = Debug|x86
+ {7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug-CLI|Any CPU.ActiveCfg = Debug|Any CPU
+ {7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug-CLI|Any CPU.Build.0 = Debug|Any CPU
+ {7DE47032-A904-4C29-BD22-2D235E8D91BA}.Debug-CLI|x86.ActiveCfg = Debug|Any CPU
+ {7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|x86.ActiveCfg = Release|x86
+ {7DE47032-A904-4C29-BD22-2D235E8D91BA}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
73 MonoGame.Tests/MonoGame.Tests.XNA.csproj
View
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{7134181E-E02F-482F-9250-343ABC60E861}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>MonoGame.Tests</RootNamespace>
+ <AssemblyName>MonoGame.Tests.XNA</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;XNA</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE;XNA</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug-CLI|AnyCPU'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\Debug-CLI\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;XNA</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
+ <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+ <CodeAnalysisFailOnMissingRules>true</CodeAnalysisFailOnMissingRules>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
+ <Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
+ <Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86" />
+ <Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
+ <HintPath>..\Lib\Moq\Moq.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="GameTest+Properties.cs" />
+ <Compile Include="GameTest.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
36 MonoGame.Tests/Properties/AssemblyInfo.cs
View
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("MonoGame.Framework.Tests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MonoGame.Framework.Tests")]
+[assembly: AssemblyCopyright("Copyright © 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("09287fd6-b28b-45d0-af82-678b1365006e")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
9 MonoGame.Tests/Resources/Makefile
View
@@ -0,0 +1,9 @@
+open: output
+ open obj/results.html
+
+output: tests.xsl test_results.xml
+ mkdir -p obj
+ xsltproc -o obj/results.html tests.xsl test_results.xml
+
+clean:
+ rm -rf obj
523 MonoGame.Tests/Resources/test_results.xml
View
@@ -0,0 +1,523 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!--This file represents the results of running a test suite-->
+<test-results name="MonoGame.Tests" total="62" errors="9" failures="11" not-run="1" inconclusive="0" ignored="1" skipped="0" invalid="0" date="2012-01-24" time="20:04:56">
+ <environment nunit-version="2.5.10.11092" clr-version="4.0.30319.1" os-version="Unix 11.2.0.0" platform="Unix" cwd="/Users/chris/projects/lib/MonoGame/MonoGame.Tests/bin/Debug" machine-name="chrismacpro.local" user="chris" user-domain="chrismacpro.local" />
+ <culture-info current-culture="en-US" current-uiculture="en-US" />
+ <test-suite type="Project" name="Test" executed="True" result="Failure" success="False" time="1.502" asserts="0">
+ <results>
+ <test-suite type="Assembly" name="/Users/chris/projects/lib/monogame/MonoGame.Tests/bin/Debug/MonoGame.Tests.MacOS.exe" executed="True" result="Failure" success="False" time="1.490" asserts="0">
+ <results>
+ <test-suite type="Namespace" name="MonoGame" executed="True" result="Failure" success="False" time="1.490" asserts="0">
+ <results>
+ <test-suite type="Namespace" name="Framework" executed="True" result="Failure" success="False" time="1.489" asserts="0">
+ <results>
+ <test-suite type="Namespace" name="Tests" executed="True" result="Failure" success="False" time="1.489" asserts="0">
+ <results>
+ <test-suite type="TestFixture" name="GameTest+Behaviors" executed="True" result="Failure" success="False" time="0.281" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Behaviors.Fixed_time_step_skips_draw_when_update_is_slow" executed="False" result="Ignored">
+ <reason>
+ <message><![CDATA[]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Behaviors.Nongraphical_run_succeeds" executed="True" result="Error" success="False" time="0.273" asserts="0">
+ <failure>
+ <message><![CDATA[System.InvalidOperationException : No Graphics Device Manager]]></message>
+ <stack-trace><![CDATA[at Microsoft.Xna.Framework.Game.get_graphicsDeviceManager () [0x00036] in /Users/chris/projects/lib/monogame/MonoGame.Framework/Game.cs:542
+at Microsoft.Xna.Framework.Game.Run (GameRunBehavior runBehavior) [0x00017] in /Users/chris/projects/lib/monogame/MonoGame.Framework/Game.cs:335
+at MonoGame.Framework.Tests.GameTest+MockGameBase.Run () [0x00000] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:154
+at MonoGame.Framework.Tests.GameTest+Behaviors.Nongraphical_run_succeeds () [0x00000] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:116
+]]></stack-trace>
+ </failure>
+ </test-case>
+ </results>
+ </test-suite>
+ <test-suite type="TestFixture" name="GameTest+Disposal" executed="True" result="Failure" success="False" time="0.830" asserts="0">
+ <results>
+ <test-suite type="ParameterizedTest" name="Method_throws_after_Dispose" executed="True" result="Failure" success="False" time="0.396" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Method_throws_after_Dispose(&quot;Run&quot;,True)" executed="True" result="Success" success="True" time="0.169" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Method_throws_after_Dispose(&quot;RunOneFrame&quot;,False)" executed="True" result="Error" success="False" time="0.050" asserts="0">
+ <failure>
+ <message><![CDATA[System.NullReferenceException : Object reference not set to an instance of an object]]></message>
+ <stack-trace><![CDATA[at MonoGame.Framework.Tests.GameTest+Disposal+<Method_throws_after_Dispose>c__AnonStorey1.<>m__1 () [0x00000] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:76
+at MonoGame.Framework.Tests.GameTest+Disposal.RunDisposeAndTry (System.Action action, System.String name, Boolean shouldThrow) [0x00008] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:92
+at MonoGame.Framework.Tests.GameTest+Disposal.Method_throws_after_Dispose (System.String methodName, Boolean shouldThrow) [0x00037] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:77
+]]></stack-trace>
+ </failure>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Method_throws_after_Dispose(&quot;Tick&quot;,False)" executed="True" result="Error" success="False" time="0.040" asserts="0">
+ <failure>
+ <message><![CDATA[System.NullReferenceException : Object reference not set to an instance of an object]]></message>
+ <stack-trace><![CDATA[at MonoGame.Framework.Tests.GameTest+Disposal+<Method_throws_after_Dispose>c__AnonStorey1.<>m__1 () [0x00000] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:76
+at MonoGame.Framework.Tests.GameTest+Disposal.RunDisposeAndTry (System.Action action, System.String name, Boolean shouldThrow) [0x00008] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:92
+at MonoGame.Framework.Tests.GameTest+Disposal.Method_throws_after_Dispose (System.String methodName, Boolean shouldThrow) [0x00037] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:77
+]]></stack-trace>
+ </failure>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Method_throws_after_Dispose(&quot;Exit&quot;,False)" executed="True" result="Success" success="True" time="0.036" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Method_throws_after_Dispose(&quot;ResetElapsedTime&quot;,False)" executed="True" result="Error" success="False" time="0.033" asserts="0">
+ <failure>
+ <message><![CDATA[System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
+ ----> System.NullReferenceException : Object reference not set to an instance of an object]]></message>
+ <stack-trace><![CDATA[at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.8.1/mcs/class/corlib/System.Reflection/MethodBase.cs:96
+at MonoGame.Framework.Tests.GameTest+Disposal+<Method_throws_after_Dispose>c__AnonStorey1.<>m__1 () [0x00000] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:76
+at MonoGame.Framework.Tests.GameTest+Disposal.RunDisposeAndTry (System.Action action, System.String name, Boolean shouldThrow) [0x00008] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:92
+--NullReferenceException
+at Microsoft.Xna.Framework.MacGamePlatform.ResetElapsedTime () [0x00000] in /Users/chris/projects/lib/monogame/MonoGame.Framework/MacOS/MacGamePlatform.cs:363
+at Microsoft.Xna.Framework.Game.ResetElapsedTime () [0x00000] in /Users/chris/projects/lib/monogame/MonoGame.Framework/Game.cs:314
+]]></stack-trace>
+ </failure>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Method_throws_after_Dispose(&quot;SuppressDraw&quot;,False)" executed="True" result="Error" success="False" time="0.036" asserts="0">
+ <failure>
+ <message><![CDATA[System.NullReferenceException : Object reference not set to an instance of an object]]></message>
+ <stack-trace><![CDATA[at MonoGame.Framework.Tests.GameTest+Disposal+<Method_throws_after_Dispose>c__AnonStorey1.<>m__1 () [0x00000] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:76
+at MonoGame.Framework.Tests.GameTest+Disposal.RunDisposeAndTry (System.Action action, System.String name, Boolean shouldThrow) [0x00008] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:92
+at MonoGame.Framework.Tests.GameTest+Disposal.Method_throws_after_Dispose (System.String methodName, Boolean shouldThrow) [0x00037] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:77
+]]></stack-trace>
+ </failure>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Method_throws_after_Dispose(&quot;Dispose&quot;,False)" executed="True" result="Success" success="True" time="0.032" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ </results>
+ </test-suite>
+ <test-suite type="ParameterizedTest" name="Property_throws_after_Dispose" executed="True" result="Failure" success="False" time="0.434" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Property_throws_after_Dispose(&quot;Window&quot;,False)" executed="True" result="Success" success="True" time="0.048" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Property_throws_after_Dispose(&quot;GraphicsDevice&quot;,False)" executed="True" result="Success" success="True" time="0.042" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Property_throws_after_Dispose(&quot;Content&quot;,False)" executed="True" result="Success" success="True" time="0.042" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Property_throws_after_Dispose(&quot;Components&quot;,False)" executed="True" result="Success" success="True" time="0.036" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Property_throws_after_Dispose(&quot;IsActive&quot;,False)" executed="True" result="Success" success="True" time="0.032" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Property_throws_after_Dispose(&quot;InactiveSleepTime&quot;,False)" executed="True" result="Error" success="False" time="0.050" asserts="0">
+ <failure>
+ <message><![CDATA[System.NotImplementedException : The requested feature is not implemented.]]></message>
+ <stack-trace><![CDATA[at Microsoft.Xna.Framework.Game.get_InactiveSleepTime () [0x00000] in /Users/chris/projects/lib/monogame/MonoGame.Framework/Game.cs:195
+at (wrapper delegate-invoke) <Module>:invoke_TimeSpan__this___Game (Microsoft.Xna.Framework.Game)
+at System.Reflection.MonoProperty.GetterAdapterFrame[Game,TimeSpan] (System.Reflection.Getter`2 getter, System.Object obj) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.8.1/mcs/class/corlib/System.Reflection/MonoProperty.cs:246
+at System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) [0x00064] in /private/tmp/monobuild/build/BUILD/mono-2.10.8.1/mcs/class/corlib/System.Reflection/MonoProperty.cs:305
+at MonoGame.Framework.Tests.GameTest+Disposal+<Property_throws_after_Dispose>c__AnonStorey0.<>m__0 () [0x00000] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:60
+at MonoGame.Framework.Tests.GameTest+Disposal.RunDisposeAndTry (System.Action action, System.String name, Boolean shouldThrow) [0x00008] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:92
+at MonoGame.Framework.Tests.GameTest+Disposal.Property_throws_after_Dispose (System.String propertyName, Boolean shouldThrow) [0x0003d] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:63
+]]></stack-trace>
+ </failure>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Property_throws_after_Dispose(&quot;TargetElapsedTime&quot;,False)" executed="True" result="Success" success="True" time="0.035" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Property_throws_after_Dispose(&quot;Services&quot;,False)" executed="True" result="Success" success="True" time="0.033" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Property_throws_after_Dispose(&quot;LaunchParameters&quot;,False)" executed="True" result="Error" success="False" time="0.034" asserts="0">
+ <failure>
+ <message><![CDATA[System.NotImplementedException : The requested feature is not implemented.]]></message>
+ <stack-trace><![CDATA[at Microsoft.Xna.Framework.Game.get_LaunchParameters () [0x00000] in /Users/chris/projects/lib/monogame/MonoGame.Framework/Game.cs:189
+at (wrapper delegate-invoke) <Module>:invoke_LaunchParameters__this___Game (Microsoft.Xna.Framework.Game)
+at System.Reflection.MonoProperty.GetterAdapterFrame[Game,LaunchParameters] (System.Reflection.Getter`2 getter, System.Object obj) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.8.1/mcs/class/corlib/System.Reflection/MonoProperty.cs:246
+at System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) [0x00064] in /private/tmp/monobuild/build/BUILD/mono-2.10.8.1/mcs/class/corlib/System.Reflection/MonoProperty.cs:305
+at MonoGame.Framework.Tests.GameTest+Disposal+<Property_throws_after_Dispose>c__AnonStorey0.<>m__0 () [0x00000] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:60
+at MonoGame.Framework.Tests.GameTest+Disposal.RunDisposeAndTry (System.Action action, System.String name, Boolean shouldThrow) [0x00008] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:92
+at MonoGame.Framework.Tests.GameTest+Disposal.Property_throws_after_Dispose (System.String propertyName, Boolean shouldThrow) [0x0003d] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest.cs:63
+]]></stack-trace>
+ </failure>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Property_throws_after_Dispose(&quot;IsMouseVisible&quot;,False)" executed="True" result="Success" success="True" time="0.035" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Disposal.Property_throws_after_Dispose(&quot;IsFixedTimeStep&quot;,False)" executed="True" result="Success" success="True" time="0.047" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ <test-suite type="TestFixture" name="GameTest+Properties+Components" executed="True" result="Success" success="True" time="0.031" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+Components.Is_available_before_Run" executed="True" result="Success" success="True" time="0.022" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+Components.Is_read_only" executed="True" result="Success" success="True" time="0.006" asserts="0">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ </results>
+ </test-suite>
+ <test-suite type="TestFixture" name="GameTest+Properties+Content" executed="True" result="Failure" success="False" time="0.045" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+Content.Is_available_before_Run" executed="True" result="Success" success="True" time="0.007" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+Content.Is_not_provided_as_a_service" executed="True" result="Success" success="True" time="0.006" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+Content.Is_read_write" executed="True" result="Failure" success="False" time="0.008" asserts="0">
+ <failure>
+ <message><![CDATA[Property Content is not writeable.]]></message>
+ <stack-trace><![CDATA[at MonoGame.Framework.Tests.GameTest+Properties+ReadWritePropertyFixtureBase`1[Microsoft.Xna.Framework.Content.ContentManager].Is_read_write () [0x0003e] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest+Properties.cs:363
+]]></stack-trace>
+ </failure>
+ </test-case>
+ <test-suite type="ParameterizedTest" name="Can_set_legal_value" executed="True" result="Failure" success="False" time="0.012" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+Content.Can_set_legal_value(Microsoft.Xna.Framework.Content.ContentManager)" executed="True" result="Failure" success="False" time="0.012" asserts="0">
+ <failure>
+ <message><![CDATA[Unexpected exception: System.ArgumentException
+]]></message>
+ <stack-trace><![CDATA[at MonoGame.Framework.Tests.GameTest+Properties+ReadWritePropertyFixtureBase`1[Microsoft.Xna.Framework.Content.ContentManager].Can_set_legal_value (Microsoft.Xna.Framework.Content.ContentManager value) [0x00014] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest+Properties.cs:391
+]]></stack-trace>
+ </failure>
+ </test-case>
+ </results>
+ </test-suite>
+ <test-suite type="ParameterizedTest" name="Cannot_set_illegal_value" executed="True" result="Failure" success="False" time="0.011" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+Content.Cannot_set_illegal_value((, System.ArgumentNullException))" executed="True" result="Failure" success="False" time="0.011" asserts="1">
+ <failure>
+ <message><![CDATA[ Expected: <System.ArgumentNullException>
+ But was: <System.ArgumentException>
+]]></message>
+ <stack-trace><![CDATA[at MonoGame.Framework.Tests.GameTest+Properties+ReadWritePropertyFixtureBase`1[Microsoft.Xna.Framework.Content.ContentManager].Cannot_set_illegal_value (System.Tuple`2 valueAndException) [0x00020] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest+Properties.cs:399
+]]></stack-trace>
+ </failure>
+ </test-case>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ <test-suite type="TestFixture" name="GameTest+Properties+GraphicsDevice_" executed="True" result="Success" success="True" time="0.060" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+GraphicsDevice_.Is_invalid_without_IGraphicsDeviceService" executed="True" result="Success" success="True" time="0.007" asserts="2">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+GraphicsDevice_.Is_not_available_in_graphical_game_before_Run" executed="True" result="Success" success="True" time="0.004" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+GraphicsDevice_.Is_read_only" executed="True" result="Success" success="True" time="0.004" asserts="0">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+GraphicsDevice_.Is_valid_with_IGraphicsDeviceService" executed="True" result="Success" success="True" time="0.044" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ </results>
+ </test-suite>
+ <test-suite type="TestFixture" name="GameTest+Properties+InactiveSleepTime" executed="True" result="Failure" success="False" time="0.044" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+InactiveSleepTime.Has_correct_default_value" executed="True" result="Error" success="False" time="0.006" asserts="1">
+ <failure>
+ <message><![CDATA[System.NotImplementedException : The requested feature is not implemented.]]></message>
+ <stack-trace><![CDATA[at Microsoft.Xna.Framework.Game.get_InactiveSleepTime () [0x00000] in /Users/chris/projects/lib/monogame/MonoGame.Framework/Game.cs:195
+at (wrapper delegate-invoke) <Module>:invoke_TimeSpan__this___Game (Microsoft.Xna.Framework.Game)
+at System.Reflection.MonoProperty.GetterAdapterFrame[Game,TimeSpan] (System.Reflection.Getter`2 getter, System.Object obj) [0x00000] in /private/tmp/monobuild/build/BUILD/mono-2.10.8.1/mcs/class/corlib/System.Reflection/MonoProperty.cs:246
+at System.Reflection.MonoProperty.GetValue (System.Object obj, System.Object[] index) [0x00076] in /private/tmp/monobuild/build/BUILD/mono-2.10.8.1/mcs/class/corlib/System.Reflection/MonoProperty.cs:308
+at NUnit.Framework.Constraints.PropertyConstraint.Matches (System.Object actual) [0x00000] in <filename unknown>:0
+at MonoGame.Framework.Tests.GameTest+Properties+PropertyFixtureBase`1[System.TimeSpan].Has_correct_default_value () [0x0001b] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest+Properties.cs:295
+]]></stack-trace>
+ </failure>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+InactiveSleepTime.Is_read_write" executed="True" result="Success" success="True" time="0.005" asserts="0">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-suite type="ParameterizedTest" name="Can_set_legal_value" executed="True" result="Failure" success="False" time="0.020" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+InactiveSleepTime.Can_set_legal_value(00:00:00)" executed="True" result="Failure" success="False" time="0.006" asserts="0">
+ <failure>
+ <message><![CDATA[Unexpected exception: System.NotImplementedException
+]]></message>
+ <stack-trace><![CDATA[at MonoGame.Framework.Tests.GameTest+Properties+ReadWritePropertyFixtureBase`1[System.TimeSpan].Can_set_legal_value (TimeSpan value) [0x00014] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest+Properties.cs:391
+]]></stack-trace>
+ </failure>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+InactiveSleepTime.Can_set_legal_value(00:00:00)" executed="True" result="Failure" success="False" time="0.004" asserts="0">
+ <failure>
+ <message><![CDATA[Unexpected exception: System.NotImplementedException
+]]></message>
+ <stack-trace><![CDATA[at MonoGame.Framework.Tests.GameTest+Properties+ReadWritePropertyFixtureBase`1[System.TimeSpan].Can_set_legal_value (TimeSpan value) [0x00014] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest+Properties.cs:391
+]]></stack-trace>
+ </failure>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+InactiveSleepTime.Can_set_legal_value(00:00:01)" executed="True" result="Failure" success="False" time="0.004" asserts="0">
+ <failure>
+ <message><![CDATA[Unexpected exception: System.NotImplementedException
+]]></message>
+ <stack-trace><![CDATA[at MonoGame.Framework.Tests.GameTest+Properties+ReadWritePropertyFixtureBase`1[System.TimeSpan].Can_set_legal_value (TimeSpan value) [0x00014] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest+Properties.cs:391
+]]></stack-trace>
+ </failure>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+InactiveSleepTime.Can_set_legal_value(10675199.02:48:05.4775807)" executed="True" result="Failure" success="False" time="0.004" asserts="0">
+ <failure>
+ <message><![CDATA[Unexpected exception: System.NotImplementedException
+]]></message>
+ <stack-trace><![CDATA[at MonoGame.Framework.Tests.GameTest+Properties+ReadWritePropertyFixtureBase`1[System.TimeSpan].Can_set_legal_value (TimeSpan value) [0x00014] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest+Properties.cs:391
+]]></stack-trace>
+ </failure>
+ </test-case>
+ </results>
+ </test-suite>
+ <test-suite type="ParameterizedTest" name="Cannot_set_illegal_value" executed="True" result="Failure" success="False" time="0.013" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+InactiveSleepTime.Cannot_set_illegal_value((-00:00:01, System.ArgumentOutOfRangeException))" executed="True" result="Failure" success="False" time="0.007" asserts="1">
+ <failure>
+ <message><![CDATA[ Expected: <System.ArgumentOutOfRangeException>
+ But was: <System.NotImplementedException>
+]]></message>
+ <stack-trace><![CDATA[at MonoGame.Framework.Tests.GameTest+Properties+ReadWritePropertyFixtureBase`1[System.TimeSpan].Cannot_set_illegal_value (System.Tuple`2 valueAndException) [0x00020] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest+Properties.cs:399
+]]></stack-trace>
+ </failure>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+InactiveSleepTime.Cannot_set_illegal_value((-10675199.02:48:05.4775808, System.ArgumentOutOfRangeException))" executed="True" result="Failure" success="False" time="0.006" asserts="1">
+ <failure>
+ <message><![CDATA[ Expected: <System.ArgumentOutOfRangeException>
+ But was: <System.NotImplementedException>
+]]></message>
+ <stack-trace><![CDATA[at MonoGame.Framework.Tests.GameTest+Properties+ReadWritePropertyFixtureBase`1[System.TimeSpan].Cannot_set_illegal_value (System.Tuple`2 valueAndException) [0x00020] in /Users/chris/projects/lib/monogame/MonoGame.Tests/GameTest+Properties.cs:399
+]]></stack-trace>
+ </failure>
+ </test-case>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ <test-suite type="TestFixture" name="GameTest+Properties+IsActive" executed="True" result="Success" success="True" time="0.024" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+IsActive.Has_correct_default_value" executed="True" result="Success" success="True" time="0.017" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+IsActive.Is_read_only" executed="True" result="Success" success="True" time="0.005" asserts="0">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ </results>
+ </test-suite>
+ <test-suite type="TestFixture" name="GameTest+Properties+IsFixedTimeStep" executed="True" result="Success" success="True" time="0.022" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+IsFixedTimeStep.Has_correct_default_value" executed="True" result="Success" success="True" time="0.004" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+IsFixedTimeStep.Is_read_write" executed="True" result="Success" success="True" time="0.005" asserts="0">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-suite type="ParameterizedTest" name="Can_set_legal_value" executed="True" result="Success" success="True" time="0.013" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+IsFixedTimeStep.Can_set_legal_value(True)" executed="True" result="Success" success="True" time="0.006" asserts="0">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+IsFixedTimeStep.Can_set_legal_value(False)" executed="True" result="Success" success="True" time="0.007" asserts="0">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ <test-suite type="TestFixture" name="GameTest+Properties+IsMouseVisible" executed="True" result="Success" success="True" time="0.019" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+IsMouseVisible.Has_correct_default_value" executed="True" result="Success" success="True" time="0.005" asserts="1">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+IsMouseVisible.Is_read_write" executed="True" result="Success" success="True" time="0.004" asserts="0">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-suite type="ParameterizedTest" name="Can_set_legal_value" executed="True" result="Success" success="True" time="0.009" asserts="0">
+ <results>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+IsMouseVisible.Can_set_legal_value(True)" executed="True" result="Success" success="True" time="0.005" asserts="0">
+ <reason>
+ <message><![CDATA[Warning: Test changed the CurrentDirectory]]></message>
+ </reason>
+ </test-case>
+ <test-case name="MonoGame.Framework.Tests.GameTest+Properties+IsMouseVisible.Can_set_legal_value(False)" executed="True" result="Success" success="True" time="0.004" asserts="0">
+ <reason>