diff options
author | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-07-14 22:43:22 +0200 |
---|---|---|
committer | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-07-14 22:43:28 +0200 |
commit | 3560f0de082a8950a84e2e866981f8bdfd05428a (patch) | |
tree | dfb765f7e590189f05e7807c80be72e6ecf8cc4d /src/test.cpp | |
parent | 5146c826be9386cc2adeb8f678063a2f9cfc1dee (diff) | |
parent | 81535f6277b66c869cda7125b2aeaf99e8078b92 (diff) | |
download | minetest-3560f0de082a8950a84e2e866981f8bdfd05428a.tar.gz minetest-3560f0de082a8950a84e2e866981f8bdfd05428a.tar.bz2 minetest-3560f0de082a8950a84e2e866981f8bdfd05428a.zip |
Merge branch 'upstream/master'
Conflicts:
data/oerkki1.png
src/client.cpp
Diffstat (limited to 'src/test.cpp')
-rw-r--r-- | src/test.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/test.cpp b/src/test.cpp index 7b86750d8..7d71552a8 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -31,6 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <sstream> #include "porting.h" #include "content_mapnode.h" +#include "mapsector.h" /* Asserts that the exception occurs @@ -339,6 +340,12 @@ struct TestVoxelManipulator } }; +/* + NOTE: These tests became non-working then NodeContainer was removed. + These should be redone, utilizing some kind of a virtual + interface for Map (IMap would be fine). +*/ +#if 0 struct TestMapBlock { class TC : public NodeContainer @@ -641,13 +648,13 @@ struct TestMapSector // Create one with no heightmaps ServerMapSector sector(&parent, v2s16(1,1)); - EXCEPTION_CHECK(InvalidPositionException, sector.getBlockNoCreate(0)); - EXCEPTION_CHECK(InvalidPositionException, sector.getBlockNoCreate(1)); + assert(sector.getBlockNoCreateNoEx(0) == 0); + assert(sector.getBlockNoCreateNoEx(1) == 0); MapBlock * bref = sector.createBlankBlock(-2); - EXCEPTION_CHECK(InvalidPositionException, sector.getBlockNoCreate(0)); - assert(sector.getBlockNoCreate(-2) == bref); + assert(sector.getBlockNoCreateNoEx(0) == 0); + assert(sector.getBlockNoCreateNoEx(-2) == bref); //TODO: Check for AlreadyExistsException @@ -662,6 +669,7 @@ struct TestMapSector } }; +#endif struct TestSocket { @@ -1028,8 +1036,8 @@ void run_tests() TEST(TestCompress); TEST(TestMapNode); TEST(TestVoxelManipulator); - TEST(TestMapBlock); - TEST(TestMapSector); + //TEST(TestMapBlock); + //TEST(TestMapSector); if(INTERNET_SIMULATOR == false){ TEST(TestSocket); dout_con<<"=== BEGIN RUNNING UNIT TESTS FOR CONNECTION ==="<<std::endl; |