From a61f968d05d93ccf6151a7c55e379a3cf69ca4fa Mon Sep 17 00:00:00 2001 From: Lynix Date: Sat, 19 Sep 2015 01:14:19 +0200 Subject: [PATCH] UnitTests: Add build script and move current tests to "tests/Engine" directory (from "tests/Nazara") Former-commit-id: 5639305bbdbb69ad6f6f282df6c6de930220b57f --- build/scripts/tools/unittests.lua | 27 +++++++++++++++++++ tests/{Nazara => Engine}/Core/ByteArray.cpp | 0 tests/{Nazara => Engine}/Core/Clock.cpp | 0 tests/{Nazara => Engine}/Core/Color.cpp | 0 tests/{Nazara => Engine}/Core/Directory.cpp | 0 tests/{Nazara => Engine}/Core/Error.cpp | 0 tests/{Nazara => Engine}/Core/File.cpp | 0 tests/{Nazara => Engine}/Core/String.cpp | 0 .../{Nazara => Engine}/Core/StringStream.cpp | 0 tests/{Nazara => Engine}/Math/Algorithm.cpp | 0 .../Math/BoundingVolume.cpp | 0 tests/{Nazara => Engine}/Math/Box.cpp | 0 tests/{Nazara => Engine}/Math/EulerAngles.cpp | 0 tests/{Nazara => Engine}/Math/Frustum.cpp | 0 tests/{Nazara => Engine}/Math/Matrix4.cpp | 0 tests/{Nazara => Engine}/Math/OrientedBox.cpp | 0 tests/{Nazara => Engine}/Math/Plane.cpp | 0 tests/{Nazara => Engine}/Math/Quaternion.cpp | 0 tests/{Nazara => Engine}/Math/Ray.cpp | 0 tests/{Nazara => Engine}/Math/Rect.cpp | 0 tests/{Nazara => Engine}/Math/Sphere.cpp | 0 tests/{Nazara => Engine}/Math/Vector2.cpp | 0 tests/{Nazara => Engine}/Math/Vector3.cpp | 0 tests/{Nazara => Engine}/Math/Vector4.cpp | 0 24 files changed, 27 insertions(+) create mode 100644 build/scripts/tools/unittests.lua rename tests/{Nazara => Engine}/Core/ByteArray.cpp (100%) rename tests/{Nazara => Engine}/Core/Clock.cpp (100%) rename tests/{Nazara => Engine}/Core/Color.cpp (100%) rename tests/{Nazara => Engine}/Core/Directory.cpp (100%) rename tests/{Nazara => Engine}/Core/Error.cpp (100%) rename tests/{Nazara => Engine}/Core/File.cpp (100%) rename tests/{Nazara => Engine}/Core/String.cpp (100%) rename tests/{Nazara => Engine}/Core/StringStream.cpp (100%) rename tests/{Nazara => Engine}/Math/Algorithm.cpp (100%) rename tests/{Nazara => Engine}/Math/BoundingVolume.cpp (100%) rename tests/{Nazara => Engine}/Math/Box.cpp (100%) rename tests/{Nazara => Engine}/Math/EulerAngles.cpp (100%) rename tests/{Nazara => Engine}/Math/Frustum.cpp (100%) rename tests/{Nazara => Engine}/Math/Matrix4.cpp (100%) rename tests/{Nazara => Engine}/Math/OrientedBox.cpp (100%) rename tests/{Nazara => Engine}/Math/Plane.cpp (100%) rename tests/{Nazara => Engine}/Math/Quaternion.cpp (100%) rename tests/{Nazara => Engine}/Math/Ray.cpp (100%) rename tests/{Nazara => Engine}/Math/Rect.cpp (100%) rename tests/{Nazara => Engine}/Math/Sphere.cpp (100%) rename tests/{Nazara => Engine}/Math/Vector2.cpp (100%) rename tests/{Nazara => Engine}/Math/Vector3.cpp (100%) rename tests/{Nazara => Engine}/Math/Vector4.cpp (100%) diff --git a/build/scripts/tools/unittests.lua b/build/scripts/tools/unittests.lua new file mode 100644 index 000000000..cc6051297 --- /dev/null +++ b/build/scripts/tools/unittests.lua @@ -0,0 +1,27 @@ +TOOL.Name = "UnitTests" + +TOOL.Directory = "../tests" +TOOL.Kind = "ConsoleApp" + +TOOL.Defines = { +} + +TOOL.Includes = { + "../include" +} + +TOOL.Files = { + "../tests/main.cpp", + "../tests/Engine/**.cpp" +} + +TOOL.Libraries = { + "NazaraCore", + "NazaraAudio", + "NazaraLua", + "NazaraNoise", + "NazaraPhysics", + "NazaraUtility", + "NazaraRenderer", + "NazaraGraphics" +} diff --git a/tests/Nazara/Core/ByteArray.cpp b/tests/Engine/Core/ByteArray.cpp similarity index 100% rename from tests/Nazara/Core/ByteArray.cpp rename to tests/Engine/Core/ByteArray.cpp diff --git a/tests/Nazara/Core/Clock.cpp b/tests/Engine/Core/Clock.cpp similarity index 100% rename from tests/Nazara/Core/Clock.cpp rename to tests/Engine/Core/Clock.cpp diff --git a/tests/Nazara/Core/Color.cpp b/tests/Engine/Core/Color.cpp similarity index 100% rename from tests/Nazara/Core/Color.cpp rename to tests/Engine/Core/Color.cpp diff --git a/tests/Nazara/Core/Directory.cpp b/tests/Engine/Core/Directory.cpp similarity index 100% rename from tests/Nazara/Core/Directory.cpp rename to tests/Engine/Core/Directory.cpp diff --git a/tests/Nazara/Core/Error.cpp b/tests/Engine/Core/Error.cpp similarity index 100% rename from tests/Nazara/Core/Error.cpp rename to tests/Engine/Core/Error.cpp diff --git a/tests/Nazara/Core/File.cpp b/tests/Engine/Core/File.cpp similarity index 100% rename from tests/Nazara/Core/File.cpp rename to tests/Engine/Core/File.cpp diff --git a/tests/Nazara/Core/String.cpp b/tests/Engine/Core/String.cpp similarity index 100% rename from tests/Nazara/Core/String.cpp rename to tests/Engine/Core/String.cpp diff --git a/tests/Nazara/Core/StringStream.cpp b/tests/Engine/Core/StringStream.cpp similarity index 100% rename from tests/Nazara/Core/StringStream.cpp rename to tests/Engine/Core/StringStream.cpp diff --git a/tests/Nazara/Math/Algorithm.cpp b/tests/Engine/Math/Algorithm.cpp similarity index 100% rename from tests/Nazara/Math/Algorithm.cpp rename to tests/Engine/Math/Algorithm.cpp diff --git a/tests/Nazara/Math/BoundingVolume.cpp b/tests/Engine/Math/BoundingVolume.cpp similarity index 100% rename from tests/Nazara/Math/BoundingVolume.cpp rename to tests/Engine/Math/BoundingVolume.cpp diff --git a/tests/Nazara/Math/Box.cpp b/tests/Engine/Math/Box.cpp similarity index 100% rename from tests/Nazara/Math/Box.cpp rename to tests/Engine/Math/Box.cpp diff --git a/tests/Nazara/Math/EulerAngles.cpp b/tests/Engine/Math/EulerAngles.cpp similarity index 100% rename from tests/Nazara/Math/EulerAngles.cpp rename to tests/Engine/Math/EulerAngles.cpp diff --git a/tests/Nazara/Math/Frustum.cpp b/tests/Engine/Math/Frustum.cpp similarity index 100% rename from tests/Nazara/Math/Frustum.cpp rename to tests/Engine/Math/Frustum.cpp diff --git a/tests/Nazara/Math/Matrix4.cpp b/tests/Engine/Math/Matrix4.cpp similarity index 100% rename from tests/Nazara/Math/Matrix4.cpp rename to tests/Engine/Math/Matrix4.cpp diff --git a/tests/Nazara/Math/OrientedBox.cpp b/tests/Engine/Math/OrientedBox.cpp similarity index 100% rename from tests/Nazara/Math/OrientedBox.cpp rename to tests/Engine/Math/OrientedBox.cpp diff --git a/tests/Nazara/Math/Plane.cpp b/tests/Engine/Math/Plane.cpp similarity index 100% rename from tests/Nazara/Math/Plane.cpp rename to tests/Engine/Math/Plane.cpp diff --git a/tests/Nazara/Math/Quaternion.cpp b/tests/Engine/Math/Quaternion.cpp similarity index 100% rename from tests/Nazara/Math/Quaternion.cpp rename to tests/Engine/Math/Quaternion.cpp diff --git a/tests/Nazara/Math/Ray.cpp b/tests/Engine/Math/Ray.cpp similarity index 100% rename from tests/Nazara/Math/Ray.cpp rename to tests/Engine/Math/Ray.cpp diff --git a/tests/Nazara/Math/Rect.cpp b/tests/Engine/Math/Rect.cpp similarity index 100% rename from tests/Nazara/Math/Rect.cpp rename to tests/Engine/Math/Rect.cpp diff --git a/tests/Nazara/Math/Sphere.cpp b/tests/Engine/Math/Sphere.cpp similarity index 100% rename from tests/Nazara/Math/Sphere.cpp rename to tests/Engine/Math/Sphere.cpp diff --git a/tests/Nazara/Math/Vector2.cpp b/tests/Engine/Math/Vector2.cpp similarity index 100% rename from tests/Nazara/Math/Vector2.cpp rename to tests/Engine/Math/Vector2.cpp diff --git a/tests/Nazara/Math/Vector3.cpp b/tests/Engine/Math/Vector3.cpp similarity index 100% rename from tests/Nazara/Math/Vector3.cpp rename to tests/Engine/Math/Vector3.cpp diff --git a/tests/Nazara/Math/Vector4.cpp b/tests/Engine/Math/Vector4.cpp similarity index 100% rename from tests/Nazara/Math/Vector4.cpp rename to tests/Engine/Math/Vector4.cpp