]> git.localhorst.tv Git - blank.git/blobdiff - tst/net/PacketTest.hpp
transmit player input from client to server
[blank.git] / tst / net / PacketTest.hpp
index 618df1e68d9d75fe3eb8b6377a71473b188ec55a..89e15dd526e35982ec69d6630c924cdc3a603e5c 100644 (file)
@@ -6,6 +6,7 @@
 #include "world/EntityState.hpp"
 
 #include <cstdint>
+#include <limits>
 #include <string>
 #include <SDL_net.h>
 #include <glm/glm.hpp>
@@ -28,6 +29,10 @@ CPPUNIT_TEST(testPart);
 CPPUNIT_TEST(testPlayerUpdate);
 CPPUNIT_TEST(testSpawnEntity);
 CPPUNIT_TEST(testDespawnEntity);
+CPPUNIT_TEST(testEntityUpdate);
+CPPUNIT_TEST(testPlayerCorrection);
+CPPUNIT_TEST(testChunkBegin);
+CPPUNIT_TEST(testChunkData);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -43,6 +48,10 @@ public:
        void testPlayerUpdate();
        void testSpawnEntity();
        void testDespawnEntity();
+       void testEntityUpdate();
+       void testPlayerCorrection();
+       void testChunkBegin();
+       void testChunkData();
 
 private:
        static void AssertPacket(
@@ -72,7 +81,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,