Added EventBroker Test from the other project

This commit is contained in:
verysecrethero
2015-12-11 16:17:23 +01:00
parent d8b1f4e514
commit b3bb0e543f
4 changed files with 76 additions and 2 deletions
+19
View File
@@ -0,0 +1,19 @@
#include <boost/test/unit_test.hpp>
#include "EventFixture.h"
struct ETestEvent : public Event
{
int Int = 5;
float Float = 1.33333f;
double Double = 1.33333;
std::string String = "Hello World";
};
BOOST_AUTO_TEST_CASE(EventBrokerTest)
{
EventFixture<ETestEvent> f;
BOOST_CHECK(f.Before.Int == f.After.Int);
BOOST_CHECK_CLOSE(f.Before.Float, f.After.Float, 0.00001f);
BOOST_CHECK_CLOSE(f.Before.Double, f.After.Double, 0.00001f);
BOOST_CHECK(f.Before.String == f.After.String);
}