diff options
author | Nico Weber <nicolasweber@gmx.de> | 2016-08-01 01:00:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-01 01:00:37 (GMT) |
commit | 94fc14314501a78b1742e910f7c920188b2753da (patch) | |
tree | c565375565edadc2064d05db6acfefff38c95886 /src/build_test.cc | |
parent | 5739c144354c826b57042ad0968680c272a95856 (diff) | |
parent | 3473e08fae5ee76c86db0de079255f00251c1e2c (diff) | |
download | Ninja-94fc14314501a78b1742e910f7c920188b2753da.zip Ninja-94fc14314501a78b1742e910f7c920188b2753da.tar.gz Ninja-94fc14314501a78b1742e910f7c920188b2753da.tar.bz2 |
Merge pull request #1174 from gkistanova/not-initialized-elapsed-fix
Fix for not properly initialized elapsed time.
Diffstat (limited to 'src/build_test.cc')
-rw-r--r-- | src/build_test.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/build_test.cc b/src/build_test.cc index 06871d2..640e1b0 100644 --- a/src/build_test.cc +++ b/src/build_test.cc @@ -1725,6 +1725,14 @@ TEST_F(BuildTest, DepsGccWithEmptyDepfileErrorsOut) { ASSERT_EQ(1u, command_runner_.commands_ran_.size()); } +TEST_F(BuildTest, StatusFormatElapsed) { + status_.BuildStarted(); + // Before any task is done, the elapsed time must be zero. + EXPECT_EQ("[%/e0.000]", + status_.FormatProgressStatus("[%%/e%e]", + BuildStatus::kEdgeStarted)); +} + TEST_F(BuildTest, StatusFormatReplacePlaceholder) { EXPECT_EQ("[%/s0/t0/r0/u0/f0]", status_.FormatProgressStatus("[%%/s%s/t%t/r%r/u%u/f%f]", |