summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-03-09 00:03:13 (GMT)
committerEvan Martin <martine@danga.com>2011-03-12 00:00:59 (GMT)
commit343c526e6a0c35816c4876bfc923cef15ef7a989 (patch)
treed284554ee8bf12fee04900df0f54ee7ec0f84f2d /src
parentb0f0dd5e540da62a83c06757361dfaa6c60efd5e (diff)
downloadNinja-343c526e6a0c35816c4876bfc923cef15ef7a989.zip
Ninja-343c526e6a0c35816c4876bfc923cef15ef7a989.tar.gz
Ninja-343c526e6a0c35816c4876bfc923cef15ef7a989.tar.bz2
fix test that relied on pointer values
Diffstat (limited to 'src')
-rw-r--r--src/build_test.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/build_test.cc b/src/build_test.cc
index f39c417..526e5f9 100644
--- a/src/build_test.cc
+++ b/src/build_test.cc
@@ -317,8 +317,13 @@ TEST_F(BuildTest, TwoStep) {
EXPECT_TRUE(builder_.Build(&err));
EXPECT_EQ("", err);
ASSERT_EQ(3, commands_ran_.size());
- EXPECT_EQ("cat in1 > cat1", commands_ran_[0]);
- EXPECT_EQ("cat in1 in2 > cat2", commands_ran_[1]);
+ // Depending on how the pointers work out, we could've ran
+ // the first two commands in either order.
+ EXPECT_TRUE((commands_ran_[0] == "cat in1 > cat1" &&
+ commands_ran_[1] == "cat in1 in2 > cat2") ||
+ (commands_ran_[1] == "cat in1 > cat1" &&
+ commands_ran_[0] == "cat in1 in2 > cat2"));
+
EXPECT_EQ("cat cat1 cat2 > cat12", commands_ran_[2]);
// Modifying in2 requires rebuilding one intermediate file