Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: use boost::filesystem #424

Merged
merged 1 commit into from
May 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions test/serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ enum SerializationMode { TXT = 1, XML = 2, BIN = 4, STREAM = 8 };
template <typename T>
void test_serialization(const T& value, T& other_value,
const int mode = TXT | XML | BIN | STREAM) {
const std::string tmp_dir(boost::archive::tmpdir());
const std::string txt_filename = tmp_dir + "file.txt";
const std::string bin_filename = tmp_dir + "file.bin";
const boost::filesystem::path tmp_path(boost::archive::tmpdir());
const boost::filesystem::path txt_path("file.txt");
const boost::filesystem::path bin_path("file.bin");
const boost::filesystem::path txt_filename(tmp_path / txt_path);
const boost::filesystem::path bin_filename(tmp_path / bin_path);

// TXT
if (mode & 0x1) {
Expand Down