]> git.localhorst.tv Git - blank.git/blobdiff - tst/net/PacketTest.hpp
glm backwards compatibility
[blank.git] / tst / net / PacketTest.hpp
index 4942a2a228b59908b8ab8d2c82a4315ecfc601d6..81cdd8280d0ac9a2c5011a65aff646f66d482ea1 100644 (file)
@@ -1,14 +1,15 @@
 #ifndef BLANK_TEST_NET_PACKETTEST_HPP_
 #define BLANK_TEST_NET_PACKETTEST_HPP_
 
-#include "model/geometry.hpp"
+#include "geometry/primitive.hpp"
+#include "graphics/glm.hpp"
 #include "net/Packet.hpp"
 #include "world/EntityState.hpp"
 
 #include <cstdint>
+#include <limits>
 #include <string>
 #include <SDL_net.h>
-#include <glm/glm.hpp>
 #include <cppunit/extensions/HelperMacros.h>
 
 
@@ -20,6 +21,7 @@ class PacketTest
 
 CPPUNIT_TEST_SUITE(PacketTest);
 
+CPPUNIT_TEST(testSizes);
 CPPUNIT_TEST(testControl);
 CPPUNIT_TEST(testPing);
 CPPUNIT_TEST(testLogin);
@@ -29,6 +31,11 @@ CPPUNIT_TEST(testPlayerUpdate);
 CPPUNIT_TEST(testSpawnEntity);
 CPPUNIT_TEST(testDespawnEntity);
 CPPUNIT_TEST(testEntityUpdate);
+CPPUNIT_TEST(testPlayerCorrection);
+CPPUNIT_TEST(testChunkBegin);
+CPPUNIT_TEST(testChunkData);
+CPPUNIT_TEST(testBlockUpdate);
+CPPUNIT_TEST(testMessage);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -36,6 +43,7 @@ public:
        void setUp();
        void tearDown();
 
+       void testSizes();
        void testControl();
        void testPing();
        void testLogin();
@@ -45,6 +53,11 @@ public:
        void testSpawnEntity();
        void testDespawnEntity();
        void testEntityUpdate();
+       void testPlayerCorrection();
+       void testChunkBegin();
+       void testChunkData();
+       void testBlockUpdate();
+       void testMessage();
 
 private:
        static void AssertPacket(
@@ -74,7 +87,8 @@ private:
        static void AssertEqual(
                const std::string &message,
                const glm::vec3 &expected,
-               const glm::vec3 &actual);
+               const glm::vec3 &actual,
+               float epsilon = std::numeric_limits<float>::epsilon());
        static void AssertEqual(
                const std::string &message,
                const glm::quat &expected,