aboutsummaryrefslogtreecommitdiff
path: root/src/test.cpp
AgeCommit message (Collapse)Author
2015-04-26Tests: Modularize unit testingkwolekr
Split unit tests into separate files under src/unittest/ Give better unittest diagnostics Clean up some code
2015-04-21Noise: Add noise unittestskwolekr
Fix buffer size calculation for lacunarity < 1.0 Add guard against absurd noise parameters
2015-04-01Move globals from main.cpp to more sane locationsCraig Robbins
Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
2015-03-31Connection::Receive(): receive Network Packet instead of SharedBuffer<u8>.Loic Blot
Because we get a Buffer<u8> from ConnectionEvent, don't convert it to SharedBuffer<u8> and return it to Server/Client::Receive which will convert it to NetworkPacket Instead, put the Buffer<u8> directly to NetworkPacket and return it to packet processing This remove a long existing memory copy Also check the packet size directly into Connection::Receive instead of packet processing
2015-03-13Replace NetworkPacket pointers to referencesLoic Blot
2015-03-07Optimize Profiler::avg()gregorycu
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2015-02-23Fix wrapDegrees family of functionsCraig Robbins
wrapDegrees() (renamed to modulo360f) wrapDegrees_0_360 wrapDegrees_180 Minor errors were present in previous versions; see issue #2328
2015-02-21Fix some memory leaks on packet sending.Loic Blot
2015-02-21Unit tests must be done at integration process.Loic Blot
* Remove --enable-unittests and --disable-unittests and add --do-unittests function * --do-unittests function will exit 0 on success. * minetest and minetestserver binaries are launched with --do-unittests in travis build.
2015-02-16[Patch 2/4] Network rework: packet writing, sending and cleanupsLoic Blot
NetworkPacket.cpp: * Remove some deprecated functions, we must use streaming interface * m_data converted from u8* to std::vector<u8> * Add an exporter to forge packet to Connection object * implement operator << std::wstring. n * implement operator << std::string * dynamic resize when write packet content. * fix string writing and performances. * create ServerCommandFactory, used by client to get useful informations about packet processing (sending). * Reliability * Transmit channel * Implement putRawString for some ugly char (_INIT packet), and use it. * Many packet read and write migrated * Implement oldForgePacket to interface writing with current connection * fix U8/char/bool writing * fix string writing and performances. * add some missing functions * Use v3s16 read instead of reading x,y,z separately * Add irr::video::SColor support into packets * Add some missing handlers * Add a template function to increase offset * Throw a serialization error on packet reading (must be improved) PacketFactories: * Create ServerCommandFactory, used by client to get useful informations about packet processing (sending). * Create ClientCommandFactory, used by server to get useful informations about packet processing (sending). Client.cpp: * implement NetworkPacket ::Send interface. * Move packet handlers to a dedicated file * Remove Client::Send(SharedBuffer) Server.cpp: * implement NetworkPacket ::Send interface. * Rewrite all packets using NetworkPacket * Move packet handlers to a dedicated file * Remove Server::Send(SharedBuffer) ClientIface.cpp: * Remove sendToAll(SharedBuffer<u8>) Connection.hpp rework: * Remove duplicate include * Remove duplicate negation * Remove a useless variable * Improve code performance by using a m_peers_list instead of scanning m_peers map * Remove Connection::Send(SharedBuffer) * Fix useafterfree into NetworkPacket Sending * Remove unused Connection::sendToAll Test.cpp: * Remove dead code * Update tests to use NetworkPackets Misc: * add new wrappers to Send packets in client, using NetworkPacket * Add NetworkPacket methods for Connection * coding style fix * dead code since changes cleanup * Use v3s16 read instead of reading x,y,z separately in some packets * Use different files to handle packets received by client and server * Cleanup: Remove useless includes ok @Zeno- Tested by @Zeno- @VanessaE and @nerzhul on running servers
2015-02-15Fix unit test if there isn't a localhost address (for example FreeBSD ↵Loic Blot
jails), second part
2015-02-15Fix unit test if there isn't a localhost address (for example FreeBSD jails)Loic Blot
2015-02-15Only do the IPv6 unit test if IPv6 is enabledLoic Blot
2015-02-10Network Layer 7 rework (Packet handling)Loic Blot
* Move networkcode to a dedicated directory * Rename clientserver.h to network/networkprotocol.h (Better name) and sanitize some includes * Create object NetworkPacket * It stores command (opcode) and data separated * It also stores peer_id * Data reading can be done by using a streaming interface * Change packet routing analysis * Remove old conditional analysis * Now uses function pointed analysis and add connection state ({Client,Server}::handlers) * Connection state permit to categorize condition to handle before analyze packets * Create a handler for depreciated messages, instead of duplicating code
2015-01-18Create empty default constructor for MapNodeCraig Robbins
2015-01-03Deduplicate code and use stdlib in string functionsShadowNinja
2014-12-29Print unit test failures to dstreamkwolekr
2014-12-21Fix weird (and wrong) comment in test.cppKahrl
2014-12-12Log: Silence errorstream during unittestskwolekr
2014-12-12Settings: Fail on invalid sequence and throw exception for LuaSettingskwolekr
2014-12-10Add support for lacunarity in legacy NoiseParams string formatkwolekr
2014-12-09Settings: Sanitize setting name everywhere, not just LuaSettingskwolekr
2014-12-09Settings: Make setting entry group and values mutually exclusivekwolekr
This greatly reduces the complexity of Settings code. Additionally, several memory leaks were fixed.
2014-12-07Add flags and lacunarity as new noise parameterskwolekr
Add 'absolute value' option to noise map functions Extend persistence modulation to 3D noise Extend 'eased' option to noise2d_perlin* functions Some noise.cpp formatting fixups
2014-12-05Fix MSVC buildSmallJoker
Note: The unit test was technically incorrect for all platforms but passes due to implicit casting
2014-12-04Settings: Various setting group fixes and enhancementskwolekr
- Remove blank setting values when setting has a group - Pair setting values with groups in file when possible - Preserve user-set whitespace in setting objects - Delete setting value when setting NoiseParams group - Delete overwritten groups outside of lock
2014-12-02Use setting groups for NoiseParamskwolekr
Add format example to minetest.conf.example Add Settings::setU16() Throw exception on attempted access of NULL settings groups
2014-11-30settings: Add setting groups and multiline entrieskwolekr
2014-11-08Implement WieldMeshSceneNode which improves wield mesh renderingKahrl
- Don't create and cache an extruded mesh for every (non-node) item. Instead use a single one per image resolution. - For cubic nodes reuse a single wield mesh too - Improve lighting of the wielded item - Increase far value of wield mesh scene camera, fixes #1770 - Also includes some minor refactorings of Camera and GenericCAO.
2014-11-02Cleanup and (mostly) document util/string.h and (very) minor refactoringCraig Robbins
Updated: Incorporated feedback from 'kahrl' Updated: Moved MinetestApp::boolToCStr() from game.cpp into string.h renaming it bool_to_cstr()
2014-11-02Fix unit tests failing if IPv6 not availableCraig Robbins
See: https://github.com/minetest/minetest/issues/1526 https://github.com/minetest/minetest/issues/793
2014-09-21Split settings into seperate source and header filesShadowNinja
This also cleans up settings a bit
2014-06-20Don't handle lack of IPv6 as fatal in unit testssapier
2014-02-05Add the option to bind to a specific addressShadowNinja
2013-12-13Implement urlencode and urldecodeKahrl
2013-08-14Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl
2013-08-02Weather backward compatibilityproller
2013-07-14Change ContentFeatures array to a vectorKahrl
2013-07-08Settings: everything != 0 equals true; remove .asm shadersPilzAdam
2013-07-02Replace C++ mainmenu by formspec powered onesapier
2013-06-23Add support for IPv6proller
Two new configuration options are added: - "enable_ipv6" to enable/disable the overall use of IPv6 - "ipv6_server" to enable/disable the use of IPv6 sockets when running a server (when "enable_ipv6" is enabled)
2013-06-17Extend a delay in TestConnection from 50 to 100 milliseconds.Kahrl
The 50 ms delay causes frequent test failures on certain systems with slow network stacks, these failures go away with the 100 ms variant.
2013-05-19Fix nearly all warningskwolekr
2013-05-14Fix memory leak in run_tests()PilzAdam
2013-04-09fix various memory leakssapier
2013-03-11Migrate to STL containers/algorithms.Ilya Zhuravlev
2013-02-26Fix most warnings, re-fix MSVC compile errorkwolekr
2013-02-24Update Copyright YearsSfan5
2013-02-24Change Minetest-c55 to MinetestPilzAdam