diff options
author | Amin Hassani <ahassani@chromium.org> | 2019-01-14 16:24:20 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-01-16 01:46:42 -0800 |
commit | 4b71743b20d0ca155df3414a863a48cb898622c9 (patch) | |
tree | e3205b1d04d43978336d83818b406c00cc7cd573 /update_manager/generic_variables_unittest.cc | |
parent | aefaab2a04fc011cb62b6d646edef01c4b0545b2 (diff) |
update_engine: Run clang-format on update_manager/
BUG=none
TEST=unittest
Change-Id: I80b56209d757d1156dd5f55bdd758a1ae8388dcc
Reviewed-on: https://chromium-review.googlesource.com/1409707
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Sen Jiang <senj@chromium.org>
Diffstat (limited to 'update_manager/generic_variables_unittest.cc')
-rw-r--r-- | update_manager/generic_variables_unittest.cc | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/update_manager/generic_variables_unittest.cc b/update_manager/generic_variables_unittest.cc index cb0c48ff..0ff97e39 100644 --- a/update_manager/generic_variables_unittest.cc +++ b/update_manager/generic_variables_unittest.cc @@ -34,15 +34,14 @@ namespace chromeos_update_manager { class UmPollCopyVariableTest : public ::testing::Test {}; - TEST_F(UmPollCopyVariableTest, SimpleTest) { // Tests that copies are generated as intended. int source = 5; PollCopyVariable<int> var("var", source); // Generate and validate a copy. - unique_ptr<const int> copy_1(var.GetValue( - UmTestUtils::DefaultTimeout(), nullptr)); + unique_ptr<const int> copy_1( + var.GetValue(UmTestUtils::DefaultTimeout(), nullptr)); ASSERT_NE(nullptr, copy_1.get()); EXPECT_EQ(5, *copy_1); @@ -70,7 +69,6 @@ TEST_F(UmPollCopyVariableTest, SetFlagTest) { UmTestUtils::ExpectVariableHasValue(5, &var); } - class CopyConstructorTestClass { public: CopyConstructorTestClass(void) : copied_(false) {} @@ -84,7 +82,6 @@ class CopyConstructorTestClass { int val_ = 0; }; - TEST_F(UmPollCopyVariableTest, UseCopyConstructorTest) { // Ensures that CopyVariables indeed uses the copy constructor. const CopyConstructorTestClass source; @@ -97,7 +94,6 @@ TEST_F(UmPollCopyVariableTest, UseCopyConstructorTest) { EXPECT_TRUE(copy->copied_); } - class UmConstCopyVariableTest : public ::testing::Test {}; TEST_F(UmConstCopyVariableTest, SimpleTest) { @@ -110,7 +106,6 @@ TEST_F(UmConstCopyVariableTest, SimpleTest) { UmTestUtils::ExpectVariableHasValue(5, &var); } - class UmCallCopyVariableTest : public ::testing::Test {}; CopyConstructorTestClass test_func(CopyConstructorTestClass* obj) { @@ -126,8 +121,8 @@ TEST_F(UmCallCopyVariableTest, SimpleTest) { ASSERT_FALSE(test_obj.copied_); test_obj.val_ = 5; - base::Callback<CopyConstructorTestClass(void)> cb = base::Bind( - test_func, &test_obj); + base::Callback<CopyConstructorTestClass(void)> cb = + base::Bind(test_func, &test_obj); CallCopyVariable<CopyConstructorTestClass> var("var", cb); unique_ptr<const CopyConstructorTestClass> copy( @@ -148,16 +143,13 @@ TEST_F(UmCallCopyVariableTest, NullTest) { class UmAsyncCopyVariableTest : public ::testing::Test { protected: - void SetUp() override { - loop_.SetAsCurrent(); - } + void SetUp() override { loop_.SetAsCurrent(); } void TearDown() override { // No remaining event on the main loop. EXPECT_FALSE(loop_.PendingTasks()); } - brillo::FakeMessageLoop loop_{nullptr}; }; @@ -185,9 +177,7 @@ TEST_F(UmAsyncCopyVariableTest, UnsetValueTest) { class CallCounterObserver : public BaseVariable::ObserverInterface { public: - void ValueChanged(BaseVariable* variable) { - calls_count_++; - } + void ValueChanged(BaseVariable* variable) { calls_count_++; } int calls_count_ = 0; }; |