aboutsummaryrefslogtreecommitdiff
path: root/src/cmake_config.h.in
Commit message (Expand)AuthorAge
* Let ENABLE_GLES appear in cmake_config.h and change its functionalitysfan52019-08-04
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
* Also support X11 icon for minetest copies installed via make install (#4407)est312016-08-20
* Implement a PostgreSQL backendLoic Blot2016-05-22
* Add server side ncurses terminalest312015-11-06
* Use CUSTOM_LOCALEDIR if specifiedShadowNinja2015-09-06
* Add AreaStore data structureest312015-07-27
* Add LibGMPest312015-05-11
* Revert the upper-case PROJECT_NAME nonsense that was part of #2402sfan52015-04-27
* Revert "Only lowercase project name at compile time"sfan52015-04-27
* Only lowercase project name at compile timeShadowNinja2015-04-21
* Clean up and tweak build systemShadowNinja2015-03-27
* serialize.h: use machine native byte swapping if available, fall-back to prev...Rafael Reilova2014-11-21
* Make config compatible with C++11donat_b2014-09-20
* Add redis database backendSfan52014-04-16
* Improved win32 file version informationsapier2014-03-02
* Handle LuaErrors in Lua -> C++ calls on LuaJITShadowNinja2013-12-18
* Show git hash in version string at top left corner of windowKahrl2013-09-28
* Add curl, freetype and luaJIT to CMAKE_BUILD_INFOPilzAdam2013-09-28
* Add dummy and LevelDB database backendsIlya Zhuravlev2013-09-09
* Add Freetype supportIlya Zhuravlev2013-02-14
* Added ability to fetch media from remote server (using cURL library)Ilya Zhuravlev2012-12-16
* Improve build configuration optionsPerttu Ahola2012-07-23
* Build configuration fixes/improvements on WindowsPerttu Ahola2012-03-25
* Update/fix/improve config.h and cmake_config.h.inPerttu Ahola2012-03-24
* Actually make USE_GETTEXT available in the sourceGiuseppe Bilotta2011-07-24
* Place project name and gettext use in configGiuseppe Bilotta2011-07-24
* cleaning notes and stuffPerttu Ahola2011-04-06
* made old build system to work too. the cmake one doesn't make working binarie...Perttu Ahola2011-01-18
l kwb">void testRLECompression(); void testZlibCompression(); void testZlibLargeData(); }; static TestCompression g_test_instance; void TestCompression::runTests(IGameDef *gamedef) { TEST(testRLECompression); TEST(testZlibCompression); TEST(testZlibLargeData); } //////////////////////////////////////////////////////////////////////////////// void TestCompression::testRLECompression() { SharedBuffer<u8> fromdata(4); fromdata[0]=1; fromdata[1]=5; fromdata[2]=5; fromdata[3]=1; std::ostringstream os(std::ios_base::binary); compress(fromdata, os, 0); std::string str_out = os.str(); infostream << "str_out.size()="<<str_out.size()<<std::endl; infostream << "TestCompress: 1,5,5,1 -> "; for (u32 i = 0; i < str_out.size(); i++) infostream << (u32)str_out[i] << ","; infostream << std::endl; UASSERT(str_out.size() == 10); UASSERT(str_out[0] == 0); UASSERT(str_out[1] == 0); UASSERT(str_out[2] == 0); UASSERT(str_out[3] == 4); UASSERT(str_out[4] == 0); UASSERT(str_out[5] == 1); UASSERT(str_out[6] == 1); UASSERT(str_out[7] == 5); UASSERT(str_out[8] == 0); UASSERT(str_out[9] == 1); std::istringstream is(str_out, std::ios_base::binary); std::ostringstream os2(std::ios_base::binary); decompress(is, os2, 0); std::string str_out2 = os2.str(); infostream << "decompress: "; for (u32 i = 0; i < str_out2.size(); i++) infostream << (u32)str_out2[i] << ","; infostream << std::endl; UASSERTEQ(size_t, str_out2.size(), fromdata.getSize()); for (u32 i = 0; i < str_out2.size(); i++) UASSERT(str_out2[i] == fromdata[i]); } void TestCompression::testZlibCompression() { SharedBuffer<u8> fromdata(4); fromdata[0]=1; fromdata[1]=5; fromdata[2]=5; fromdata[3]=1; std::ostringstream os(std::ios_base::binary); compress(fromdata, os, SER_FMT_VER_HIGHEST_READ); std::string str_out = os.str(); infostream << "str_out.size()=" << str_out.size() <<std::endl; infostream << "TestCompress: 1,5,5,1 -> "; for (u32 i = 0; i < str_out.size(); i++) infostream << (u32)str_out[i] << ","; infostream << std::endl; std::istringstream is(str_out, std::ios_base::binary); std::ostringstream os2(std::ios_base::binary); decompress(is, os2, SER_FMT_VER_HIGHEST_READ); std::string str_out2 = os2.str(); infostream << "decompress: "; for (u32 i = 0; i < str_out2.size(); i++) infostream << (u32)str_out2[i] << ","; infostream << std::endl; UASSERTEQ(size_t, str_out2.size(), fromdata.getSize()); for (u32 i = 0; i < str_out2.size(); i++) UASSERT(str_out2[i] == fromdata[i]); } void TestCompression::testZlibLargeData() { infostream << "Test: Testing zlib wrappers with a large amount " "of pseudorandom data" << std::endl; u32 size = 50000; infostream << "Test: Input size of large compressZlib is " << size << std::endl; std::string data_in; data_in.resize(size); PseudoRandom pseudorandom(9420); for (u32 i = 0; i < size; i++) data_in[i] = pseudorandom.range(0, 255); std::ostringstream os_compressed(std::ios::binary); compressZlib(data_in, os_compressed); infostream << "Test: Output size of large compressZlib is " << os_compressed.str().size()<<std::endl; std::istringstream is_compressed(os_compressed.str(), std::ios::binary); std::ostringstream os_decompressed(std::ios::binary); decompressZlib(is_compressed, os_decompressed); infostream << "Test: Output size of large decompressZlib is " << os_decompressed.str().size() << std::endl; std::string str_decompressed = os_decompressed.str(); UASSERTEQ(size_t, str_decompressed.size(), data_in.size()); for (u32 i = 0; i < size && i < str_decompressed.size(); i++) { UTEST(str_decompressed[i] == data_in[i], "index out[%i]=%i differs from in[%i]=%i", i, str_decompressed[i], i, data_in[i]); } }