remove yaml-cpp from root directory, Add tests project
This commit is contained in:
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"
|
||||
}
|
Reference in New Issue
Block a user