summaryrefslogtreecommitdiff
path: root/update_manager/update_manager_unittest.cc
diff options
context:
space:
mode:
authorAlex Deymo <deymo@google.com>2016-02-10 16:08:11 -0800
committerAlex Deymo <deymo@google.com>2016-02-17 00:12:30 +0000
commit80f70ff45f8ea9a679c0c3ed0dc143dd2fe2b63e (patch)
tree761f1b9821f84d8e2470cb67772ebb03cfb47f3f /update_manager/update_manager_unittest.cc
parentb3f699a131e96c326b675b465ce02daaa7fe7c56 (diff)
Build unittests in Brillo.
Many unittests do not pass for simple reasons that will be addressed later. This CL includes all the changes to make the unittests build. In particular, the generated DBus mocks, required to build several unittests are now included here. The dbus-constants.h files were moved to the system_api repo, so they can be removed from here. The unittest build is only enabled for Brillo targets, since non-Brillo targets don't even build DBus. Bug: 26955860 TEST=`mmma` on edison-eng (and aosp_arm-eng). Change-Id: Ib38241f0a6eb99b1d60d72db6bcfd125d38e3fad
Diffstat (limited to 'update_manager/update_manager_unittest.cc')
-rw-r--r--update_manager/update_manager_unittest.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/update_manager/update_manager_unittest.cc b/update_manager/update_manager_unittest.cc
index 4cc738dc..03f16108 100644
--- a/update_manager/update_manager_unittest.cc
+++ b/update_manager/update_manager_unittest.cc
@@ -253,9 +253,9 @@ TEST_F(UmUpdateManagerTest, AsyncPolicyRequestDelaysEvaluation) {
umut_->AsyncPolicyRequest(callback, &Policy::UpdateCheckAllowed);
// The callback should wait until we run the main loop for it to be executed.
- EXPECT_EQ(0, calls.size());
+ EXPECT_EQ(0U, calls.size());
MessageLoopRunMaxIterations(MessageLoop::current(), 100);
- EXPECT_EQ(1, calls.size());
+ EXPECT_EQ(1U, calls.size());
}
TEST_F(UmUpdateManagerTest, AsyncPolicyRequestTimeoutDoesNotFire) {
@@ -273,14 +273,14 @@ TEST_F(UmUpdateManagerTest, AsyncPolicyRequestTimeoutDoesNotFire) {
// to the default.
MessageLoopRunMaxIterations(MessageLoop::current(), 100);
EXPECT_EQ(1, num_called);
- ASSERT_EQ(1, calls.size());
+ ASSERT_EQ(1U, calls.size());
EXPECT_EQ(EvalStatus::kSucceeded, calls[0].first);
// Wait for the timeout to expire, run the main loop again, ensure that
// nothing happened.
test_clock_.Advance(TimeDelta::FromSeconds(2));
MessageLoopRunMaxIterations(MessageLoop::current(), 10);
EXPECT_EQ(1, num_called);
- EXPECT_EQ(1, calls.size());
+ EXPECT_EQ(1U, calls.size());
}
TEST_F(UmUpdateManagerTest, AsyncPolicyRequestTimesOut) {
@@ -301,7 +301,7 @@ TEST_F(UmUpdateManagerTest, AsyncPolicyRequestTimesOut) {
// was not invoked.
MessageLoopRunMaxIterations(MessageLoop::current(), 100);
EXPECT_EQ(1, num_called);
- EXPECT_EQ(0, calls.size());
+ EXPECT_EQ(0U, calls.size());
// Wait for the expiration timeout to expire, run the main loop again,
// ensure that reevaluation occurred but callback was not invoked (i.e.
// default policy was not consulted).
@@ -310,7 +310,7 @@ TEST_F(UmUpdateManagerTest, AsyncPolicyRequestTimesOut) {
TimeDelta::FromSeconds(2));
MessageLoopRunMaxIterations(MessageLoop::current(), 10);
EXPECT_EQ(2, num_called);
- EXPECT_EQ(0, calls.size());
+ EXPECT_EQ(0U, calls.size());
// Wait for reevaluation due to delay to happen, ensure that it occurs and
// that the callback is invoked.
test_clock_.Advance(TimeDelta::FromSeconds(2));
@@ -318,7 +318,7 @@ TEST_F(UmUpdateManagerTest, AsyncPolicyRequestTimesOut) {
TimeDelta::FromSeconds(2));
MessageLoopRunMaxIterations(MessageLoop::current(), 10);
EXPECT_EQ(3, num_called);
- ASSERT_EQ(1, calls.size());
+ ASSERT_EQ(1U, calls.size());
EXPECT_EQ(EvalStatus::kSucceeded, calls[0].first);
}