diff options
author | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-06-27 06:56:26 -0700 |
---|---|---|
committer | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-06-27 06:56:26 -0700 |
commit | 1c90f9fc2eba43be71f9d49dad75c5d0514d4e50 (patch) | |
tree | 63c1116ff43936475874b54d171c7e08556d54ee /src/test.cpp | |
parent | 158b054e72582005d895f1ed0e1cb0c9b22a8e57 (diff) | |
parent | 7efe89ff584b2c0338dcede4c1e08504d0158780 (diff) | |
download | minetest-1c90f9fc2eba43be71f9d49dad75c5d0514d4e50.tar.gz minetest-1c90f9fc2eba43be71f9d49dad75c5d0514d4e50.tar.bz2 minetest-1c90f9fc2eba43be71f9d49dad75c5d0514d4e50.zip |
Merge pull request #13 from Bahamada/upstream_merge
Upstream merge
Diffstat (limited to 'src/test.cpp')
-rw-r--r-- | src/test.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/test.cpp b/src/test.cpp index 07ef772ef..7b86750d8 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -30,6 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "voxel.h" #include <sstream> #include "porting.h" +#include "content_mapnode.h" /* Asserts that the exception occurs @@ -424,16 +425,27 @@ struct TestMapBlock assert(b.getChangedFlag() == false); // All nodes should have been set to - // .d=CONTENT_AIR and .getLight() = 0 + // .d=CONTENT_IGNORE and .getLight() = 0 for(u16 z=0; z<MAP_BLOCKSIZE; z++) for(u16 y=0; y<MAP_BLOCKSIZE; y++) for(u16 x=0; x<MAP_BLOCKSIZE; x++) { - assert(b.getNode(v3s16(x,y,z)).d == CONTENT_AIR); + //assert(b.getNode(v3s16(x,y,z)).d == CONTENT_AIR); + assert(b.getNode(v3s16(x,y,z)).d == CONTENT_IGNORE); assert(b.getNode(v3s16(x,y,z)).getLight(LIGHTBANK_DAY) == 0); assert(b.getNode(v3s16(x,y,z)).getLight(LIGHTBANK_NIGHT) == 0); } + { + MapNode n(CONTENT_AIR); + for(u16 z=0; z<MAP_BLOCKSIZE; z++) + for(u16 y=0; y<MAP_BLOCKSIZE; y++) + for(u16 x=0; x<MAP_BLOCKSIZE; x++) + { + b.setNode(v3s16(x,y,z), n); + } + } + /* Parent fetch functions */ |