summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Graham <scottmg@chromium.org>2013-05-17 20:14:07 (GMT)
committerScott Graham <scottmg@chromium.org>2013-05-17 20:14:07 (GMT)
commitdd50fc658491b80d3526f90751acbf9651cd5ce9 (patch)
tree7920a0d2651495b07d896db8bf199a2426bd74a0
parent43c33d73097f0fa1eb22a16eb0cc7cbde7be688d (diff)
downloadNinja-dd50fc658491b80d3526f90751acbf9651cd5ce9.zip
Ninja-dd50fc658491b80d3526f90751acbf9651cd5ce9.tar.gz
Ninja-dd50fc658491b80d3526f90751acbf9651cd5ce9.tar.bz2
fix truncate compile error in ninja_test on windows
-rw-r--r--src/deps_log_test.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/deps_log_test.cc b/src/deps_log_test.cc
index 0591736..3b32963 100644
--- a/src/deps_log_test.cc
+++ b/src/deps_log_test.cc
@@ -340,7 +340,8 @@ TEST_F(DepsLogTest, TruncatedRecovery) {
// Shorten the file, corrupting the last record.
struct stat st;
ASSERT_EQ(0, stat(kTestFilename, &st));
- ASSERT_EQ(0, truncate(kTestFilename, st.st_size - 2));
+ string err;
+ ASSERT_TRUE(Truncate(kTestFilename, st.st_size - 2, &err));
// Load the file again, add an entry.
{