#include "../file-io.hpp" #include #include #include #include #include #include #include TEST(TestFileIO, TestFileReadWrite) { std::string testFile = "./tmp_test_file"; std::string testStatus, testStatusUpdated; testStatus.push_back(2); testStatus.append("image downloading in progress"); testStatusUpdated.push_back(0); testStatusUpdated.append("finished netboot"); fileWrite(testFile, testStatus); EXPECT_TRUE(testStatus == fileRead(testFile)); fileWrite(testFile, testStatusUpdated); EXPECT_TRUE(testStatusUpdated == fileRead(testFile)); remove(testFile.c_str()); }