~raof/mir/hack-hack-hack-remove-a-hack

« back to all changes in this revision

Viewing changes to tests/unit-tests/client/android/test_android_native_window.cpp

  • Committer: Tarmac
  • Author(s): Kevin DuBois
  • Date: 2013-11-26 19:06:17 UTC
  • mfrom: (1244.3.9 fix-1253486)
  • Revision ID: tarmac-20131126190617-42i8elpsm8exqbzj
clean up unit tests (ran under android) so there's no uninitialized value 
errors for the unit-tests/graphics/android tests, and make the tests run 
without gmock warning, unexpected call errors. (LP: #1172184). Fixes: https://bugs.launchpad.net/bugs/1172184, https://bugs.launchpad.net/bugs/1253486.

Approved by PS Jenkins bot, Alan Griffiths, Daniel van Vugt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
144
144
    using namespace testing;
145
145
 
146
146
    int fake_fd = 4948;
147
 
    auto mock_buffer = std::make_shared<mtd::MockAndroidNativeBuffer>();
 
147
    auto mock_buffer = std::make_shared<NiceMock<mtd::MockAndroidNativeBuffer>>();
148
148
    EXPECT_CALL(*mock_buffer, copy_fence())
149
149
        .Times(1)
150
150
        .WillOnce(Return(fake_fd));
176
176
    using namespace testing;
177
177
 
178
178
    ANativeWindowBuffer* returned_buffer;
179
 
    auto mock_buffer = std::make_shared<mtd::MockAndroidNativeBuffer>();
 
179
    auto mock_buffer = std::make_shared<NiceMock<mtd::MockAndroidNativeBuffer>>();
180
180
    std::shared_ptr<ANativeWindow> window = std::make_shared<mga::MirNativeWindow>(mock_driver_interpreter);
181
181
 
182
182
    EXPECT_CALL(*mock_driver_interpreter, driver_requests_buffer())