@@ -27,13 +27,13 @@ namespace {
27
27
class TestingFileCollector : public FileCollector {
28
28
public:
29
29
using FileCollector::FileCollector;
30
- using FileCollector::m_root ;
31
- using FileCollector::m_seen ;
32
- using FileCollector::m_symlink_map ;
33
- using FileCollector::m_vfs_writer ;
30
+ using FileCollector::Root ;
31
+ using FileCollector::Seen ;
32
+ using FileCollector::SymlinkMap ;
33
+ using FileCollector::VFSWriter ;
34
34
35
- bool HasSeen (StringRef fs) {
36
- return m_seen .find (fs) != m_seen .end ();
35
+ bool hasSeen (StringRef fs) {
36
+ return Seen .find (fs) != Seen .end ();
37
37
}
38
38
};
39
39
@@ -99,28 +99,28 @@ struct ScopedFile {
99
99
};
100
100
} // end anonymous namespace
101
101
102
- TEST (FileCollectorTest, AddFile ) {
102
+ TEST (FileCollectorTest, addFile ) {
103
103
ScopedDir root (" add_file_root" , true );
104
104
std::string root_fs = root.Path .str ();
105
- TestingFileCollector file_collector (root_fs, root_fs);
105
+ TestingFileCollector FileCollector (root_fs, root_fs);
106
106
107
- file_collector. AddFile (" /path/to/a" );
108
- file_collector. AddFile (" /path/to/b" );
109
- file_collector. AddFile (" /path/to/c" );
107
+ FileCollector. addFile (" /path/to/a" );
108
+ FileCollector. addFile (" /path/to/b" );
109
+ FileCollector. addFile (" /path/to/c" );
110
110
111
111
// Make sure the root is correct.
112
- EXPECT_EQ (file_collector. m_root , root_fs);
112
+ EXPECT_EQ (FileCollector. Root , root_fs);
113
113
114
114
// Make sure we've seen all the added files.
115
- EXPECT_TRUE (file_collector. HasSeen (" /path/to/a" ));
116
- EXPECT_TRUE (file_collector. HasSeen (" /path/to/b" ));
117
- EXPECT_TRUE (file_collector. HasSeen (" /path/to/c" ));
115
+ EXPECT_TRUE (FileCollector. hasSeen (" /path/to/a" ));
116
+ EXPECT_TRUE (FileCollector. hasSeen (" /path/to/b" ));
117
+ EXPECT_TRUE (FileCollector. hasSeen (" /path/to/c" ));
118
118
119
119
// Make sure we've only seen the added files.
120
- EXPECT_FALSE (file_collector. HasSeen (" /path/to/d" ));
120
+ EXPECT_FALSE (FileCollector. hasSeen (" /path/to/d" ));
121
121
}
122
122
123
- TEST (FileCollectorTest, CopyFiles ) {
123
+ TEST (FileCollectorTest, copyFiles ) {
124
124
ScopedDir file_root (" file_root" , true );
125
125
ScopedFile a (file_root + " /aaa" );
126
126
ScopedFile b (file_root + " /bbb" );
@@ -129,22 +129,22 @@ TEST(FileCollectorTest, CopyFiles) {
129
129
// Create file collector and add files.
130
130
ScopedDir root (" copy_files_root" , true );
131
131
std::string root_fs = root.Path .str ();
132
- TestingFileCollector file_collector (root_fs, root_fs);
133
- file_collector. AddFile (a.Path );
134
- file_collector. AddFile (b.Path );
135
- file_collector. AddFile (c.Path );
132
+ TestingFileCollector FileCollector (root_fs, root_fs);
133
+ FileCollector. addFile (a.Path );
134
+ FileCollector. addFile (b.Path );
135
+ FileCollector. addFile (c.Path );
136
136
137
137
// Make sure we can copy the files.
138
- std::error_code ec = file_collector. CopyFiles (true );
138
+ std::error_code ec = FileCollector. copyFiles (true );
139
139
EXPECT_FALSE (ec);
140
140
141
141
// Now add a bogus file and make sure we error out.
142
- file_collector. AddFile (" /some/bogus/file" );
143
- ec = file_collector. CopyFiles (true );
142
+ FileCollector. addFile (" /some/bogus/file" );
143
+ ec = FileCollector. copyFiles (true );
144
144
EXPECT_TRUE (ec);
145
145
146
146
// However, if stop_on_error is true the copy should still succeed.
147
- ec = file_collector. CopyFiles (false );
147
+ ec = FileCollector. copyFiles (false );
148
148
EXPECT_FALSE (ec);
149
149
}
150
150
@@ -171,17 +171,17 @@ TEST(FileCollectorTest, Symlinks) {
171
171
// Root where files are copied to.
172
172
ScopedDir reproducer_root (" reproducer_root" , true );
173
173
std::string root_fs = reproducer_root.Path .str ();
174
- TestingFileCollector file_collector (root_fs, root_fs);
174
+ TestingFileCollector FileCollector (root_fs, root_fs);
175
175
176
176
// Add all the files to the collector.
177
- file_collector. AddFile (a.Path );
178
- file_collector. AddFile (b.Path );
179
- file_collector. AddFile (c.Path );
180
- file_collector. AddFile (d.Path );
181
- file_collector. AddFile (e.Path );
182
- file_collector. AddFile (file_root + " /bar/ddd" );
183
-
184
- auto mapping = file_collector. m_vfs_writer .getMappings ();
177
+ FileCollector. addFile (a.Path );
178
+ FileCollector. addFile (b.Path );
179
+ FileCollector. addFile (c.Path );
180
+ FileCollector. addFile (d.Path );
181
+ FileCollector. addFile (e.Path );
182
+ FileCollector. addFile (file_root + " /bar/ddd" );
183
+
184
+ auto mapping = FileCollector. VFSWriter .getMappings ();
185
185
186
186
{
187
187
// Make sure the common case works.
0 commit comments