36#ifndef _POSIX_C_SOURCE
37#define _POSIX_C_SOURCE 200112L
41#define _DARWIN_C_SOURCE
53#if !defined(__FreeRTOS__) && !defined(__WINNT__)
56#if defined(__linux__) || defined(__MACH__)
57 dirName_ =
"/tmp/openmrntmpdirXXXXXX";
81 ::lseek(
fd_, 0, SEEK_SET);
This class creates a temporary directory for the test, and removes it when the test is done.
const string & name() const
string dirName_
name of the temporary directory.
string fileName_
The full path name.
TempFile(const TempDir &dir, const string &basename)
Constructor.
int fd_
The file descriptor.
void rewrite(const string &s)
writes the given data to the temporary file from offset 0.
void write(const uint8_t byte)
writes a single byte to the temporary file.
#define HASSERT(x)
Checks that the value of expression x is true, else terminates the current process.