remove yaml-cpp from root directory, Add tests project
This commit is contained in:
parent
e52db0fafd
commit
f7e087ee8d
33
Tests/EngineTest.cpp
Normal file
33
Tests/EngineTest.cpp
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#include <YoggieEngine.h>
|
||||||
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
|
||||||
|
TEST(HelloTDD, MyFirstTest) {
|
||||||
|
EXPECT_EQ(1, 1);
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST(TRANSFORM_COMPONENT_TESTS , CAN_EXTRACT_TRANSLATION_FROM_TRANSFORM_MATRIX) {
|
||||||
|
|
||||||
|
auto component = YoggieEngine::TransformComponent{};
|
||||||
|
|
||||||
|
component.Position = glm::vec3(1.0f, 2.0f, 3.0f);
|
||||||
|
auto transformationMatrix = component.GetTransform();
|
||||||
|
|
||||||
|
auto newComponent = YoggieEngine::TransformComponent{};
|
||||||
|
|
||||||
|
newComponent.Decompose(transformationMatrix);
|
||||||
|
|
||||||
|
EXPECT_EQ(newComponent.Position.x, component.Position.x);
|
||||||
|
EXPECT_EQ(newComponent.Position.y, component.Position.y);
|
||||||
|
EXPECT_EQ(newComponent.Position.z, component.Position.z);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main(int argc, char** argv) {
|
||||||
|
|
||||||
|
|
||||||
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
|
return RUN_ALL_TESTS();
|
||||||
|
|
||||||
|
}
|
32
Tests/premake5.lua
Normal file
32
Tests/premake5.lua
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
project "EngineTests"
|
||||||
|
kind "ConsoleApp"
|
||||||
|
language "C++"
|
||||||
|
targetdir "bin/%{cfg.buildcfg}"
|
||||||
|
|
||||||
|
files{"**.h", "**.cpp"}
|
||||||
|
|
||||||
|
includedirs{
|
||||||
|
"../YoggieEngine/src",
|
||||||
|
incfolder["lua"],
|
||||||
|
incfolder["spdlog"],
|
||||||
|
incfolder["glm"],
|
||||||
|
incfolder["glad"],
|
||||||
|
incfolder["glfw"],
|
||||||
|
incfolder["imgui"],
|
||||||
|
incfolder["imguizmo"],
|
||||||
|
incfolder["entt"],
|
||||||
|
"../libs/physx/physx/include",
|
||||||
|
"../libs/physx/pxshared/include",
|
||||||
|
incfolder["GoogleTest"]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
libdirs {
|
||||||
|
staticlib["yoggie"],
|
||||||
|
staticlib["GoogleTest"]
|
||||||
|
}
|
||||||
|
|
||||||
|
links{
|
||||||
|
"YoggieEngine",
|
||||||
|
"gtest"
|
||||||
|
}
|
@ -38,6 +38,7 @@ project "YoggieEngine"
|
|||||||
"../libs/steam-audio/include",
|
"../libs/steam-audio/include",
|
||||||
|
|
||||||
"../libs/ImGui",
|
"../libs/ImGui",
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
links {
|
links {
|
||||||
@ -65,8 +66,7 @@ project "YoggieEngine"
|
|||||||
"../libs/spdlog/build/Release",
|
"../libs/spdlog/build/Release",
|
||||||
"../libs/assimp/lib/Debug",
|
"../libs/assimp/lib/Debug",
|
||||||
"../libs/glfw/build/src/Debug",
|
"../libs/glfw/build/src/Debug",
|
||||||
"../libs/physx/physx/bin/win.x86_64.vc142.md/debug"
|
"../libs/physx/physx/bin/win.x86_64.vc142.md/debug",
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
files {
|
files {
|
||||||
|
@ -7,6 +7,8 @@ incfolder["glm"] = "%{wks.location}/libs/glm"
|
|||||||
incfolder["entt"] = "%{wks.location}/libs/entt/src"
|
incfolder["entt"] = "%{wks.location}/libs/entt/src"
|
||||||
incfolder["yamlcpp"] = "%{wks.location}/libs/yaml-cpp/include"
|
incfolder["yamlcpp"] = "%{wks.location}/libs/yaml-cpp/include"
|
||||||
incfolder["mINI"] = "%{wks.location}/libs/mINI/src"
|
incfolder["mINI"] = "%{wks.location}/libs/mINI/src"
|
||||||
|
incfolder["GoogleTest"] = "%{wks.location}/libs/googletest/googletest/include"
|
||||||
|
|
||||||
-- Graphics
|
-- Graphics
|
||||||
incfolder["glad"] = "%{wks.location}/libs/glad/include"
|
incfolder["glad"] = "%{wks.location}/libs/glad/include"
|
||||||
incfolder["glfw"] = "%{wks.location}/libs/glfw/include"
|
incfolder["glfw"] = "%{wks.location}/libs/glfw/include"
|
||||||
@ -32,4 +34,4 @@ staticlib = {}
|
|||||||
|
|
||||||
staticlib["yoggie"] = "Yoggie/build/Debug"
|
staticlib["yoggie"] = "Yoggie/build/Debug"
|
||||||
staticlib["nativefiledialog"]= "%{wks.location}/libs/nativefiledialog/build/lib/Release/x64"
|
staticlib["nativefiledialog"]= "%{wks.location}/libs/nativefiledialog/build/lib/Release/x64"
|
||||||
|
staticlib["GoogleTest"] = "%{wks.location}/libs/googletest/build/lib/Debug"
|
||||||
|
19
premake5.lua
19
premake5.lua
@ -2,14 +2,14 @@ include("libraries")
|
|||||||
print("Using Premake version ", _PREMAKE_VERSION)
|
print("Using Premake version ", _PREMAKE_VERSION)
|
||||||
|
|
||||||
workspace "Yoggie GameEngine"
|
workspace "Yoggie GameEngine"
|
||||||
configurations { "Debug", "Test", "Release" }
|
configurations { "Debug", "Release" }
|
||||||
|
|
||||||
language "C++"
|
language "C++"
|
||||||
cppdialect "C++17"
|
cppdialect "C++17"
|
||||||
architecture "x86_64"
|
architecture "x86_64"
|
||||||
|
|
||||||
targetdir "./%{prj.name}/build/%{cfg.buildcfg}"
|
targetdir "%{wks.location}/libs/%{prj.name}/build/%{cfg.buildcfg}"
|
||||||
objdir "./%{prj.name}/build/%{cfg.buildcfg}/intermediates/"
|
objdir "%{wks.location}/libs/%{prj.name}/build/%{cfg.buildcfg}/intermediates/"
|
||||||
|
|
||||||
startproject("Editor")
|
startproject("Editor")
|
||||||
|
|
||||||
@ -31,17 +31,14 @@ workspace "Yoggie GameEngine"
|
|||||||
|
|
||||||
include("./YoggieEngine")
|
include("./YoggieEngine")
|
||||||
include ("./Editor")
|
include ("./Editor")
|
||||||
|
include ("./Tests")
|
||||||
|
|
||||||
group("Other")
|
group("Other")
|
||||||
includeexternal("./SandboxApp")
|
include("./SandboxApp")
|
||||||
includeexternal("./Runtime")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
group("Libraries")
|
group("Libraries")
|
||||||
include('ImGui')
|
include('libs/ImGui')
|
||||||
include("ImGuizmo")
|
include("libs/guizmo")
|
||||||
include("yaml-cpp")
|
include("libs/yaml-cpp")
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
project "yaml-cpp"
|
|
||||||
kind "StaticLib"
|
|
||||||
|
|
||||||
buildmessage "Building YAML parser ..."
|
|
||||||
|
|
||||||
includedirs{
|
|
||||||
"../libs/yaml-cpp/include"
|
|
||||||
}
|
|
||||||
|
|
||||||
files{
|
|
||||||
"../libs/yaml-cpp/src/*.h",
|
|
||||||
"../libs/yaml-cpp/src/*.cpp"
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user