update the TestCenter

This commit is contained in:
SND\rene87_cp 2011-11-19 23:13:18 +00:00
parent 2143a23328
commit 9e40604119
25 changed files with 218 additions and 298 deletions

View File

@ -53,7 +53,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="AssertHelper.cs" /> <Compile Include="AssertHelper.cs" />
<Compile Include="classTests\CurveTest.cs" />
<Compile Include="ContentPipeline\Helper\SharedResource.cs" /> <Compile Include="ContentPipeline\Helper\SharedResource.cs" />
<Compile Include="ContentPipeline\MathTypesTests.cs" /> <Compile Include="ContentPipeline\MathTypesTests.cs" />
<Compile Include="ContentPipeline\Helper\Compiler.cs" /> <Compile Include="ContentPipeline\Helper\Compiler.cs" />
@ -61,13 +60,13 @@
<Compile Include="ContentPipeline\SystemTypesTests.cs" /> <Compile Include="ContentPipeline\SystemTypesTests.cs" />
<Compile Include="ContentPipeline\Helper\Nullable.cs" /> <Compile Include="ContentPipeline\Helper\Nullable.cs" />
<Compile Include="DataFactory.cs" /> <Compile Include="DataFactory.cs" />
<Compile Include="Input\GamePadDPadTest.cs" /> <Compile Include="Strukturen\Input\GamePadDPadTest.cs" />
<Compile Include="Design\TypeConverterTest.cs" /> <Compile Include="Strukturen\Design\TypeConverterTest.cs" />
<Compile Include="Input\GamePadTriggersTest.cs" /> <Compile Include="Strukturen\Input\GamePadTriggersTest.cs" />
<Compile Include="IntegrationTest.cs" /> <Compile Include="IntegrationTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Storage\StorageContainerTest.cs" /> <Compile Include="Strukturen\Storage\StorageContainerTest.cs" />
<Compile Include="Storage\StorageDeviceTest.cs" /> <Compile Include="Strukturen\Storage\StorageDeviceTest.cs" />
<Compile Include="Strukturen\BoundingBoxTest.cs" /> <Compile Include="Strukturen\BoundingBoxTest.cs" />
<Compile Include="Strukturen\BoundingFrustumTest.cs" /> <Compile Include="Strukturen\BoundingFrustumTest.cs" />
<Compile Include="Strukturen\BoundingSphereTest.cs" /> <Compile Include="Strukturen\BoundingSphereTest.cs" />
@ -75,22 +74,22 @@
<Compile Include="Strukturen\CurveTest.cs" /> <Compile Include="Strukturen\CurveTest.cs" />
<Compile Include="Strukturen\MathHelperTest.cs" /> <Compile Include="Strukturen\MathHelperTest.cs" />
<Compile Include="Strukturen\MatrixTest.cs" /> <Compile Include="Strukturen\MatrixTest.cs" />
<Compile Include="Strukturen\PackedVector\Bgr565Test.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\Bgr565Test.cs" />
<Compile Include="Strukturen\PackedVector\Bgra5551Test.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\Bgra5551Test.cs" />
<Compile Include="Strukturen\PackedVector\Bgra4444Test.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\Bgra4444Test.cs" />
<Compile Include="Strukturen\PackedVector\Byte4Test.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\Byte4Test.cs" />
<Compile Include="Strukturen\PackedVector\HalfSingleTest.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\HalfSingleTest.cs" />
<Compile Include="Strukturen\PackedVector\HalfVector2Test.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\HalfVector2Test.cs" />
<Compile Include="Strukturen\PackedVector\HalfVector4Test.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\HalfVector4Test.cs" />
<Compile Include="Strukturen\PackedVector\Short2Test.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\Short2Test.cs" />
<Compile Include="Strukturen\PackedVector\Short4Test.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\Short4Test.cs" />
<Compile Include="Strukturen\PackedVector\NormalizedShort4Test.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\NormalizedShort4Test.cs" />
<Compile Include="Strukturen\PackedVector\NormalizedShort2Test.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\NormalizedShort2Test.cs" />
<Compile Include="Strukturen\PackedVector\NormalizedByte4Test.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\NormalizedByte4Test.cs" />
<Compile Include="Strukturen\PackedVector\NormalizedByte2Test.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\NormalizedByte2Test.cs" />
<Compile Include="Strukturen\PackedVector\Rgba64Test.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\Rgba64Test.cs" />
<Compile Include="Strukturen\PackedVector\Rgba1010102Test.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\Rgba1010102Test.cs" />
<Compile Include="Strukturen\PackedVector\Rg32Test.cs" /> <Compile Include="Strukturen\Graphics\PackedVector\Rg32Test.cs" />
<Compile Include="Strukturen\PlaneTest.cs" /> <Compile Include="Strukturen\PlaneTest.cs" />
<Compile Include="Strukturen\PointTest.cs" /> <Compile Include="Strukturen\PointTest.cs" />
<Compile Include="Strukturen\QuaternionTest.cs" /> <Compile Include="Strukturen\QuaternionTest.cs" />
@ -101,7 +100,21 @@
<Compile Include="Strukturen\Vector4Test.cs" /> <Compile Include="Strukturen\Vector4Test.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Vector\" /> <Folder Include="Strukturen\Audio\" />
<Folder Include="Strukturen\Content\GraphicTypeReaders\" />
<Folder Include="Strukturen\Content\MathTypeReaders\" />
<Folder Include="Strukturen\Content\MediaTypeReaders\" />
<Folder Include="Strukturen\Content\PrimitiveTypeReaders\" />
<Folder Include="Strukturen\Content\SystemTypeReaders\" />
<Folder Include="Strukturen\Design\GamerServices\" />
<Folder Include="Strukturen\Input\MotionSensing\" />
<Folder Include="Strukturen\Input\Touch\" />
<Folder Include="Strukturen\Media\" />
<Folder Include="Strukturen\Net\" />
<Folder Include="Strukturen\NonXNA\InputSystem\" />
<Folder Include="Strukturen\NonXNA\RenderSystem\" />
<Folder Include="Strukturen\NonXNA\SoundSystem\" />
<Folder Include="Strukturen\PackedVector\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\ANX.Framework\ANX.Framework.csproj"> <ProjectReference Include="..\ANX.Framework\ANX.Framework.csproj">

