add test [Parallelizable]

This commit is contained in:
ikpil 2023-04-25 23:22:44 +09:00
parent e5d7cca6c6
commit 4002d1e18b
38 changed files with 39 additions and 0 deletions

View File

@ -28,6 +28,7 @@ namespace DotRecast.Detour.Crowd.Test;
using static DotRecast.Core.RecastMath; using static DotRecast.Core.RecastMath;
[Parallelizable]
public class AbstractCrowdTest public class AbstractCrowdTest
{ {
protected readonly long[] startRefs = protected readonly long[] startRefs =

View File

@ -22,6 +22,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Crowd.Test; namespace DotRecast.Detour.Crowd.Test;
[Parallelizable]
public class Crowd1Test : AbstractCrowdTest public class Crowd1Test : AbstractCrowdTest
{ {
static readonly float[][] EXPECTED_A1Q0TVTA = static readonly float[][] EXPECTED_A1Q0TVTA =

View File

@ -24,6 +24,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Crowd.Test; namespace DotRecast.Detour.Crowd.Test;
[Parallelizable]
public class Crowd4Test : AbstractCrowdTest public class Crowd4Test : AbstractCrowdTest
{ {
static readonly float[][] EXPECTED_A1Q2TVTA = static readonly float[][] EXPECTED_A1Q2TVTA =

View File

@ -22,6 +22,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Crowd.Test; namespace DotRecast.Detour.Crowd.Test;
[Parallelizable]
public class Crowd4VelocityTest : AbstractCrowdTest public class Crowd4VelocityTest : AbstractCrowdTest
{ {
static readonly float[][] EXPECTED_A1Q3TVTA = static readonly float[][] EXPECTED_A1Q3TVTA =

View File

@ -24,6 +24,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Crowd.Test; namespace DotRecast.Detour.Crowd.Test;
[Parallelizable]
public class PathCorridorTest public class PathCorridorTest
{ {
private readonly PathCorridor corridor = new PathCorridor(); private readonly PathCorridor corridor = new PathCorridor();

View File

@ -9,6 +9,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Dynamic.Test; namespace DotRecast.Detour.Dynamic.Test;
[Parallelizable]
public class DynamicNavMeshTest public class DynamicNavMeshTest
{ {
private static readonly Vector3f START_POS = Vector3f.Of(70.87453f, 0.0010070801f, 86.69021f); private static readonly Vector3f START_POS = Vector3f.Of(70.87453f, 0.0010070801f, 86.69021f);

View File

@ -23,6 +23,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Dynamic.Test.Io; namespace DotRecast.Detour.Dynamic.Test.Io;
[Parallelizable]
public class VoxelFileReaderTest public class VoxelFileReaderTest
{ {
[Test] [Test]

View File

@ -23,6 +23,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Dynamic.Test.Io; namespace DotRecast.Detour.Dynamic.Test.Io;
[Parallelizable]
public class VoxelFileReaderWriterTest public class VoxelFileReaderWriterTest
{ {
[TestCase(false)] [TestCase(false)]

View File

@ -28,6 +28,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Dynamic.Test; namespace DotRecast.Detour.Dynamic.Test;
[Parallelizable]
public class VoxelQueryTest public class VoxelQueryTest
{ {
private const int TILE_WIDTH = 100; private const int TILE_WIDTH = 100;

View File

@ -27,6 +27,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Extras.Test.Unity.Astar; namespace DotRecast.Detour.Extras.Test.Unity.Astar;
[Parallelizable]
public class UnityAStarPathfindingImporterTest public class UnityAStarPathfindingImporterTest
{ {
[Test] [Test]

View File

@ -21,6 +21,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Test; namespace DotRecast.Detour.Test;
[Parallelizable]
public abstract class AbstractDetourTest public abstract class AbstractDetourTest
{ {
protected static readonly long[] startRefs = protected static readonly long[] startRefs =

View File

@ -20,6 +20,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Test; namespace DotRecast.Detour.Test;
[Parallelizable]
public class ConvexConvexIntersectionTest public class ConvexConvexIntersectionTest
{ {
[Test] [Test]

View File

@ -22,6 +22,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Test; namespace DotRecast.Detour.Test;
[Parallelizable]
public class FindDistanceToWallTest : AbstractDetourTest public class FindDistanceToWallTest : AbstractDetourTest
{ {
private static readonly float[] DISTANCES_TO_WALL = { 0.597511f, 3.201085f, 0.603713f, 2.791475f, 2.815544f }; private static readonly float[] DISTANCES_TO_WALL = { 0.597511f, 3.201085f, 0.603713f, 2.791475f, 2.815544f };

View File

@ -22,6 +22,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Test; namespace DotRecast.Detour.Test;
[Parallelizable]
public class FindLocalNeighbourhoodTest : AbstractDetourTest public class FindLocalNeighbourhoodTest : AbstractDetourTest
{ {
private static readonly long[][] REFS = private static readonly long[][] REFS =

View File

@ -22,6 +22,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Test; namespace DotRecast.Detour.Test;
[Parallelizable]
public class FindNearestPolyTest : AbstractDetourTest public class FindNearestPolyTest : AbstractDetourTest
{ {
private static readonly long[] POLY_REFS = { 281474976710696L, 281474976710773L, 281474976710680L, 281474976710753L, 281474976710733L }; private static readonly long[] POLY_REFS = { 281474976710696L, 281474976710773L, 281474976710680L, 281474976710753L, 281474976710733L };

View File

@ -23,6 +23,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Test; namespace DotRecast.Detour.Test;
[Parallelizable]
public class FindPathTest : AbstractDetourTest public class FindPathTest : AbstractDetourTest
{ {
private static readonly Status[] STATUSES = private static readonly Status[] STATUSES =

View File

@ -22,6 +22,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Test; namespace DotRecast.Detour.Test;
[Parallelizable]
public class FindPolysAroundCircleTest : AbstractDetourTest public class FindPolysAroundCircleTest : AbstractDetourTest
{ {
private static readonly long[][] REFS = private static readonly long[][] REFS =

View File

@ -22,6 +22,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Test; namespace DotRecast.Detour.Test;
[Parallelizable]
public class FindPolysAroundShapeTest : AbstractDetourTest public class FindPolysAroundShapeTest : AbstractDetourTest
{ {
private static readonly long[][] REFS = private static readonly long[][] REFS =

View File

@ -21,6 +21,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Test; namespace DotRecast.Detour.Test;
[Parallelizable]
public class GetPolyWallSegmentsTest : AbstractDetourTest public class GetPolyWallSegmentsTest : AbstractDetourTest
{ {
private static readonly float[][] VERTICES = private static readonly float[][] VERTICES =

View File

@ -23,6 +23,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Test.Io; namespace DotRecast.Detour.Test.Io;
[Parallelizable]
public class MeshDataReaderWriterTest public class MeshDataReaderWriterTest
{ {
private const int VERTS_PER_POLYGON = 6; private const int VERTS_PER_POLYGON = 6;

View File

@ -24,6 +24,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Test.Io; namespace DotRecast.Detour.Test.Io;
[Parallelizable]
public class MeshSetReaderTest public class MeshSetReaderTest
{ {
private readonly MeshSetReader reader = new MeshSetReader(); private readonly MeshSetReader reader = new MeshSetReader();

View File

@ -27,6 +27,7 @@ using static DotRecast.Core.RecastMath;
namespace DotRecast.Detour.Test.Io; namespace DotRecast.Detour.Test.Io;
[Parallelizable]
public class MeshSetReaderWriterTest public class MeshSetReaderWriterTest
{ {
private readonly MeshSetWriter writer = new MeshSetWriter(); private readonly MeshSetWriter writer = new MeshSetWriter();

View File

@ -22,6 +22,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Test; namespace DotRecast.Detour.Test;
[Parallelizable]
public class MoveAlongSurfaceTest : AbstractDetourTest public class MoveAlongSurfaceTest : AbstractDetourTest
{ {
private static readonly long[][] VISITED = private static readonly long[][] VISITED =

View File

@ -20,6 +20,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Test; namespace DotRecast.Detour.Test;
[Parallelizable]
public class NavMeshBuilderTest public class NavMeshBuilderTest
{ {
private MeshData nmd; private MeshData nmd;

View File

@ -21,6 +21,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Test; namespace DotRecast.Detour.Test;
[Parallelizable]
public class PolygonByCircleConstraintTest public class PolygonByCircleConstraintTest
{ {
private readonly PolygonByCircleConstraint constraint = new PolygonByCircleConstraint.StrictPolygonByCircleConstraint(); private readonly PolygonByCircleConstraint constraint = new PolygonByCircleConstraint.StrictPolygonByCircleConstraint();

View File

@ -25,6 +25,7 @@ using static DotRecast.Core.RecastMath;
namespace DotRecast.Detour.Test; namespace DotRecast.Detour.Test;
[Parallelizable]
public class RandomPointTest : AbstractDetourTest public class RandomPointTest : AbstractDetourTest
{ {
[Test] [Test]

View File

@ -23,6 +23,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.Test; namespace DotRecast.Detour.Test;
[Parallelizable]
public class TiledFindPathTest public class TiledFindPathTest
{ {
private static readonly Status[] STATUSES = { Status.SUCCSESS }; private static readonly Status[] STATUSES = { Status.SUCCSESS };

View File

@ -21,11 +21,13 @@ freely, subject to the following restrictions:
using DotRecast.Core; using DotRecast.Core;
using DotRecast.Detour.TileCache.Io.Compress; using DotRecast.Detour.TileCache.Io.Compress;
using DotRecast.Recast.Geom; using DotRecast.Recast.Geom;
using NUnit.Framework;
using static DotRecast.Core.RecastMath; using static DotRecast.Core.RecastMath;
using static DotRecast.Recast.RecastVectors; using static DotRecast.Recast.RecastVectors;
namespace DotRecast.Detour.TileCache.Test; namespace DotRecast.Detour.TileCache.Test;
[Parallelizable]
public class AbstractTileCacheTest public class AbstractTileCacheTest
{ {
private const int EXPECTED_LAYERS_PER_TILE = 4; private const int EXPECTED_LAYERS_PER_TILE = 4;

View File

@ -26,6 +26,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.TileCache.Test.Io; namespace DotRecast.Detour.TileCache.Test.Io;
[Parallelizable]
public class TileCacheReaderTest public class TileCacheReaderTest
{ {
private readonly TileCacheReader reader = new TileCacheReader(); private readonly TileCacheReader reader = new TileCacheReader();

View File

@ -28,6 +28,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.TileCache.Test.Io; namespace DotRecast.Detour.TileCache.Test.Io;
[Parallelizable]
public class TileCacheReaderWriterTest : AbstractTileCacheTest public class TileCacheReaderWriterTest : AbstractTileCacheTest
{ {
private readonly TileCacheReader reader = new TileCacheReader(); private readonly TileCacheReader reader = new TileCacheReader();

View File

@ -26,6 +26,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.TileCache.Test; namespace DotRecast.Detour.TileCache.Test;
[Parallelizable]
public class TempObstaclesTest : AbstractTileCacheTest public class TempObstaclesTest : AbstractTileCacheTest
{ {
[Test] [Test]

View File

@ -27,6 +27,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.TileCache.Test; namespace DotRecast.Detour.TileCache.Test;
[Parallelizable]
public class TileCacheFindPathTest : AbstractTileCacheTest public class TileCacheFindPathTest : AbstractTileCacheTest
{ {
private readonly Vector3f start = Vector3f.Of(39.44734f, 9.998177f, -0.784811f); private readonly Vector3f start = Vector3f.Of(39.44734f, 9.998177f, -0.784811f);

View File

@ -27,6 +27,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.TileCache.Test; namespace DotRecast.Detour.TileCache.Test;
[Parallelizable]
public class TileCacheNavigationTest : AbstractTileCacheTest public class TileCacheNavigationTest : AbstractTileCacheTest
{ {
protected readonly long[] startRefs = { 281475006070787L }; protected readonly long[] startRefs = { 281475006070787L };

View File

@ -28,6 +28,7 @@ using NUnit.Framework;
namespace DotRecast.Detour.TileCache.Test; namespace DotRecast.Detour.TileCache.Test;
[Parallelizable]
public class TileCacheTest : AbstractTileCacheTest public class TileCacheTest : AbstractTileCacheTest
{ {
[Test] [Test]

View File

@ -26,6 +26,7 @@ namespace DotRecast.Recast.Test;
using static RecastConstants; using static RecastConstants;
[Parallelizable]
public class RecastLayersTest public class RecastLayersTest
{ {
private const float m_cellSize = 0.3f; private const float m_cellSize = 0.3f;

View File

@ -27,6 +27,7 @@ namespace DotRecast.Recast.Test;
using static RecastConstants; using static RecastConstants;
[Parallelizable]
public class RecastSoloMeshTest public class RecastSoloMeshTest
{ {
private const float m_cellSize = 0.3f; private const float m_cellSize = 0.3f;

View File

@ -22,6 +22,7 @@ namespace DotRecast.Recast.Test;
using static RecastConstants; using static RecastConstants;
[Parallelizable]
public class RecastTest public class RecastTest
{ {
[Test] [Test]

View File

@ -31,6 +31,7 @@ namespace DotRecast.Recast.Test;
using static RecastConstants; using static RecastConstants;
[Parallelizable]
public class RecastTileMeshTest public class RecastTileMeshTest
{ {
private const float m_cellSize = 0.3f; private const float m_cellSize = 0.3f;