Add project files.

This commit is contained in:
2018-06-25 21:48:45 -04:00
parent b04a25689b
commit 3c1b7d28e8
425 changed files with 35333 additions and 0 deletions
@@ -0,0 +1,48 @@
#include "EventEngineTest.hpp"
#include "../UTest/UTest.hpp"
/*** TrooperEngine DLL Header Files ***/
#include "TrooperEngine.hpp"
void EventEngineTest()
{
// cString
printf("\nTesting cString -----\n\n");
UTest u("cString");
const char * _ctest = " \tfoo \r\n";
cString ttest = _ctest;
u.test("cstring ctor", ttest.length() == 12);
ttest.trim();
u.test("trim", ttest.length() == 3);
cString x = "foo";
cString y = "bar";
cString z = x + "baz" + y;
u.test("concat", z.length() == 9 && memcmp(z.c_str(), "foobazbar", 10) == 0);
x = y = "foo";
u.test("foo == foo", (x == y));
u.test("foo > foo", !(x > y));
u.test("foo >= foo", (x >= y));
u.test("foo < foo", !(x < y));
u.test("foo <= foo", (x <= y));
x = "bar";
u.test("bar == foo", !(x == y));
u.test("bar > foo", !(x > y));
u.test("bar >= foo", !(x >= y));
u.test("bar < foo", (x < y));
u.test("bar <= foo", (x <= y));
u.test("foo == bar", !(y == x));
u.test("foo > bar", (y > x));
u.test("foo >= bar", (y >= x));
u.test("foo < bar", !(y < x));
u.test("foo <= bar", !(y <= x));
u.report();
}