| 65 | }; |
| 66 | |
| 67 | TEST_F(SimpleLoggerTest, CreateDirectories) { |
| 68 | // Test that it can create multiple layers of subdirectories on initialization. |
| 69 | path multilevel_subdir = tmp_dir() / "a" / "b" / "c"; |
| 70 | unique_ptr<SimpleLogger> logger = CreateSimpleLogger(multilevel_subdir); |
| 71 | EXPECT_OK(logger->Init()); |
| 72 | logger.reset(); |
| 73 | |
| 74 | // Test that it also works if the directory already exists |
| 75 | logger = CreateSimpleLogger(tmp_dir()); |
| 76 | EXPECT_OK(logger->Init()); |
| 77 | } |
| 78 | |
| 79 | TEST_F(SimpleLoggerTest, PreexistingFiles) { |
| 80 | // Test the reboot scenario where there are preexisting files |
nothing calls this directly
no test coverage detected