diff options
author | Evan Martin <martine@danga.com> | 2013-04-08 21:05:27 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2013-04-08 21:18:50 (GMT) |
commit | 29e76bc16dc5e1b50e6afc8fe1614259bb53cbd1 (patch) | |
tree | 33f1824c843f654fede56292974ba1c33f60b42b /src/test.cc | |
parent | 28411da9014bc780784e63ce2411fe9070c8caf1 (diff) | |
download | Ninja-29e76bc16dc5e1b50e6afc8fe1614259bb53cbd1.zip Ninja-29e76bc16dc5e1b50e6afc8fe1614259bb53cbd1.tar.gz Ninja-29e76bc16dc5e1b50e6afc8fe1614259bb53cbd1.tar.bz2 |
move test virtual time "now_" into VirtualFileSystem
It's the only piece that cares about the current time.
Diffstat (limited to 'src/test.cc')
-rw-r--r-- | src/test.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test.cc b/src/test.cc index 0138b3a..c48ca82 100644 --- a/src/test.cc +++ b/src/test.cc @@ -94,9 +94,9 @@ void AssertHash(const char* expected, uint64_t actual) { ASSERT_EQ(BuildLog::LogEntry::HashCommand(expected), actual); } -void VirtualFileSystem::Create(const string& path, int time, +void VirtualFileSystem::Create(const string& path, const string& contents) { - files_[path].mtime = time; + files_[path].mtime = now_; files_[path].contents = contents; files_created_.insert(path); } @@ -109,7 +109,7 @@ TimeStamp VirtualFileSystem::Stat(const string& path) { } bool VirtualFileSystem::WriteFile(const string& path, const string& contents) { - Create(path, 0, contents); + Create(path, contents); return true; } |