summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-10 17:02:14 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-10 17:10:16 +0200
commitd81e783665e1621b37bacaf66e13d11fdfbbbd94 (patch)
tree957bb770c8b36efbb7f05f465278f47c83f65fef /src
parent030b63c3d298c7d15825995e643d1f4f92731d16 (diff)
downloadminetest-d81e783665e1621b37bacaf66e13d11fdfbbbd94.tar.gz
minetest-d81e783665e1621b37bacaf66e13d11fdfbbbd94.tar.bz2
minetest-d81e783665e1621b37bacaf66e13d11fdfbbbd94.zip
Clean unit test output
Diffstat (limited to 'src')
-rw-r--r--src/test.cpp14
-rw-r--r--src/voxel.h8
2 files changed, 13 insertions, 9 deletions
diff --git a/src/test.cpp b/src/test.cpp
index 45851a7e3..6588f113c 100644
--- a/src/test.cpp
+++ b/src/test.cpp
@@ -1184,8 +1184,10 @@ struct TestConnection
infostream<<"Sending data (size="<<datasize<<"):";
for(int i=0; i<datasize && i<20; i++){
- if(i%2==0) DEBUGPRINT(" ");
- DEBUGPRINT("%.2X", ((int)((const char*)*data1)[i])&0xff);
+ if(i%2==0) infostream<<" ";
+ char buf[10];
+ snprintf(buf, 10, "%.2X", ((int)((const char*)*data1)[i])&0xff);
+ infostream<<buf;
}
if(datasize>20)
infostream<<"...";
@@ -1216,10 +1218,12 @@ struct TestConnection
<<", size="<<size
<<std::endl;
- infostream<<"Received data (size="<<size<<"):";
+ infostream<<"Received data (size="<<size<<"): ";
for(int i=0; i<size && i<20; i++){
- if(i%2==0) DEBUGPRINT(" ");
- DEBUGPRINT("%.2X", ((int)(recvdata[i]))&0xff);
+ if(i%2==0) infostream<<" ";
+ char buf[10];
+ snprintf(buf, 10, "%.2X", ((int)(recvdata[i]))&0xff);
+ infostream<<buf;
}
if(size>20)
infostream<<"...";
diff --git a/src/voxel.h b/src/voxel.h
index 46864e06e..291b51e03 100644
--- a/src/voxel.h
+++ b/src/voxel.h
@@ -364,11 +364,11 @@ public:
if(m_flags[m_area.index(p)] & VOXELFLAG_INEXISTENT)
{
- dstream<<"EXCEPT: VoxelManipulator::getNode(): "
+ /*dstream<<"EXCEPT: VoxelManipulator::getNode(): "
<<"p=("<<p.X<<","<<p.Y<<","<<p.Z<<")"
<<", index="<<m_area.index(p)
<<", flags="<<(int)m_flags[m_area.index(p)]
- <<" is inexistent"<<std::endl;
+ <<" is inexistent"<<std::endl;*/
throw InvalidPositionException
("VoxelManipulator: getNode: inexistent");
}
@@ -400,11 +400,11 @@ public:
if(m_flags[m_area.index(p)] & VOXELFLAG_INEXISTENT)
{
- dstream<<"EXCEPT: VoxelManipulator::getNode(): "
+ /*dstream<<"EXCEPT: VoxelManipulator::getNode(): "
<<"p=("<<p.X<<","<<p.Y<<","<<p.Z<<")"
<<", index="<<m_area.index(p)
<<", flags="<<(int)m_flags[m_area.index(p)]
- <<" is inexistent"<<std::endl;
+ <<" is inexistent"<<std::endl;*/
throw InvalidPositionException
("VoxelManipulator: getNode: inexistent");
}