From 739afaf693bfea29e2e2d1637344d1ccaf83d4f0 Mon Sep 17 00:00:00 2001 From: Lloyd Pique Date: Thu, 21 Nov 2019 16:40:05 -0800 Subject: CE: Cleanup some comments in OutputTest A non-generic comment was copied-pasted, and not all of them were fixed up with what they were used for. Just make them all generic. Bug: None Test: None Change-Id: I7d237d9be7d7ada9a7484e93caddfff97cd937b5 --- .../CompositionEngine/tests/OutputTest.cpp | 34 ++++++++++------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'services/surfaceflinger/CompositionEngine/tests') diff --git a/services/surfaceflinger/CompositionEngine/tests/OutputTest.cpp b/services/surfaceflinger/CompositionEngine/tests/OutputTest.cpp index 88d232ae54..110760cb10 100644 --- a/services/surfaceflinger/CompositionEngine/tests/OutputTest.cpp +++ b/services/surfaceflinger/CompositionEngine/tests/OutputTest.cpp @@ -753,8 +753,8 @@ TEST_F(OutputUpdateAndWriteCompositionStateTest, forcesClientCompositionForAllLa struct OutputPrepareFrameTest : public testing::Test { struct OutputPartialMock : public OutputPartialMockBase { - // Sets up the helper functions called by prepareFrame to use a mock - // implementations. + // Sets up the helper functions called by the function under test to use + // mock implementations. MOCK_METHOD0(chooseCompositionStrategy, void()); }; @@ -1041,9 +1041,8 @@ TEST_F(OutputCollectVisibleLayersTest, processesCandidateLayersReversedAndSetsOu struct OutputPresentTest : public testing::Test { struct OutputPartialMock : public OutputPartialMockBase { - // All child helper functions Output::present() are defined as mocks, - // and those are tested separately, allowing the present() test to - // just cover the high level flow. + // Sets up the helper functions called by the function under test to use + // mock implementations. MOCK_METHOD1(updateColorProfile, void(const compositionengine::CompositionRefreshArgs&)); MOCK_METHOD1(updateAndWriteCompositionState, void(const compositionengine::CompositionRefreshArgs&)); @@ -1082,9 +1081,8 @@ struct OutputUpdateColorProfileTest : public testing::Test { using TestType = OutputUpdateColorProfileTest; struct OutputPartialMock : public OutputPartialMockBase { - // All child helper functions Output::present() are defined as mocks, - // and those are tested separately, allowing the present() test to - // just cover the high level flow. + // Sets up the helper functions called by the function under test to use + // mock implementations. MOCK_METHOD1(setColorProfile, void(const ColorProfile&)); }; @@ -1813,8 +1811,8 @@ struct OutputBeginFrameTest : public ::testing::Test { using TestType = OutputBeginFrameTest; struct OutputPartialMock : public OutputPartialMockBase { - // Sets up the helper functions called by begiNFrame to use a mock - // implementations. + // Sets up the helper functions called by the function under test to use + // mock implementations. MOCK_CONST_METHOD1(getDirtyRegion, Region(bool)); }; @@ -1966,8 +1964,8 @@ TEST_F(OutputBeginFrameTest, notHasDirtyNotHasLayersNotHadLayersLastFrame) { struct OutputDevOptRepaintFlashTest : public testing::Test { struct OutputPartialMock : public OutputPartialMockBase { - // Sets up the helper functions called by composeSurfaces to use a mock - // implementations. + // Sets up the helper functions called by the function under test to use + // mock implementations. MOCK_CONST_METHOD1(getDirtyRegion, Region(bool)); MOCK_METHOD1(composeSurfaces, std::optional(const Region&)); MOCK_METHOD0(postFramebuffer, void()); @@ -2048,8 +2046,8 @@ TEST_F(OutputDevOptRepaintFlashTest, alsoComposesSurfacesAndQueuesABufferIfDirty struct OutputFinishFrameTest : public testing::Test { struct OutputPartialMock : public OutputPartialMockBase { - // Sets up the helper functions called by composeSurfaces to use a mock - // implementations. + // Sets up the helper functions called by the function under test to use + // mock implementations. MOCK_METHOD1(composeSurfaces, std::optional(const Region&)); MOCK_METHOD0(postFramebuffer, void()); }; @@ -2098,8 +2096,8 @@ TEST_F(OutputFinishFrameTest, queuesBufferIfComposeSurfacesReturnsAFence) { struct OutputPostFramebufferTest : public testing::Test { struct OutputPartialMock : public OutputPartialMockBase { - // Sets up the helper functions called by composeSurfaces to use a mock - // implementations. + // Sets up the helper functions called by the function under test to use + // mock implementations. MOCK_METHOD0(presentAndGetFrameFences, compositionengine::Output::FrameFences()); }; @@ -2278,8 +2276,8 @@ struct OutputComposeSurfacesTest : public testing::Test { static const mat4 kDefaultColorTransformMat; struct OutputPartialMock : public OutputPartialMockBase { - // Sets up the helper functions called by composeSurfaces to use a mock - // implementations. + // Sets up the helper functions called by the function under test to use + // mock implementations. MOCK_CONST_METHOD0(getSkipColorTransform, bool()); MOCK_METHOD2(generateClientCompositionRequests, std::vector(bool, Region&)); -- cgit v1.2.3