diff options
Diffstat (limited to 'src/unittest')
-rw-r--r-- | src/unittest/test.cpp | 6 | ||||
-rw-r--r-- | src/unittest/test_mapnode.cpp | 4 | ||||
-rw-r--r-- | src/unittest/test_noderesolver.cpp | 16 | ||||
-rw-r--r-- | src/unittest/test_schematic.cpp | 16 | ||||
-rw-r--r-- | src/unittest/test_voxelalgorithms.cpp | 6 | ||||
-rw-r--r-- | src/unittest/test_voxelmanipulator.cpp | 4 |
6 files changed, 26 insertions, 26 deletions
diff --git a/src/unittest/test.cpp b/src/unittest/test.cpp index 1985fdc6c..150bddc56 100644 --- a/src/unittest/test.cpp +++ b/src/unittest/test.cpp @@ -45,7 +45,7 @@ public: ~TestGameDef(); IItemDefManager *getItemDefManager() { return m_itemdef; } - INodeDefManager *getNodeDefManager() { return m_nodedef; } + const NodeDefManager *getNodeDefManager() { return m_nodedef; } ICraftDefManager *getCraftDefManager() { return m_craftdef; } ITextureSource *getTextureSource() { return m_texturesrc; } IShaderSource *getShaderSource() { return m_shadersrc; } @@ -80,7 +80,7 @@ public: private: IItemDefManager *m_itemdef = nullptr; - INodeDefManager *m_nodedef = nullptr; + const NodeDefManager *m_nodedef = nullptr; ICraftDefManager *m_craftdef = nullptr; ITextureSource *m_texturesrc = nullptr; IShaderSource *m_shadersrc = nullptr; @@ -113,7 +113,7 @@ TestGameDef::~TestGameDef() void TestGameDef::defineSomeNodes() { IWritableItemDefManager *idef = (IWritableItemDefManager *)m_itemdef; - IWritableNodeDefManager *ndef = (IWritableNodeDefManager *)m_nodedef; + NodeDefManager *ndef = (NodeDefManager *)m_nodedef; ItemDefinition itemdef; ContentFeatures f; diff --git a/src/unittest/test_mapnode.cpp b/src/unittest/test_mapnode.cpp index 70e7d42cf..365ee0c86 100644 --- a/src/unittest/test_mapnode.cpp +++ b/src/unittest/test_mapnode.cpp @@ -31,7 +31,7 @@ public: void runTests(IGameDef *gamedef); - void testNodeProperties(INodeDefManager *nodedef); + void testNodeProperties(const NodeDefManager *nodedef); }; static TestMapNode g_test_instance; @@ -43,7 +43,7 @@ void TestMapNode::runTests(IGameDef *gamedef) //////////////////////////////////////////////////////////////////////////////// -void TestMapNode::testNodeProperties(INodeDefManager *nodedef) +void TestMapNode::testNodeProperties(const NodeDefManager *nodedef) { MapNode n(CONTENT_AIR); diff --git a/src/unittest/test_noderesolver.cpp b/src/unittest/test_noderesolver.cpp index dc2106a54..28da43620 100644 --- a/src/unittest/test_noderesolver.cpp +++ b/src/unittest/test_noderesolver.cpp @@ -34,18 +34,18 @@ public: void runTests(IGameDef *gamedef); - void testNodeResolving(IWritableNodeDefManager *ndef); - void testPendingResolveCancellation(IWritableNodeDefManager *ndef); - void testDirectResolveMethod(IWritableNodeDefManager *ndef); - void testNoneResolveMethod(IWritableNodeDefManager *ndef); + void testNodeResolving(NodeDefManager *ndef); + void testPendingResolveCancellation(NodeDefManager *ndef); + void testDirectResolveMethod(NodeDefManager *ndef); + void testNoneResolveMethod(NodeDefManager *ndef); }; static TestNodeResolver g_test_instance; void TestNodeResolver::runTests(IGameDef *gamedef) { - IWritableNodeDefManager *ndef = - (IWritableNodeDefManager *)gamedef->getNodeDefManager(); + NodeDefManager *ndef = + (NodeDefManager *)gamedef->getNodeDefManager(); ndef->resetNodeResolveState(); TEST(testNodeResolving, ndef); @@ -104,7 +104,7 @@ void Foobaz::resolveNodeNames() } -void TestNodeResolver::testNodeResolving(IWritableNodeDefManager *ndef) +void TestNodeResolver::testNodeResolving(NodeDefManager *ndef) { Foobar foobar; size_t i; @@ -182,7 +182,7 @@ void TestNodeResolver::testNodeResolving(IWritableNodeDefManager *ndef) } -void TestNodeResolver::testPendingResolveCancellation(IWritableNodeDefManager *ndef) +void TestNodeResolver::testPendingResolveCancellation(NodeDefManager *ndef) { Foobaz foobaz1; foobaz1.test_content1 = 1234; diff --git a/src/unittest/test_schematic.cpp b/src/unittest/test_schematic.cpp index 2e2417a3b..da4ce50d2 100644 --- a/src/unittest/test_schematic.cpp +++ b/src/unittest/test_schematic.cpp @@ -30,9 +30,9 @@ public: void runTests(IGameDef *gamedef); - void testMtsSerializeDeserialize(INodeDefManager *ndef); - void testLuaTableSerialize(INodeDefManager *ndef); - void testFileSerializeDeserialize(INodeDefManager *ndef); + void testMtsSerializeDeserialize(const NodeDefManager *ndef); + void testLuaTableSerialize(const NodeDefManager *ndef); + void testFileSerializeDeserialize(const NodeDefManager *ndef); static const content_t test_schem1_data[7 * 6 * 4]; static const content_t test_schem2_data[3 * 3 * 3]; @@ -44,8 +44,8 @@ static TestSchematic g_test_instance; void TestSchematic::runTests(IGameDef *gamedef) { - IWritableNodeDefManager *ndef = - (IWritableNodeDefManager *)gamedef->getNodeDefManager(); + NodeDefManager *ndef = + (NodeDefManager *)gamedef->getNodeDefManager(); ndef->setNodeRegistrationStatus(true); @@ -58,7 +58,7 @@ void TestSchematic::runTests(IGameDef *gamedef) //////////////////////////////////////////////////////////////////////////////// -void TestSchematic::testMtsSerializeDeserialize(INodeDefManager *ndef) +void TestSchematic::testMtsSerializeDeserialize(const NodeDefManager *ndef) { static const v3s16 size(7, 6, 4); static const u32 volume = size.X * size.Y * size.Z; @@ -104,7 +104,7 @@ void TestSchematic::testMtsSerializeDeserialize(INodeDefManager *ndef) } -void TestSchematic::testLuaTableSerialize(INodeDefManager *ndef) +void TestSchematic::testLuaTableSerialize(const NodeDefManager *ndef) { static const v3s16 size(3, 3, 3); static const u32 volume = size.X * size.Y * size.Z; @@ -132,7 +132,7 @@ void TestSchematic::testLuaTableSerialize(INodeDefManager *ndef) } -void TestSchematic::testFileSerializeDeserialize(INodeDefManager *ndef) +void TestSchematic::testFileSerializeDeserialize(const NodeDefManager *ndef) { static const v3s16 size(3, 3, 3); static const u32 volume = size.X * size.Y * size.Z; diff --git a/src/unittest/test_voxelalgorithms.cpp b/src/unittest/test_voxelalgorithms.cpp index 0e96f9339..0ffd24b7d 100644 --- a/src/unittest/test_voxelalgorithms.cpp +++ b/src/unittest/test_voxelalgorithms.cpp @@ -30,21 +30,21 @@ public: void runTests(IGameDef *gamedef); - void testVoxelLineIterator(INodeDefManager *ndef); + void testVoxelLineIterator(const NodeDefManager *ndef); }; static TestVoxelAlgorithms g_test_instance; void TestVoxelAlgorithms::runTests(IGameDef *gamedef) { - INodeDefManager *ndef = gamedef->getNodeDefManager(); + const NodeDefManager *ndef = gamedef->getNodeDefManager(); TEST(testVoxelLineIterator, ndef); } //////////////////////////////////////////////////////////////////////////////// -void TestVoxelAlgorithms::testVoxelLineIterator(INodeDefManager *ndef) +void TestVoxelAlgorithms::testVoxelLineIterator(const NodeDefManager *ndef) { // Test some lines // Do not test lines that start or end on the border of diff --git a/src/unittest/test_voxelmanipulator.cpp b/src/unittest/test_voxelmanipulator.cpp index 6c8ac6757..acc2707e7 100644 --- a/src/unittest/test_voxelmanipulator.cpp +++ b/src/unittest/test_voxelmanipulator.cpp @@ -33,7 +33,7 @@ public: void runTests(IGameDef *gamedef); void testVoxelArea(); - void testVoxelManipulator(INodeDefManager *nodedef); + void testVoxelManipulator(const NodeDefManager *nodedef); }; static TestVoxelManipulator g_test_instance; @@ -80,7 +80,7 @@ void TestVoxelManipulator::testVoxelArea() } -void TestVoxelManipulator::testVoxelManipulator(INodeDefManager *nodedef) +void TestVoxelManipulator::testVoxelManipulator(const NodeDefManager *nodedef) { VoxelManipulator v; |