60 auto ff = temp.makeFile();
61 CHECK (fs::exists (ff));
62 CHECK (fs::is_empty (ff));
64 std::ofstream out{ff, std::ios_base::out};
66 out << scree << std::endl;
69 CHECK (fs::is_regular_file (ff));
70 CHECK (not fs::is_empty (ff));
75 CHECK (readBack == scree);
89 tt.makeFile(
"huibuh");
90 tt.makeFile(
"huibuh");
91 tt.makeFile(
"huibuh");
92 std::ofstream boo{d1 /
"huibuh"};
94 fs::create_directories(d1 /
"bug/bear");
95 fs::rename (d1 /
"huibuh", d1 /
"bug/bear/fray");
101 CHECK (fs::exists(d2 /
"Mooo"));
102 CHECK (not fs::is_empty(d2));
103 fs::create_directory(d2 /
"Mooo");
106 CHECK (not d1.empty());
110 CHECK (not fs::exists(d2));
111 CHECK ( fs::exists(d1));
112 CHECK (not d2.empty());
117 CHECK (6 == fs::file_size(d1 /
"bug/bear/fray"));
121 CHECK (not fs::exists(d1));
122 CHECK (not fs::exists(d2));
Manage a temporary directory for storage, with automated clean-up.
Implementation namespace for support and library code.
string randStr(size_t len)
create garbage string of given length
Simple test class runner.
A collection of frequently used helper functions to support unit testing.
A RAII style temporary directory.
#define VERIFY_FAIL(FAILURE_MSG, ERRONEOUS_STATEMENT)
Macro to verify that a statement indeed raises a std::exception, which additionally contains some FAI...