summaryrefslogtreecommitdiff
path: root/src/test.cpp
diff options
context:
space:
mode:
authorNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-14 22:43:22 +0200
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-14 22:43:28 +0200
commitaf05e4b2defde537f3b953a7dae0ef44fae225aa (patch)
tree3f751014432b35df1cc2fd6fb976410e86b70e73 /src/test.cpp
parent4415d95c503f083d871abaf84516f2b6487ecb60 (diff)
parent81535f6277b66c869cda7125b2aeaf99e8078b92 (diff)
downloadminetest-af05e4b2defde537f3b953a7dae0ef44fae225aa.tar.gz
minetest-af05e4b2defde537f3b953a7dae0ef44fae225aa.tar.bz2
minetest-af05e4b2defde537f3b953a7dae0ef44fae225aa.zip
Merge branch 'upstream/master'
Conflicts: data/oerkki1.png src/client.cpp
Diffstat (limited to 'src/test.cpp')
-rw-r--r--src/test.cpp20
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;