ddnet/src/test
Robert Müller 7acf2c1573 Add functions for reading/writing strings from/to datafile
Simplify the usage of datafile reader and writer by adding utility functions to read and write zero-terminated UTF-8 strings.

Improve validation of string data read from datafiles. It is ensure that string data is null-terminated, has no internal NUL-characters and is valid UTF-8.

Fix loading of external sounds in the editor. The wrong path variable was being used, so the sound files would not be loaded from correct folder.

Add tests for new datafile reader/writer functions.
2023-10-03 16:07:15 +02:00
..
aio.cpp Add override in code behind CONF_DISCORD, disable clang-tidy check 2022-05-18 01:19:35 +02:00
bezier.cpp Move src/game/bezier.cpp/h to src/base/bezier.cpp/h 2022-09-24 20:53:59 +02:00
blocklist_driver.cpp make tests work 2021-05-06 13:10:39 +02:00
bytes_be.cpp Use sizeof(int32_t) instead of 4 2023-02-11 13:59:08 +01:00
color.cpp Add test to ensure that color_casts keep the same alpha value 2023-06-04 23:37:18 +02:00
compression.cpp Use traditional casts instead of functional-style casts 2022-11-06 11:52:21 +01:00
csv.cpp Run clang-format 2020-09-26 21:50:15 +02:00
datafile.cpp Add functions for reading/writing strings from/to datafile 2023-10-03 16:07:15 +02:00
fs.cpp Add fs_split_file_extension to separate filename and extension 2023-06-25 21:51:36 +02:00
git_revision.cpp Use EXPECT_* rather than ASSERT_* in tests 2019-03-12 02:06:54 +01:00
hash.cpp Add tests for overloaded hash operators, use operator instead 2022-11-12 20:36:38 +01:00
huffman.cpp Add tests for Huffman compression 2022-10-25 14:04:50 +02:00
io.cpp Don't flush all files, some improvements to io_sync 2022-02-01 02:33:18 +01:00
jobs.cpp Allow the test suite to run offline 2022-11-01 14:23:53 +01:00
json.cpp Remove /modhelp (fixes #1401) 2018-12-12 10:05:44 +01:00
jsonwriter.cpp Port JSON writer from upstream 2023-07-25 15:05:25 +02:00
linereader.cpp Fix announcement feature, don't depend on buffer staying consistent 2023-01-13 16:22:22 +01:00
mapbugs.cpp Remove code for CRC in most places, except where needed for net compat 2020-10-14 17:08:58 +02:00
name_ban.cpp Use std::vector<CNameBan> instead of array 2022-05-27 16:31:18 +02:00
net.cpp Run unit tests with sanitizers (fixes #6205) 2022-12-30 23:35:22 +01:00
netaddr.cpp Support master server address format in client 2023-08-04 12:32:02 +02:00
os.cpp Merge #6429 2023-05-14 09:24:54 +00:00
packer.cpp Add tests for packer error handling 2023-05-03 19:13:39 +02:00
prng.cpp Fix modernize-loop-convert in tests 2022-07-10 21:42:57 +02:00
score.cpp fix test 2023-05-18 21:11:04 +02:00
secure_random.cpp Declare variables as const when possible 2022-11-29 23:32:32 +01:00
serverbrowser.cpp Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
serverinfo.cpp Remove unused parts of the new serverinfo 2021-05-27 21:48:10 +02:00
str.cpp Add utility functions for converting UTF-8 bytes ↔ chars offsets 2023-08-15 22:11:25 +02:00
strip_path_and_extension.cpp Add testing infrastructure for teehistorian 2017-09-28 02:03:30 +02:00
teehistorian.cpp teehistorian: Omit "prev_game_uuid" instead of setting it to null 2023-08-27 16:11:45 +02:00
test.cpp Fix test filenames when using typed tests 2023-07-25 15:05:25 +02:00
test.h test: Make it easier to generate multiple temporary filenames 2023-07-25 15:05:24 +02:00
thread.cpp Add test for the CSemaphore wrapper 2022-11-12 20:36:38 +01:00
unix.cpp Add very basic test for Unix sockets 2017-12-20 16:56:44 +01:00
uuid.cpp Allow ParseUuid to report errors and add tests 2021-01-23 01:21:20 +01:00