Browse files

make my last change actually work

  • Loading branch information...
1 parent ad9dcd8 commit 23ab2829f5f3dd66d95e1d3230f9c4bcb70cfabf @evmar evmar committed Jan 5, 2012
Showing with 8 additions and 7 deletions.
  1. +2 −2 src/build_log.cc
  2. +6 −5 src/build_log_test.cc
View
4 src/build_log.cc
@@ -138,14 +138,14 @@ bool BuildLog::Load(const string& path, string* err) {
start_time = atoi(start);
start = end + 1;
- char* end = strchr(start, field_separator);
+ end = strchr(start, field_separator);
if (!end)
continue;
*end = 0;
end_time = atoi(start);
start = end + 1;
- char* end = strchr(start, field_separator);
+ end = strchr(start, field_separator);
if (!end)
continue;
*end = 0;
View
11 src/build_log_test.cc
@@ -67,8 +67,9 @@ TEST_F(BuildLogTest, WriteRead) {
TEST_F(BuildLogTest, DoubleEntry) {
FILE* f = fopen(kTestFilename, "wb");
- fprintf(f, "0 out command abc\n");
- fprintf(f, "0 out command def\n");
+ fprintf(f, "# ninja log v3\n");
+ fprintf(f, "0 1 2 out command abc\n");
+ fprintf(f, "3 4 5 out command def\n");
fclose(f);
string err;
@@ -116,10 +117,10 @@ TEST_F(BuildLogTest, Truncate) {
}
}
-TEST_F(BuildLogTest, UpgradeV2) {
+TEST_F(BuildLogTest, UpgradeV3) {
FILE* f = fopen(kTestFilename, "wb");
- fprintf(f, "# ninja log v2\n");
- fprintf(f, "123 456 out command\n");
+ fprintf(f, "# ninja log v3\n");
+ fprintf(f, "123 456 0 out command\n");
fclose(f);
string err;

0 comments on commit 23ab282

Please sign in to comment.