diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-10-12 13:48:59 -0400 |
---|---|---|
committer | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-10-13 08:46:16 -0400 |
commit | f073e37d2f3463ce5e9b456d4509f8dd57e405f5 (patch) | |
tree | 80f13c552754ddafd4858f66a0e79a517ad8b7af /src/unittest/test_voxelalgorithms.cpp | |
parent | b3503e7853a52a8c16431f6b983e30c9d25951bc (diff) | |
download | minetest-f073e37d2f3463ce5e9b456d4509f8dd57e405f5.tar.xz |
Test on-lighting node param1 in lighting test
Diffstat (limited to 'src/unittest/test_voxelalgorithms.cpp')
-rw-r--r-- | src/unittest/test_voxelalgorithms.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/unittest/test_voxelalgorithms.cpp b/src/unittest/test_voxelalgorithms.cpp index 6514d3713..767e9de31 100644 --- a/src/unittest/test_voxelalgorithms.cpp +++ b/src/unittest/test_voxelalgorithms.cpp @@ -133,6 +133,7 @@ void TestVoxelAlgorithms::testLighting(IGameDef *gamedef) map.addNodeAndUpdate(v3s16(-10, 0, 0), MapNode(CONTENT_AIR), modified_blocks); map.addNodeAndUpdate(v3s16(9, 10, -9), MapNode(t_CONTENT_WATER), modified_blocks); map.addNodeAndUpdate(v3s16(0, 0, 0), MapNode(t_CONTENT_TORCH), modified_blocks); + map.addNodeAndUpdate(v3s16(-10, 1, 0), MapNode(t_CONTENT_STONE, 153), modified_blocks); } const NodeDefManager *ndef = gamedef->ndef(); @@ -161,4 +162,9 @@ void TestVoxelAlgorithms::testLighting(IGameDef *gamedef) UASSERTEQ(int, n.getLight(LIGHTBANK_NIGHT, ndef->getLightingFlags(n)), 2); UASSERTEQ(int, n.getLight(LIGHTBANK_DAY, ndef->getLightingFlags(n)), 15); } + { + // Test that irrelevant param1 values are not clobbered. + MapNode n = map.getNode(v3s16(-10, 1, 0)); + UASSERTEQ(int, n.getParam1(), 153); + } } |