std::string readFile() const;
/// @brief Removes existing file (if any).
- void removeFile() const;
+ int removeFile() const;
/// @brief Creates file with contents.
///
CSVFileTest::CSVFileTest()
: testfile_(absolutePath("test.csv")) {
- removeFile();
+ static_cast<void>(removeFile());
}
CSVFileTest::~CSVFileTest() {
- removeFile();
+ static_cast<void>(removeFile());
}
std::string
return (contents);
}
-void
+int
CSVFileTest::removeFile() const {
- remove(testfile_.c_str());
+ return (remove(testfile_.c_str()));
}
void
// Close the file and remove it.
csv->close();
- removeFile();
+ EXPECT_EQ(0, removeFile());
// The file should not exist.
EXPECT_FALSE(csv->exists());