tests/cpp/test_metainfo: Add tests to save and load
This commit is contained in:
11
tests/cpp/helpers.cc
Normal file
11
tests/cpp/helpers.cc
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "./helpers.h"
|
||||
|
||||
std::string TempFileName() {
|
||||
return std::tmpnam(nullptr);
|
||||
}
|
||||
|
||||
long GetFileSize(const std::string filename) {
|
||||
struct stat st;
|
||||
stat(filename.c_str(), &st);
|
||||
return st.st_size;
|
||||
}
|
||||
Reference in New Issue
Block a user