diff options
author | Evan Martin <martine@danga.com> | 2012-12-30 20:48:44 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2013-04-08 21:45:07 (GMT) |
commit | 2f2bacc39ee47b648d6b0aea4c60cb64c41393df (patch) | |
tree | 3b41cd8dea016730843118f8da68e986fd283899 /src/deps_log.h | |
parent | 70fd0f590c3a46a4a9ff9a160f455c5c30f5b90a (diff) | |
download | Ninja-2f2bacc39ee47b648d6b0aea4c60cb64c41393df.zip Ninja-2f2bacc39ee47b648d6b0aea4c60cb64c41393df.tar.gz Ninja-2f2bacc39ee47b648d6b0aea4c60cb64c41393df.tar.bz2 |
expand DepsLog test, fix two bugs it revealed
Diffstat (limited to 'src/deps_log.h')
-rw-r--r-- | src/deps_log.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/deps_log.h b/src/deps_log.h index e11cca3..5ddc7bd 100644 --- a/src/deps_log.h +++ b/src/deps_log.h @@ -77,12 +77,17 @@ struct DepsLog { bool Load(const string& path, State* state, string* err); Deps* GetDeps(Node* node); + /// Used for tests. + const vector<Node*>& nodes() const { return nodes_; } + private: // Write a node name record, assigning it an id. bool RecordId(Node* node); FILE* file_; + /// Maps id -> Node. vector<Node*> nodes_; + /// Maps id -> deps of that id. vector<Deps*> deps_; friend struct DepsLogTest; |