summaryrefslogtreecommitdiffstats
path: root/src/state_test.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2012-09-04 22:43:45 (GMT)
committerEvan Martin <martine@danga.com>2012-09-04 22:43:45 (GMT)
commitc9f4a275a5794b60bdb2d8a4a4e9358b060d550c (patch)
tree0ef380a813847b30ec3c97b28435e20a034c18d8 /src/state_test.cc
parent1e11c8a6bd119025efd8725370ffa42354f92f88 (diff)
downloadNinja-c9f4a275a5794b60bdb2d8a4a4e9358b060d550c.zip
Ninja-c9f4a275a5794b60bdb2d8a4a4e9358b060d550c.tar.gz
Ninja-c9f4a275a5794b60bdb2d8a4a4e9358b060d550c.tar.bz2
clarify setter
Diffstat (limited to 'src/state_test.cc')
-rw-r--r--src/state_test.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/state_test.cc b/src/state_test.cc
index 354468b..bc24edd 100644
--- a/src/state_test.cc
+++ b/src/state_test.cc
@@ -22,11 +22,14 @@ namespace {
TEST(State, Basic) {
State state;
+ EvalString command;
+ command.AddText("cat ");
+ command.AddSpecial("in");
+ command.AddText(" > ");
+ command.AddSpecial("out");
+
Rule* rule = new Rule("cat");
- rule->command().AddText("cat ");
- rule->command().AddSpecial("in");
- rule->command().AddText(" > ");
- rule->command().AddSpecial("out");
+ rule->set_command(command);
state.AddRule(rule);
Edge* edge = state.AddEdge(rule);