Annoying test project is now less annoying.
This commit is contained in:
+2
-2
@@ -39,12 +39,12 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<IncludePath>$(SolutionDir)\Escape-the-Dawn\;$(BOOST_ROOT);$(IncludePath)</IncludePath>
|
||||
<IncludePath>$(SolutionDir)\Escape-the-Dawn\;$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(BOOST_ROOT);$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(BOOST_ROOT)\lib32-msvc-11.0;$(LibraryPath)</LibraryPath>
|
||||
<OutDir>$(ProjectDir)$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<IncludePath>$(SolutionDir)\Escape-the-Dawn\;$(BOOST_ROOT);$(IncludePath)</IncludePath>
|
||||
<IncludePath>$(SolutionDir)\Escape-the-Dawn\;$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(BOOST_ROOT);$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(BOOST_ROOT)\lib32-msvc-11.0;$(LibraryPath)</LibraryPath>
|
||||
<OutDir>$(ProjectDir)$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
|
||||
+11
-5
@@ -1,11 +1,11 @@
|
||||
#include "World.h"
|
||||
#include "Components/Transform.h"
|
||||
|
||||
#define BOOST_TEST_MODULE MyTest
|
||||
#define BOOST_TEST_MODULE World
|
||||
#define BOOST_TEST_DYN_LINK
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
BOOST_AUTO_TEST_CASE(my_test)
|
||||
BOOST_AUTO_TEST_CASE(Parenting)
|
||||
{
|
||||
World world;
|
||||
|
||||
@@ -18,9 +18,15 @@ BOOST_AUTO_TEST_CASE(my_test)
|
||||
BOOST_CHECK(ent2 != 0);
|
||||
BOOST_CHECK(ent2 == ent1 + 1);
|
||||
BOOST_CHECK(world.GetEntityParent(ent2) == ent1);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(Recycling)
|
||||
{
|
||||
World world;
|
||||
|
||||
// EntityID recycling
|
||||
world.RemoveEntity(ent2);
|
||||
EntityID ent3 = world.CreateEntity();
|
||||
BOOST_CHECK(ent2 == ent3);
|
||||
EntityID ent11 = world.CreateEntity(); // 1
|
||||
world.RemoveEntity(ent11);
|
||||
EntityID ent12 = world.CreateEntity(); // 1
|
||||
BOOST_REQUIRE(ent11 == ent12);
|
||||
}
|
||||
Reference in New Issue
Block a user