clang-format

This commit is contained in:
pmb
2025-06-25 17:37:15 -07:00
parent 977ca7ce7b
commit 24b614b97d
+9 -5
View File
@@ -10,9 +10,13 @@ class RealFilesystemTest : public ::testing::Test {
protected: protected:
void SetUp() override { void SetUp() override {
// Create a unique temporary directory for this test run // Create a unique temporary directory for this test run
temp_dir = std::filesystem::temp_directory_path() / temp_dir =
("finger_test_" + std::to_string(std::chrono::duration_cast<std::chrono::nanoseconds>( std::filesystem::temp_directory_path() /
std::chrono::high_resolution_clock::now().time_since_epoch()).count())); ("finger_test_" +
std::to_string(
std::chrono::duration_cast<std::chrono::nanoseconds>(
std::chrono::high_resolution_clock::now().time_since_epoch())
.count()));
// Create the temporary directory // Create the temporary directory
std::filesystem::create_directories(temp_dir); std::filesystem::create_directories(temp_dir);
@@ -162,8 +166,8 @@ TEST_F(RealFilesystemTest, ProcessWithFileContainingOnlyNewlines) {
createTestFile("newlineuser", user_content); createTestFile("newlineuser", user_content);
std::string result = process("newlineuser", real_fs, test_base_path); std::string result = process("newlineuser", real_fs, test_base_path);
// RealFilesystemWrapper reads line by line, so the last empty line after the final \n // RealFilesystemWrapper reads line by line, so the last empty line after the
// is not read as a separate line, resulting in "\n\n\r\n" // final \n is not read as a separate line, resulting in "\n\n\r\n"
EXPECT_EQ(result, "\n\n\r\n"); EXPECT_EQ(result, "\n\n\r\n");
} }