From: Linux Karlsson Date: Tue, 15 Jun 2010 18:10:00 +0000 (-0400) Subject: Fixed formatting issue in humandate() test X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5fa7e6916bf28e1a11ab428de81f974ac236a53;p=thirdparty%2Fntp.git Fixed formatting issue in humandate() test bk: 4c17c1f8dr-L8YbUnKXZW8_jbs44CA --- diff --git a/tests/libntp/humandate.cpp b/tests/libntp/humandate.cpp index 4fb860978e..742aa28724 100644 --- a/tests/libntp/humandate.cpp +++ b/tests/libntp/humandate.cpp @@ -14,9 +14,10 @@ TEST_F(humandateTest, RegularTime) { time = localtime(&sample); ASSERT_TRUE(time != NULL); - expected << time->tm_hour << ":" - << time->tm_min << ":" - << time->tm_sec; + expected << std::setfill('0') + << std::setw(2) << time->tm_hour << ":" + << std::setw(2) << time->tm_min << ":" + << std::setw(2) << time->tm_sec; EXPECT_STREQ(expected.str().c_str(), humantime(sample)); }