View File

@ -1,42 +1,173 @@
using System; #region Using Statements
using System.Collections.Generic; using System;
using System.Linq; using System.IO;
using System.Text; using ANX.Framework.NonXNA;
using NUnit.Framework; using NUnit.Framework;
#endregion // Using Statements
using XNACurve = Microsoft.Xna.Framework.Curve; using XNACurve = Microsoft.Xna.Framework.Curve;
using ANXCurve = ANX.Framework.Curve; using ANXCurve = ANX.Framework.Curve;
namespace ANX.Framework.TestCenter.Strukturen using XNACurveKey = Microsoft.Xna.Framework.CurveKey;
using ANXCurveKey = ANX.Framework.CurveKey;
using XNACurveLoopType = Microsoft.Xna.Framework.CurveLoopType;
using ANXCurveLoopType = ANX.Framework.CurveLoopType;
using XNACurveKeyCollection = Microsoft.Xna.Framework.CurveKeyCollection;
using ANXCurveKeyCollection = ANX.Framework.CurveKeyCollection;
using XNACurveTangent = Microsoft.Xna.Framework.CurveTangent;
using ANXCurveTangent = ANX.Framework.CurveTangent;
#region License
//
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
//
// This file is released under the Ms-PL license.
//
//
//
// Microsoft Public License (Ms-PL)
//
// 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
namespace ANX.Framework.TestCenter.Struckturen.classTest
{ {
[TestFixture] [TestFixture]
class CurveTest class CurveTest
{ {
static object[] inoutsame =
{
new object[] {XNACurveTangent.Flat,ANXCurveTangent.Flat , DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000) },
new object[] {XNACurveTangent.Linear,ANXCurveTangent.Linear, DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000)},
new object[] {XNACurveTangent.Smooth,ANXCurveTangent.Smooth, DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000)}
[Test] };
public void Evaluate()
{
XNACurve xna = new XNACurve();
ANXCurve anx = new ANXCurve();
Random r = new Random(); [TestCaseSource("inoutsame")]
for (int i = 0; i < 5; ++i) public void Curve(XNACurveTangent xnainout, ANXCurveTangent anxinout, float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13, float f14, float f15, float f16)
{ {
float value = r.Next(-10, 10); XNACurve xna = new XNACurve();
xna.Keys.Add(new Microsoft.Xna.Framework.CurveKey(i, value)); ANXCurve anx = new ANXCurve();
anx.Keys.Add(new CurveKey(i, value));
}
xna.PreLoop = Microsoft.Xna.Framework.CurveLoopType.Constant;
anx.PreLoop = ANX.Framework.CurveLoopType.Constant;
xna.PostLoop = Microsoft.Xna.Framework.CurveLoopType.Constant; xna.Keys.Add(new XNACurveKey(f1, f2));
anx.PostLoop = ANX.Framework.CurveLoopType.Constant; //xna.Keys.Add(new XNACurveKey(f3, f4));
//xna.Keys.Add(new XNACurveKey(f5, f6));
//xna.Keys.Add(new XNACurveKey(f7, f8));
//xna.Keys.Add(new XNACurveKey(f9, f10));
//xna.Keys.Add(new XNACurveKey(f11, f12));
//xna.Keys.Add(new XNACurveKey(f13, f14));
//xna.Keys.Add(new XNACurveKey(f15, f16));
xna.ComputeTangents(Microsoft.Xna.Framework.CurveTangent.Flat); anx.Keys.Add(new ANXCurveKey(f1, f2));
anx.ComputeTangents(CurveTangent.Flat); //anx.Keys.Add(new ANXCurveKey(f3, f4));
//anx.Keys.Add(new ANXCurveKey(f5, f6));
//anx.Keys.Add(new ANXCurveKey(f7, f8));
//anx.Keys.Add(new ANXCurveKey(f9, f10));
//anx.Keys.Add(new ANXCurveKey(f11, f12));
//anx.Keys.Add(new ANXCurveKey(f13, f14));
//anx.Keys.Add(new ANXCurveKey(f15, f16));
AssertHelper.CompareFloats(xna.Evaluate(3.5f), anx.Evaluate(3.5f), float.Epsilon); AssertHelper.ConvertEquals(xna, anx, "Curve");
} }
}
[TestCaseSource("inoutsame")]
public void Clone(XNACurveTangent xnainout, ANXCurveTangent anxinout, float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13, float f14, float f15, float f16)
{
XNACurve xna = new XNACurve();
ANXCurve anx = new ANXCurve();
xna.Keys.Add(new XNACurveKey(f1, f2));
xna.Keys.Add(new XNACurveKey(f3, f4));
xna.Keys.Add(new XNACurveKey(f5, f6));
xna.Keys.Add(new XNACurveKey(f7, f8));
xna.Keys.Add(new XNACurveKey(f9, f10));
xna.Keys.Add(new XNACurveKey(f11, f12));
xna.Keys.Add(new XNACurveKey(f13, f14));
xna.Keys.Add(new XNACurveKey(f15, f16));
anx.Keys.Add(new ANXCurveKey(f1, f2));
anx.Keys.Add(new ANXCurveKey(f3, f4));
anx.Keys.Add(new ANXCurveKey(f5, f6));
anx.Keys.Add(new ANXCurveKey(f7, f8));
anx.Keys.Add(new ANXCurveKey(f9, f10));
anx.Keys.Add(new ANXCurveKey(f11, f12));
anx.Keys.Add(new ANXCurveKey(f13, f14));
anx.Keys.Add(new ANXCurveKey(f15, f16));
XNACurve xna2 = xna.Clone();
ANXCurve anx2 = anx.Clone();
AssertHelper.ConvertEquals(xna, xna2, anx, anx2, "Clone");
}
[TestCaseSource("inoutsame")]
public void ComputeTangents(XNACurveTangent xnainout, ANXCurveTangent anxinout, float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13, float f14, float f15, float f16)
{
XNACurve xna = new XNACurve();
ANXCurve anx = new ANXCurve();
xna.Keys.Add(new XNACurveKey(f1, f2));
xna.Keys.Add(new XNACurveKey(f3, f4));
xna.Keys.Add(new XNACurveKey(f5, f6));
xna.Keys.Add(new XNACurveKey(f7, f8));
xna.Keys.Add(new XNACurveKey(f9, f10));
xna.Keys.Add(new XNACurveKey(f11, f12));
xna.Keys.Add(new XNACurveKey(f13, f14));
xna.Keys.Add(new XNACurveKey(f15, f16));
anx.Keys.Add(new ANXCurveKey(f1, f2));
anx.Keys.Add(new ANXCurveKey(f3, f4));
anx.Keys.Add(new ANXCurveKey(f5, f6));
anx.Keys.Add(new ANXCurveKey(f7, f8));
anx.Keys.Add(new ANXCurveKey(f9, f10));
anx.Keys.Add(new ANXCurveKey(f11, f12));
anx.Keys.Add(new ANXCurveKey(f13, f14));
anx.Keys.Add(new ANXCurveKey(f15, f16));
xna.ComputeTangents(xnainout);
anx.ComputeTangents(anxinout);
AssertHelper.ConvertEquals(xna, anx, "ComputeTangents");
}
}
} }

