forked from bit/DotRecastNetSim
add test [Parallelizable]
This commit is contained in:
parent
e5d7cca6c6
commit
4002d1e18b
|
@ -28,6 +28,7 @@ namespace DotRecast.Detour.Crowd.Test;
|
|||
|
||||
using static DotRecast.Core.RecastMath;
|
||||
|
||||
[Parallelizable]
|
||||
public class AbstractCrowdTest
|
||||
{
|
||||
protected readonly long[] startRefs =
|
||||
|
|
|
@ -22,6 +22,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Crowd.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class Crowd1Test : AbstractCrowdTest
|
||||
{
|
||||
static readonly float[][] EXPECTED_A1Q0TVTA =
|
||||
|
|
|
@ -24,6 +24,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Crowd.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class Crowd4Test : AbstractCrowdTest
|
||||
{
|
||||
static readonly float[][] EXPECTED_A1Q2TVTA =
|
||||
|
|
|
@ -22,6 +22,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Crowd.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class Crowd4VelocityTest : AbstractCrowdTest
|
||||
{
|
||||
static readonly float[][] EXPECTED_A1Q3TVTA =
|
||||
|
|
|
@ -24,6 +24,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Crowd.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class PathCorridorTest
|
||||
{
|
||||
private readonly PathCorridor corridor = new PathCorridor();
|
||||
|
|
|
@ -9,6 +9,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Dynamic.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class DynamicNavMeshTest
|
||||
{
|
||||
private static readonly Vector3f START_POS = Vector3f.Of(70.87453f, 0.0010070801f, 86.69021f);
|
||||
|
|
|
@ -23,6 +23,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Dynamic.Test.Io;
|
||||
|
||||
[Parallelizable]
|
||||
public class VoxelFileReaderTest
|
||||
{
|
||||
[Test]
|
||||
|
|
|
@ -23,6 +23,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Dynamic.Test.Io;
|
||||
|
||||
[Parallelizable]
|
||||
public class VoxelFileReaderWriterTest
|
||||
{
|
||||
[TestCase(false)]
|
||||
|
|
|
@ -28,6 +28,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Dynamic.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class VoxelQueryTest
|
||||
{
|
||||
private const int TILE_WIDTH = 100;
|
||||
|
|
|
@ -27,6 +27,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Extras.Test.Unity.Astar;
|
||||
|
||||
[Parallelizable]
|
||||
public class UnityAStarPathfindingImporterTest
|
||||
{
|
||||
[Test]
|
||||
|
|
|
@ -21,6 +21,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public abstract class AbstractDetourTest
|
||||
{
|
||||
protected static readonly long[] startRefs =
|
||||
|
|
|
@ -20,6 +20,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class ConvexConvexIntersectionTest
|
||||
{
|
||||
[Test]
|
||||
|
|
|
@ -22,6 +22,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class FindDistanceToWallTest : AbstractDetourTest
|
||||
{
|
||||
private static readonly float[] DISTANCES_TO_WALL = { 0.597511f, 3.201085f, 0.603713f, 2.791475f, 2.815544f };
|
||||
|
|
|
@ -22,6 +22,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class FindLocalNeighbourhoodTest : AbstractDetourTest
|
||||
{
|
||||
private static readonly long[][] REFS =
|
||||
|
|
|
@ -22,6 +22,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class FindNearestPolyTest : AbstractDetourTest
|
||||
{
|
||||
private static readonly long[] POLY_REFS = { 281474976710696L, 281474976710773L, 281474976710680L, 281474976710753L, 281474976710733L };
|
||||
|
|
|
@ -23,6 +23,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class FindPathTest : AbstractDetourTest
|
||||
{
|
||||
private static readonly Status[] STATUSES =
|
||||
|
|
|
@ -22,6 +22,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class FindPolysAroundCircleTest : AbstractDetourTest
|
||||
{
|
||||
private static readonly long[][] REFS =
|
||||
|
|
|
@ -22,6 +22,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class FindPolysAroundShapeTest : AbstractDetourTest
|
||||
{
|
||||
private static readonly long[][] REFS =
|
||||
|
|
|
@ -21,6 +21,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class GetPolyWallSegmentsTest : AbstractDetourTest
|
||||
{
|
||||
private static readonly float[][] VERTICES =
|
||||
|
|
|
@ -23,6 +23,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Test.Io;
|
||||
|
||||
[Parallelizable]
|
||||
public class MeshDataReaderWriterTest
|
||||
{
|
||||
private const int VERTS_PER_POLYGON = 6;
|
||||
|
|
|
@ -24,6 +24,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Test.Io;
|
||||
|
||||
[Parallelizable]
|
||||
public class MeshSetReaderTest
|
||||
{
|
||||
private readonly MeshSetReader reader = new MeshSetReader();
|
||||
|
|
|
@ -27,6 +27,7 @@ using static DotRecast.Core.RecastMath;
|
|||
|
||||
namespace DotRecast.Detour.Test.Io;
|
||||
|
||||
[Parallelizable]
|
||||
public class MeshSetReaderWriterTest
|
||||
{
|
||||
private readonly MeshSetWriter writer = new MeshSetWriter();
|
||||
|
|
|
@ -22,6 +22,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class MoveAlongSurfaceTest : AbstractDetourTest
|
||||
{
|
||||
private static readonly long[][] VISITED =
|
||||
|
|
|
@ -20,6 +20,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class NavMeshBuilderTest
|
||||
{
|
||||
private MeshData nmd;
|
||||
|
|
|
@ -21,6 +21,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class PolygonByCircleConstraintTest
|
||||
{
|
||||
private readonly PolygonByCircleConstraint constraint = new PolygonByCircleConstraint.StrictPolygonByCircleConstraint();
|
||||
|
|
|
@ -25,6 +25,7 @@ using static DotRecast.Core.RecastMath;
|
|||
|
||||
namespace DotRecast.Detour.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class RandomPointTest : AbstractDetourTest
|
||||
{
|
||||
[Test]
|
||||
|
|
|
@ -23,6 +23,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class TiledFindPathTest
|
||||
{
|
||||
private static readonly Status[] STATUSES = { Status.SUCCSESS };
|
||||
|
|
|
@ -21,11 +21,13 @@ freely, subject to the following restrictions:
|
|||
using DotRecast.Core;
|
||||
using DotRecast.Detour.TileCache.Io.Compress;
|
||||
using DotRecast.Recast.Geom;
|
||||
using NUnit.Framework;
|
||||
using static DotRecast.Core.RecastMath;
|
||||
using static DotRecast.Recast.RecastVectors;
|
||||
|
||||
namespace DotRecast.Detour.TileCache.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class AbstractTileCacheTest
|
||||
{
|
||||
private const int EXPECTED_LAYERS_PER_TILE = 4;
|
||||
|
|
|
@ -26,6 +26,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.TileCache.Test.Io;
|
||||
|
||||
[Parallelizable]
|
||||
public class TileCacheReaderTest
|
||||
{
|
||||
private readonly TileCacheReader reader = new TileCacheReader();
|
||||
|
|
|
@ -28,6 +28,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.TileCache.Test.Io;
|
||||
|
||||
[Parallelizable]
|
||||
public class TileCacheReaderWriterTest : AbstractTileCacheTest
|
||||
{
|
||||
private readonly TileCacheReader reader = new TileCacheReader();
|
||||
|
|
|
@ -26,6 +26,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.TileCache.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class TempObstaclesTest : AbstractTileCacheTest
|
||||
{
|
||||
[Test]
|
||||
|
|
|
@ -27,6 +27,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.TileCache.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class TileCacheFindPathTest : AbstractTileCacheTest
|
||||
{
|
||||
private readonly Vector3f start = Vector3f.Of(39.44734f, 9.998177f, -0.784811f);
|
||||
|
|
|
@ -27,6 +27,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.TileCache.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class TileCacheNavigationTest : AbstractTileCacheTest
|
||||
{
|
||||
protected readonly long[] startRefs = { 281475006070787L };
|
||||
|
|
|
@ -28,6 +28,7 @@ using NUnit.Framework;
|
|||
|
||||
namespace DotRecast.Detour.TileCache.Test;
|
||||
|
||||
[Parallelizable]
|
||||
public class TileCacheTest : AbstractTileCacheTest
|
||||
{
|
||||
[Test]
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace DotRecast.Recast.Test;
|
|||
|
||||
using static RecastConstants;
|
||||
|
||||
[Parallelizable]
|
||||
public class RecastLayersTest
|
||||
{
|
||||
private const float m_cellSize = 0.3f;
|
||||
|
|
|
@ -27,6 +27,7 @@ namespace DotRecast.Recast.Test;
|
|||
|
||||
using static RecastConstants;
|
||||
|
||||
[Parallelizable]
|
||||
public class RecastSoloMeshTest
|
||||
{
|
||||
private const float m_cellSize = 0.3f;
|
||||
|
|
|
@ -22,6 +22,7 @@ namespace DotRecast.Recast.Test;
|
|||
|
||||
using static RecastConstants;
|
||||
|
||||
[Parallelizable]
|
||||
public class RecastTest
|
||||
{
|
||||
[Test]
|
||||
|
|
|
@ -31,6 +31,7 @@ namespace DotRecast.Recast.Test;
|
|||
|
||||
using static RecastConstants;
|
||||
|
||||
[Parallelizable]
|
||||
public class RecastTileMeshTest
|
||||
{
|
||||
private const float m_cellSize = 0.3f;
|
||||
|
|
Loading…
Reference in New Issue