summaryrefslogtreecommitdiffstats
path: root/src/deps_log_test.cc
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-04-29 15:57:31 (GMT)
committerNico Weber <nicolasweber@gmx.de>2013-04-29 16:01:55 (GMT)
commitbb10325339898d2833a9f24e9e0252b2c257beb1 (patch)
tree7f78186d78e2e060a26ece346129aba9015d3515 /src/deps_log_test.cc
parent3699cb6aa2fb29125bf725cb50fbcc593da8a8a1 (diff)
downloadNinja-bb10325339898d2833a9f24e9e0252b2c257beb1.zip
Ninja-bb10325339898d2833a9f24e9e0252b2c257beb1.tar.gz
Ninja-bb10325339898d2833a9f24e9e0252b2c257beb1.tar.bz2
Introduce a Truncate() function that works on POSIX and Windows.
Hopefully fixes the build on Windows.
Diffstat (limited to 'src/deps_log_test.cc')
-rw-r--r--src/deps_log_test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/deps_log_test.cc b/src/deps_log_test.cc
index 9623d17..b3d6b74 100644
--- a/src/deps_log_test.cc
+++ b/src/deps_log_test.cc
@@ -251,11 +251,11 @@ TEST_F(DepsLogTest, Truncated) {
int node_count = 5;
int deps_count = 2;
for (int size = (int)st.st_size; size > 0; --size) {
- ASSERT_EQ(0, truncate(kTestFilename, size));
+ string err;
+ ASSERT_TRUE(Truncate(kTestFilename, size, &err));
State state;
DepsLog log;
- string err;
EXPECT_TRUE(log.Load(kTestFilename, &state, &err));
if (!err.empty()) {
// At some point the log will be so short as to be unparseable.