TEST(TempDirTest, getName) { const char* tempDir = "/tmp/"; const int length = strlen(tempDir); TempDir dir; EXPECT_TRUE(strncmp(tempDir, dir.getPath().c_str(), length) == 0); }
TEST(TempDirTest, tempDirExists) { TempDir dir; struct stat info; EXPECT_EQ(stat(dir.getPath().c_str(), &info), 0); EXPECT_TRUE(S_ISDIR(info.st_mode)); }