51 auto ff = temp.makeFile();
52 CHECK (fs::exists (ff));
53 CHECK (fs::is_empty (ff));
55 std::ofstream out{ff, std::ios_base::out};
57 out << scree << std::endl;
60 CHECK (fs::is_regular_file (ff));
61 CHECK (not fs::is_empty (ff));
66 CHECK (readBack == scree);
80 tt.makeFile(
"huibuh");
81 tt.makeFile(
"huibuh");
82 tt.makeFile(
"huibuh");
83 std::ofstream boo{d1 /
"huibuh"};
85 fs::create_directories(d1 /
"bug/bear");
86 fs::rename (d1 /
"huibuh", d1 /
"bug/bear/fray");
92 CHECK (fs::exists(d2 /
"Mooo"));
93 CHECK (not fs::is_empty(d2));
94 fs::create_directory(d2 /
"Mooo");
97 CHECK (not d1.empty());
101 CHECK (not fs::exists(d2));
102 CHECK ( fs::exists(d1));
103 CHECK (not d2.empty());
108 CHECK (6 == fs::file_size(d1 /
"bug/bear/fray"));
112 CHECK (not fs::exists(d1));
113 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
Simplistic 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...