diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-04-21 19:35:17 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-04-21 19:35:17 +0300 |
commit | c638442e78b953556e7dadd4c0c34cb0c719bbc8 (patch) | |
tree | a7c623944ba26d64c4fbf3218025d8ec0145d849 /src/test.cpp | |
parent | 3c61d57f6d7f627b32b4a8c2f461a8e01e7ac378 (diff) | |
download | minetest-c638442e78b953556e7dadd4c0c34cb0c719bbc8.tar.gz minetest-c638442e78b953556e7dadd4c0c34cb0c719bbc8.tar.bz2 minetest-c638442e78b953556e7dadd4c0c34cb0c719bbc8.zip |
Some work-in-progress in hp and mobs and a frightening amount of random fixes.
Diffstat (limited to 'src/test.cpp')
-rw-r--r-- | src/test.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/test.cpp b/src/test.cpp index c7bffcdf3..07ef772ef 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -951,18 +951,18 @@ struct TestConnection assert(got_exception); } { - //u8 data1[1100]; - SharedBuffer<u8> data1(1100); - for(u16 i=0; i<1100; i++){ + const int datasize = 30000; + SharedBuffer<u8> data1(datasize); + for(u16 i=0; i<datasize; i++){ data1[i] = i/4; } - dstream<<"Sending data (size="<<1100<<"):"; - for(int i=0; i<1100 && i<20; i++){ + dstream<<"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(1100>20) + if(datasize>20) dstream<<"..."; dstream<<std::endl; @@ -970,10 +970,10 @@ struct TestConnection sleep_ms(50); - u8 recvdata[2000]; + u8 recvdata[datasize + 1000]; dstream<<"** running client.Receive()"<<std::endl; u16 peer_id = 132; - u16 size = client.Receive(peer_id, recvdata, 2000); + u16 size = client.Receive(peer_id, recvdata, datasize + 1000); dstream<<"** Client received: peer_id="<<peer_id <<", size="<<size <<std::endl; |