Shorten the generated test file names.
Also place the generated files in their own directories.
Change-Id: I51c1acf15810ec199d17cc2d6e63adebdc0fc3c9
diff --git a/api/Utilities.cpp b/api/Utilities.cpp
index 80ebb0d..b372b13 100644
--- a/api/Utilities.cpp
+++ b/api/Utilities.cpp
@@ -148,10 +148,11 @@
}
// Opens the stream. Reports an error if it can't.
-bool GeneratedFile::start(const string& name) {
- open(name.c_str(), ios::out | ios::trunc);
+bool GeneratedFile::start(const string& directory, const string& name) {
+ const string path = directory + "/" + name;
+ open(path.c_str(), ios::out | ios::trunc);
if (!is_open()) {
- cerr << "Error. Can't open the output file: " << name << "\n";
+ cerr << "Error. Can't open the output file: " << path << "\n";
return false;
}
return true;