1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Tests: Add NodeResolver unittests

Minor misc. NodeResolver cleanups
Prefix faux content type constants for testing with t_ to avoid
confusion or name collisions
This commit is contained in:
kwolekr 2015-05-05 11:36:40 -04:00
parent 1be2d32fd5
commit b45df9d6a7
8 changed files with 349 additions and 25 deletions

View file

@ -69,7 +69,7 @@ void TestVoxelAlgorithms::testPropogateSunlight(INodeDefManager *ndef)
== LIGHT_SUN);
}
v.setNodeNoRef(v3s16(0,0,0), MapNode(CONTENT_STONE));
v.setNodeNoRef(v3s16(0,0,0), MapNode(t_CONTENT_STONE));
{
std::set<v3s16> light_sources;
@ -91,7 +91,7 @@ void TestVoxelAlgorithms::testPropogateSunlight(INodeDefManager *ndef)
== 0);
}
v.setNodeNoRef(v3s16(1,3,2), MapNode(CONTENT_STONE));
v.setNodeNoRef(v3s16(1,3,2), MapNode(t_CONTENT_STONE));
{
std::set<v3s16> light_sources;
@ -180,8 +180,8 @@ void TestVoxelAlgorithms::testClearLightAndCollectSources(INodeDefManager *ndef)
}
VoxelArea a(v3s16(0,0,0), v3s16(2,2,2));
v.setNodeNoRef(v3s16(0,0,0), MapNode(CONTENT_STONE));
v.setNodeNoRef(v3s16(1,1,1), MapNode(CONTENT_TORCH));
v.setNodeNoRef(v3s16(0,0,0), MapNode(t_CONTENT_STONE));
v.setNodeNoRef(v3s16(1,1,1), MapNode(t_CONTENT_TORCH));
{
MapNode n(CONTENT_AIR);