Skip to content

Commit 60cb2ad

Browse files
committed
More stylefixes
1 parent 29a8d10 commit 60cb2ad

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

tests/directory.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ TEST(directory, copy_directory) {
7878
EXPECT_TRUE(fs::is_directory(copy));
7979

8080
std::ifstream stream = std::ifstream(copy / "file");
81-
auto content = std::string(std::istreambuf_iterator<char>(stream), {});
81+
std::string content = std::string(std::istreambuf_iterator(stream), {});
8282
EXPECT_EQ(content, "Hello, world!");
8383
}
8484

@@ -112,8 +112,8 @@ TEST(directory, move_to_self) {
112112
EXPECT_TRUE(fs::exists(path));
113113

114114
{
115-
auto stream = std::ifstream(path / "file");
116-
auto content = std::string(std::istreambuf_iterator<char>(stream), {});
115+
std::ifstream stream = std::ifstream(path / "file");
116+
std::string content = std::string(std::istreambuf_iterator(stream), {});
117117
EXPECT_EQ(content, "Hello, world!");
118118
}
119119

@@ -140,8 +140,8 @@ TEST(directory, move_to_existing_directory) {
140140
EXPECT_FALSE(fs::exists(path));
141141

142142
{
143-
auto stream = std::ifstream(to / "file");
144-
auto content = std::string(std::istreambuf_iterator<char>(stream), {});
143+
std::ifstream stream = std::ifstream(to / "file");
144+
std::string content = std::string(std::istreambuf_iterator(stream), {});
145145
EXPECT_EQ(content, "Hello, world!");
146146
}
147147

tests/file.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ TEST(file, copy_file) {
121121

122122
EXPECT_TRUE(fs::is_regular_file(tmpfile));
123123

124-
auto stream = std::ifstream(copy.path());
125-
auto content = std::string(std::istreambuf_iterator(stream), {});
124+
std::ifstream stream = std::ifstream(copy.path());
125+
std::string content = std::string(std::istreambuf_iterator(stream), {});
126126
EXPECT_EQ(content, "Hello, world!");
127127
}
128128

@@ -148,8 +148,8 @@ TEST(file, move_to_self) {
148148
EXPECT_TRUE(fs::exists(path));
149149

150150
{
151-
auto stream = std::ifstream(path);
152-
auto content = std::string(std::istreambuf_iterator(stream), {});
151+
std::ifstream stream = std::ifstream(path);
152+
std::string content = std::string(std::istreambuf_iterator(stream), {});
153153
EXPECT_EQ(content, "Hello, world!");
154154
}
155155

@@ -177,8 +177,8 @@ TEST(file, move_to_existing_file) {
177177
EXPECT_FALSE(fs::exists(path, ec));
178178

179179
{
180-
auto stream = std::ifstream(to);
181-
auto content = std::string(std::istreambuf_iterator(stream), {});
180+
std::ifstream stream = std::ifstream(to);
181+
std::string content = std::string(std::istreambuf_iterator(stream), {});
182182
EXPECT_EQ(content, "Hello, world!");
183183
}
184184

0 commit comments

Comments
 (0)