]> git.lizzy.rs Git - minetest.git/blobdiff - src/unittest/test_mapnode.cpp
Fix segfault in deprecation logging due to tail call, log by default (#10174)
[minetest.git] / src / unittest / test_mapnode.cpp
index fc1a94916a26de0814850d7e485fba5ea40448fb..365ee0c865e935fd61f4de757f069d5151f30de3 100644 (file)
@@ -23,14 +23,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "nodedef.h"
 #include "content_mapnode.h"
 
-class TestMapNode : public TestBase {
+class TestMapNode : public TestBase
+{
 public:
        TestMapNode() { TestManager::registerTestModule(this); }
        const char *getName() { return "TestMapNode"; }
 
        void runTests(IGameDef *gamedef);
 
-       void testNodeProperties(INodeDefManager *nodedef);
+       void testNodeProperties(const NodeDefManager *nodedef);
 };
 
 static TestMapNode g_test_instance;
@@ -42,7 +43,7 @@ void TestMapNode::runTests(IGameDef *gamedef)
 
 ////////////////////////////////////////////////////////////////////////////////
 
-void TestMapNode::testNodeProperties(INodeDefManager *nodedef)
+void TestMapNode::testNodeProperties(const NodeDefManager *nodedef)
 {
        MapNode n(CONTENT_AIR);
 
@@ -53,6 +54,4 @@ void TestMapNode::testNodeProperties(INodeDefManager *nodedef)
        // Transparency
        n.setContent(CONTENT_AIR);
        UASSERT(nodedef->get(n).light_propagates == true);
-       n.setContent(LEGN(nodedef, "CONTENT_STONE"));
-       UASSERT(nodedef->get(n).light_propagates == false);
 }