From 7edaf675b12eaa0270729e42447f5d25018f365c Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 19 Feb 2014 22:04:04 -0700 Subject: [PATCH] Adding testing stubs. Added basic Vector3 functionality. --- include/Debug.h | 6 ++++++ tests/.gitignore | 3 ++- tests/UnitTest.h | 1 + tests/Vector3Tests.h | 11 +++++++++++ tests/main.cpp | 4 ++++ tests/premake4.lua | 12 ++++++------ 6 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 tests/UnitTest.h create mode 100644 tests/Vector3Tests.h diff --git a/include/Debug.h b/include/Debug.h index e69de29..5ff165b 100644 --- a/include/Debug.h +++ b/include/Debug.h @@ -0,0 +1,6 @@ +#ifndef __DEBUG_H__ +#define __DEBUG_H__ + +// TODO: add assert macros and maybe some simple logging functionality + +#endif //__DEBUG_H__ diff --git a/tests/.gitignore b/tests/.gitignore index 84d5d3b..66df8dc 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -5,4 +5,5 @@ !.gitignore !main.cpp -!premake4.lua \ No newline at end of file +!premake4.lua +!*.h \ No newline at end of file diff --git a/tests/UnitTest.h b/tests/UnitTest.h new file mode 100644 index 0000000..f1fd3e2 --- /dev/null +++ b/tests/UnitTest.h @@ -0,0 +1 @@ +// TODO: look into using a library, or just create something really simple for testing. \ No newline at end of file diff --git a/tests/Vector3Tests.h b/tests/Vector3Tests.h new file mode 100644 index 0000000..1cf1aaa --- /dev/null +++ b/tests/Vector3Tests.h @@ -0,0 +1,11 @@ +#ifndef __VECTOR3TESTS_H__ +#define __VECTOR3TESTS_H__ + +# include "UnitTest.h" + + class Vector3Tests // inherit from UnitTest + { + public: + }; + +#endif //__VECTOR3TESTS_H__ diff --git a/tests/main.cpp b/tests/main.cpp index 3e04938..262d0c9 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -1,6 +1,10 @@ #include "math/Vector3.h" +// Testing Headers +#include "Vector3Tests.h" + int main() { + return 0; } \ No newline at end of file diff --git a/tests/premake4.lua b/tests/premake4.lua index 4d72b03..38808e4 100644 --- a/tests/premake4.lua +++ b/tests/premake4.lua @@ -35,6 +35,11 @@ solution "tests" "../include", } + configuration { "x64", "debug" } + targetsuffix "x64_d" + configuration { "x64", "release" } + targetsuffix "x64" + configuration "Debug" defines { "DEBUG", "USE_CHEATS", "TRACE" } flags { "Symbols" } @@ -42,9 +47,4 @@ solution "tests" configuration "Release" defines { "NDEBUG", "USE_CHEATS", "TRACE" } - flags { "Optimize" } - - configuration { "x64", "debug" } - targetsuffix "x64_d" - configuration { "x64", "release" } - targetsuffix "x64" \ No newline at end of file + flags { "Optimize" } \ No newline at end of file