]> git.lizzy.rs Git - minetest.git/blobdiff - src/unittest/test_activeobject.cpp
Add unittests for item movement code (#11885)
[minetest.git] / src / unittest / test_activeobject.cpp
index 84c46fd77cdc6917e3233ff9ea18d90bca47d491..872130a2a03a727ec72cc90a8d4f5b54033b65f1 100644 (file)
@@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "test.h"
 
-#include "activeobject.h"
+#include "mock_activeobject.h"
 
 class TestActiveObject : public TestBase
 {
@@ -39,20 +39,9 @@ void TestActiveObject::runTests(IGameDef *gamedef)
        TEST(testAOAttributes);
 }
 
-class TestAO : public ActiveObject
-{
-public:
-       TestAO(u16 id) : ActiveObject(id) {}
-
-       virtual ActiveObjectType getType() const { return ACTIVEOBJECT_TYPE_TEST; }
-       virtual bool getCollisionBox(aabb3f *toset) const { return false; }
-       virtual bool getSelectionBox(aabb3f *toset) const { return false; }
-       virtual bool collideWithObjects() const { return false; }
-};
-
 void TestActiveObject::testAOAttributes()
 {
-       TestAO ao(44);
+       MockActiveObject ao(44);
        UASSERT(ao.getId() == 44);
 
        ao.setId(558);