View File

@ -58,7 +58,7 @@ using NUnit.Framework;
using XnaVector3 = Microsoft.Xna.Framework.Vector3; using XnaVector3 = Microsoft.Xna.Framework.Vector3;
using AnxVector3 = ANX.Framework.Vector3; using AnxVector3 = ANX.Framework.Vector3;
namespace ANX.Framework.TestCenter.Design namespace ANX.Framework.TestCenter.Strukturen.Design
{ {
[TestFixture] [TestFixture]
public class TypeConverterTest public class TypeConverterTest

View File

@ -61,7 +61,7 @@ using ANXVector3 = ANX.Framework.Vector3;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class Bgr565Test class Bgr565Test

View File

@ -61,7 +61,7 @@ using ANXVector4 = ANX.Framework.Vector4;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class Bgra4444Test class Bgra4444Test

View File

@ -61,7 +61,7 @@ using ANXVector4 = ANX.Framework.Vector4;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class Bgra5551Test class Bgra5551Test

View File

@ -61,7 +61,7 @@ using ANXVector4 = ANX.Framework.Vector4;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class Byte4Test class Byte4Test

View File

@ -61,7 +61,7 @@ using ANXVector4 = ANX.Framework.Vector4;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class HalfSingleTest class HalfSingleTest

View File

@ -61,7 +61,7 @@ using ANXVector2 = ANX.Framework.Vector2;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class HalfVector2Test class HalfVector2Test

View File

@ -61,7 +61,7 @@ using ANXVector4 = ANX.Framework.Vector4;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class HalfVector4Test class HalfVector4Test

View File

@ -61,7 +61,7 @@ using ANXVector2 = ANX.Framework.Vector2;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class NormalizedByte2Test class NormalizedByte2Test

View File

@ -61,7 +61,7 @@ using ANXVector4 = ANX.Framework.Vector4;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class NormalizedByte4Test class NormalizedByte4Test

View File

@ -61,7 +61,7 @@ using ANXVector2 = ANX.Framework.Vector2;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class NormalizedShort2Test class NormalizedShort2Test

View File

@ -61,7 +61,7 @@ using ANXVector4 = ANX.Framework.Vector4;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class NormalizedShort4Test class NormalizedShort4Test

View File

@ -61,7 +61,7 @@ using ANXVector2 = ANX.Framework.Vector2;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class Rg32Test class Rg32Test

View File

@ -61,7 +61,7 @@ using ANXVector4 = ANX.Framework.Vector4;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class Rgba1010102Test class Rgba1010102Test

View File

@ -61,7 +61,7 @@ using ANXVector4 = ANX.Framework.Vector4;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class Rgba64Test class Rgba64Test

View File

@ -61,7 +61,7 @@ using ANXVector2 = ANX.Framework.Vector2;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class Short2Test class Short2Test

View File

@ -61,7 +61,7 @@ using ANXVector4 = ANX.Framework.Vector4;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Strukturen.PackedVector namespace ANX.Framework.TestCenter.Strukturen.Graphics.PackedVector
{ {
[TestFixture] [TestFixture]
class Short4Test class Short4Test

View File

@ -60,7 +60,7 @@ using XNAButtonState = Microsoft.Xna.Framework.Input.ButtonState;
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Input namespace ANX.Framework.TestCenter.Strukturen.Input
{ {
[TestFixture] [TestFixture]
class GamePadDPadTest class GamePadDPadTest

View File

@ -56,7 +56,7 @@ using XNAGamePadTriggers = Microsoft.Xna.Framework.Input.GamePadTriggers;
// particular purpose and non-infringement. // particular purpose and non-infringement.
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Input namespace ANX.Framework.TestCenter.Strukturen.Input
{ {
[TestFixture] [TestFixture]
class GamePadTriggersTest class GamePadTriggersTest

View File

@ -62,7 +62,7 @@ using XNAPlayerIndex = Microsoft.Xna.Framework.PlayerIndex;
// particular purpose and non-infringement. // particular purpose and non-infringement.
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Storage namespace ANX.Framework.TestCenter.Strukturen.Storage
{ {
[TestFixture] [TestFixture]
class StorageContainerTest class StorageContainerTest

View File

@ -64,7 +64,7 @@ using System.Reflection;
// particular purpose and non-infringement. // particular purpose and non-infringement.
#endregion // License #endregion // License
namespace ANX.Framework.TestCenter.Storage namespace ANX.Framework.TestCenter.Strukturen.Storage
{ {
[TestFixture] [TestFixture]
class StorageDeviceTest class StorageDeviceTest

View File

@ -1,173 +0,0 @@
#region Using Statements
using System;
using System.IO;
using ANX.Framework.NonXNA;
using NUnit.Framework;
#endregion // Using Statements
using XNACurve = Microsoft.Xna.Framework.Curve;
using ANXCurve = ANX.Framework.Curve;
using XNACurveKey = Microsoft.Xna.Framework.CurveKey;
using ANXCurveKey = ANX.Framework.CurveKey;
using XNACurveLoopType = Microsoft.Xna.Framework.CurveLoopType;
using ANXCurveLoopType = ANX.Framework.CurveLoopType;
using XNACurveKeyCollection = Microsoft.Xna.Framework.CurveKeyCollection;
using ANXCurveKeyCollection = ANX.Framework.CurveKeyCollection;
using XNACurveTangent = Microsoft.Xna.Framework.CurveTangent;
using ANXCurveTangent = ANX.Framework.CurveTangent;
#region License
//
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
//
// This file is released under the Ms-PL license.
//
//
//
// Microsoft Public License (Ms-PL)
//
// 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
namespace ANX.Framework.TestCenter.classTest
{
[TestFixture]
class CurveTest
{
static object[] inoutsame =
{
new object[] {XNACurveTangent.Flat,ANXCurveTangent.Flat , DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000) },
new object[] {XNACurveTangent.Linear,ANXCurveTangent.Linear, DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000)},
new object[] {XNACurveTangent.Smooth,ANXCurveTangent.Smooth, DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000), DataFactory.RandomValueMinMax(float.Epsilon, 1000)}
};
[TestCaseSource("inoutsame")]
public void Curve(XNACurveTangent xnainout, ANXCurveTangent anxinout, float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13, float f14, float f15, float f16)
{
XNACurve xna = new XNACurve();
ANXCurve anx = new ANXCurve();
xna.Keys.Add(new XNACurveKey(f1, f2));
//xna.Keys.Add(new XNACurveKey(f3, f4));
//xna.Keys.Add(new XNACurveKey(f5, f6));
//xna.Keys.Add(new XNACurveKey(f7, f8));
//xna.Keys.Add(new XNACurveKey(f9, f10));
//xna.Keys.Add(new XNACurveKey(f11, f12));
//xna.Keys.Add(new XNACurveKey(f13, f14));
//xna.Keys.Add(new XNACurveKey(f15, f16));
anx.Keys.Add(new ANXCurveKey(f1, f2));
//anx.Keys.Add(new ANXCurveKey(f3, f4));
//anx.Keys.Add(new ANXCurveKey(f5, f6));
//anx.Keys.Add(new ANXCurveKey(f7, f8));
//anx.Keys.Add(new ANXCurveKey(f9, f10));
//anx.Keys.Add(new ANXCurveKey(f11, f12));
//anx.Keys.Add(new ANXCurveKey(f13, f14));
//anx.Keys.Add(new ANXCurveKey(f15, f16));
AssertHelper.ConvertEquals(xna, anx, "Curve");
}
[TestCaseSource("inoutsame")]
public void Clone(XNACurveTangent xnainout, ANXCurveTangent anxinout, float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13, float f14, float f15, float f16)
{
XNACurve xna = new XNACurve();
ANXCurve anx = new ANXCurve();
xna.Keys.Add(new XNACurveKey(f1, f2));
xna.Keys.Add(new XNACurveKey(f3, f4));
xna.Keys.Add(new XNACurveKey(f5, f6));
xna.Keys.Add(new XNACurveKey(f7, f8));
xna.Keys.Add(new XNACurveKey(f9, f10));
xna.Keys.Add(new XNACurveKey(f11, f12));
xna.Keys.Add(new XNACurveKey(f13, f14));
xna.Keys.Add(new XNACurveKey(f15, f16));
anx.Keys.Add(new ANXCurveKey(f1, f2));
anx.Keys.Add(new ANXCurveKey(f3, f4));
anx.Keys.Add(new ANXCurveKey(f5, f6));
anx.Keys.Add(new ANXCurveKey(f7, f8));
anx.Keys.Add(new ANXCurveKey(f9, f10));
anx.Keys.Add(new ANXCurveKey(f11, f12));
anx.Keys.Add(new ANXCurveKey(f13, f14));
anx.Keys.Add(new ANXCurveKey(f15, f16));
XNACurve xna2 = xna.Clone();
ANXCurve anx2 = anx.Clone();
AssertHelper.ConvertEquals(xna,xna2,anx, anx2,"Clone");
}
[TestCaseSource("inoutsame")]
public void ComputeTangents(XNACurveTangent xnainout, ANXCurveTangent anxinout, float f1, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10, float f11, float f12, float f13, float f14, float f15, float f16)
{
XNACurve xna = new XNACurve();
ANXCurve anx = new ANXCurve();
xna.Keys.Add(new XNACurveKey(f1, f2));
xna.Keys.Add(new XNACurveKey(f3, f4));
xna.Keys.Add(new XNACurveKey(f5, f6));
xna.Keys.Add(new XNACurveKey(f7, f8));
xna.Keys.Add(new XNACurveKey(f9, f10));
xna.Keys.Add(new XNACurveKey(f11, f12));
xna.Keys.Add(new XNACurveKey(f13, f14));
xna.Keys.Add(new XNACurveKey(f15, f16));
anx.Keys.Add(new ANXCurveKey(f1, f2));
anx.Keys.Add(new ANXCurveKey(f3, f4));
anx.Keys.Add(new ANXCurveKey(f5, f6));
anx.Keys.Add(new ANXCurveKey(f7, f8));
anx.Keys.Add(new ANXCurveKey(f9, f10));
anx.Keys.Add(new ANXCurveKey(f11, f12));
anx.Keys.Add(new ANXCurveKey(f13, f14));
anx.Keys.Add(new ANXCurveKey(f15, f16));
xna.ComputeTangents(xnainout);
anx.ComputeTangents(anxinout);
AssertHelper.ConvertEquals(xna, anx, "ComputeTangents");
}
}
}

View File

@ -160,57 +160,6 @@
<Compile Include="GameComponentCollection.cs" /> <Compile Include="GameComponentCollection.cs" />
<Compile Include="GameComponentCollectionEventArgs.cs" /> <Compile Include="GameComponentCollectionEventArgs.cs" />
<Compile Include="GameHost.cs" /> <Compile Include="GameHost.cs" />
<Compile Include="Design\GamerServices\Achievement.cs" />
<Compile Include="Design\GamerServices\AchievementCollection.cs" />
<Compile Include="Design\GamerServices\AvatarAnimation.cs" />
<Compile Include="Design\GamerServices\AvatarAnimationPreset.cs" />
<Compile Include="Design\GamerServices\AvatarBodyType.cs" />
<Compile Include="Design\GamerServices\AvatarBone.cs" />
<Compile Include="Design\GamerServices\AvatarDescription.cs" />
<Compile Include="Design\GamerServices\AvatarExpression.cs" />
<Compile Include="Design\GamerServices\AvatarEye.cs" />
<Compile Include="Design\GamerServices\AvatarEyebrow.cs" />
<Compile Include="Design\GamerServices\AvatarMouth.cs" />
<Compile Include="Design\GamerServices\AvatarRenderer.cs" />
<Compile Include="Design\GamerServices\AvatarRendererState.cs" />
<Compile Include="Design\GamerServices\ControllerSensitivity.cs" />
<Compile Include="Design\GamerServices\FriendCollection.cs" />
<Compile Include="Design\GamerServices\FriendGamer.cs" />
<Compile Include="Design\GamerServices\GameDefaults.cs" />
<Compile Include="Design\GamerServices\GameDifficulty.cs" />
<Compile Include="Design\GamerServices\GamerCollection.cs" />
<Compile Include="Design\GamerServices\GamerPresence.cs" />
<Compile Include="Design\GamerServices\GamerPresenceMode.cs" />
<Compile Include="Design\GamerServices\GamerPrivilegeException.cs" />
<Compile Include="Design\GamerServices\GamerPrivileges.cs" />
<Compile Include="Design\GamerServices\GamerPrivilegeSetting.cs" />
<Compile Include="Design\GamerServices\GamerProfile.cs" />
<Compile Include="Design\GamerServices\GamerServicesComponent.cs" />
<Compile Include="Design\GamerServices\GamerServicesDispatcher.cs" />
<Compile Include="Design\GamerServices\GamerServicesNotAvailableException.cs" />
<Compile Include="Design\GamerServices\GamerZone.cs" />
<Compile Include="Design\GamerServices\GameUpdateRequiredException.cs" />
<Compile Include="Design\GamerServices\Guide.cs" />
<Compile Include="Design\GamerServices\GuideAlreadyVisibleException.cs" />
<Compile Include="Design\GamerServices\IAvatarAnimation.cs" />
<Compile Include="Design\GamerServices\Gamer.cs" />
<Compile Include="Design\GamerServices\InviteAcceptedEventArgs.cs" />
<Compile Include="Design\GamerServices\LeaderboardEntry.cs" />
<Compile Include="Design\GamerServices\LeaderboardIdentity.cs" />
<Compile Include="Design\GamerServices\LeaderboardKey.cs" />
<Compile Include="Design\GamerServices\LeaderboardOutcome.cs" />
<Compile Include="Design\GamerServices\LeaderboardReader.cs" />
<Compile Include="Design\GamerServices\LeaderboardWriter.cs" />
<Compile Include="Design\GamerServices\MessageBoxIcon.cs" />
<Compile Include="Design\GamerServices\NetworkException.cs" />
<Compile Include="Design\GamerServices\NetworkNotAvailableException.cs" />
<Compile Include="Design\GamerServices\NotificationPosition.cs" />
<Compile Include="Design\GamerServices\PropertyDictionary.cs" />
<Compile Include="Design\GamerServices\RacingCameraAngle.cs" />
<Compile Include="Design\GamerServices\SignedInEventArgs.cs" />
<Compile Include="Design\GamerServices\SignedInGamer.cs" />
<Compile Include="Design\GamerServices\SignedInGamerCollection.cs" />
<Compile Include="Design\GamerServices\SignedOutEventArgs.cs" />
<Compile Include="GameServiceContainer.cs" /> <Compile Include="GameServiceContainer.cs" />
<Compile Include="GameTime.cs" /> <Compile Include="GameTime.cs" />
<Compile Include="GameTimer.cs" /> <Compile Include="GameTimer.cs" />