Commit f0435bc8 by Corentin Wallez

Surface_unittest: fix a gmock warning

getSwapBehavior was being called in Surface's constructor but masn't expected, causing a warning. Add it as an expect call. BUG=angleproject:1126 Change-Id: Idf4a7e0ff66ba5741d3773e09ade4a1335b355ae Reviewed-on: https://chromium-review.googlesource.com/293902Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 0b9e9032
...@@ -41,6 +41,7 @@ class SurfaceTest : public testing::Test ...@@ -41,6 +41,7 @@ class SurfaceTest : public testing::Test
virtual void SetUp() virtual void SetUp()
{ {
mImpl = new MockSurfaceImpl; mImpl = new MockSurfaceImpl;
EXPECT_CALL(*mImpl, getSwapBehavior());
EXPECT_CALL(*mImpl, destroy()); EXPECT_CALL(*mImpl, destroy());
mSurface = new egl::Surface(mImpl, EGL_WINDOW_BIT, &mConfig, egl::AttributeMap()); mSurface = new egl::Surface(mImpl, EGL_WINDOW_BIT, &mConfig, egl::AttributeMap());
} }
...@@ -58,6 +59,7 @@ class SurfaceTest : public testing::Test ...@@ -58,6 +59,7 @@ class SurfaceTest : public testing::Test
TEST_F(SurfaceTest, DestructionDeletesImpl) TEST_F(SurfaceTest, DestructionDeletesImpl)
{ {
MockSurfaceImpl *impl = new MockSurfaceImpl; MockSurfaceImpl *impl = new MockSurfaceImpl;
EXPECT_CALL(*impl, getSwapBehavior());
EXPECT_CALL(*impl, destroy()).Times(1).RetiresOnSaturation(); EXPECT_CALL(*impl, destroy()).Times(1).RetiresOnSaturation();
egl::Surface *surface = new egl::Surface(impl, EGL_WINDOW_BIT, &mConfig, egl::AttributeMap()); egl::Surface *surface = new egl::Surface(impl, EGL_WINDOW_BIT, &mConfig, egl::AttributeMap());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment