A scratch file in the system temporary directory which is removed once the test finishes, whether it passed or not.
More...
#include <test_helpers.h>
|
| | temp_file (std::string_view name) |
| |
|
| temp_file (const temp_file &)=delete |
| |
|
temp_file & | operator= (const temp_file &)=delete |
| |
|
| temp_file (temp_file &&)=delete |
| |
|
temp_file & | operator= (temp_file &&)=delete |
| |
|
void | write_text (std::string_view text) const |
| | Replaces the contents of the file with the given text.
|
| |
|
void | write_bytes (const std::vector< std::uint8_t > &bytes) const |
| | Replaces the contents of the file with the given raw bytes.
|
| |
| const std::filesystem::path & | path () const |
| |
A scratch file in the system temporary directory which is removed once the test finishes, whether it passed or not.
◆ temp_file()
| test_helpers::temp_file::temp_file |
( |
std::string_view |
name | ) |
|
|
inlineexplicit |
- Parameters
-
| name | A suffix which keeps the files of separate tests apart. |
◆ path()
| const std::filesystem::path & test_helpers::temp_file::path |
( |
| ) |
const |
|
inline |
- Returns
- The path of the scratch file.
The documentation for this class was generated from the following file:
- /home/runner/work/deep-learning-visualizer/deep-learning-visualizer/tests/test_helpers.h