update_engine: ASSERT_TRUE Time::FromString calls
This function has WARN_UNUSED_RESULT in the new libchrome, but
it already returns a bool success value in the current libchrome,
so we should ASSERT using that now to make the transition easy.
BUG=b:37434548
TEST=unit tests
Change-Id: Id3af3b78c90d2dd86e81a54f2289fdeb80aaca96
Reviewed-on: https://chromium-review.googlesource.com/1069747
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
diff --git a/omaha_request_action_unittest.cc b/omaha_request_action_unittest.cc
index 2ad3eec..0e5ffb0 100644
--- a/omaha_request_action_unittest.cc
+++ b/omaha_request_action_unittest.cc
@@ -2318,7 +2318,7 @@
request_params_.set_update_check_count_wait_enabled(false);
Time arbitrary_date;
- Time::FromString("6/4/1989", &arbitrary_date);
+ ASSERT_TRUE(Time::FromString("6/4/1989", &arbitrary_date));
fake_system_state_.fake_clock()->SetWallclockTime(arbitrary_date);
ASSERT_FALSE(TestUpdateCheck(fake_update_response_.GetUpdateResponse(),
-1,
@@ -2356,8 +2356,8 @@
request_params_.set_update_check_count_wait_enabled(false);
Time t1, t2;
- Time::FromString("1/1/2012", &t1);
- Time::FromString("1/3/2012", &t2);
+ ASSERT_TRUE(Time::FromString("1/1/2012", &t1));
+ ASSERT_TRUE(Time::FromString("1/3/2012", &t2));
ASSERT_TRUE(
fake_prefs_.SetInt64(kPrefsUpdateFirstSeenAt, t1.ToInternalValue()));
fake_system_state_.fake_clock()->SetWallclockTime(t2);