29#include <gtest/gtest.h>
65 using ::testing::Test::Test;
71 return "/tmp/temp_dir_test" + std::to_string(
dirNumber++) +
"/";
102 [[maybe_unused]]
int success = mkdir(
dirName.c_str(), 0775);
103 assert(!(success == -1 && errno != EEXIST));
113 [[maybe_unused]]
int success = rmdir(
dirName.c_str());
114 assert(success == 0);
static const char * baseFilename
Fixture class that handles temporary directory creation.
std::string getDirName() const
Get the name of the directory we have created on SetUp.
std::string getCptPath() const
Get the path to the checkpoint file.
static std::string generateTempDirName()
Generate a temporary directory name.
static unsigned dirNumber
Temporary directory names are generated based on this number, which is updated every time the generat...
void simulateSerialization(std::string contents) const
Create a cpt file with the contents specified by the string.
std::string dirName
The name of the temporary directory.
Bitfield< 2, 1 > contents
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.