mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Tests: Modularize unit testing
Split unit tests into separate files under src/unittest/ Give better unittest diagnostics Clean up some code
This commit is contained in:
parent
45a77c8bf1
commit
7220ca906d
25 changed files with 3402 additions and 2502 deletions
|
@ -662,6 +662,12 @@ std::string RemoveRelativePathComponents(std::string path)
|
|||
return path.substr(0, pos);
|
||||
}
|
||||
|
||||
const char *GetFilenameFromPath(const char *path)
|
||||
{
|
||||
const char *filename = strrchr(path, DIR_DELIM_CHAR);
|
||||
return filename ? filename + 1 : path;
|
||||
}
|
||||
|
||||
bool safeWriteToFile(const std::string &path, const std::string &content)
|
||||
{
|
||||
std::string tmp_file = path + ".~mt";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue