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

« back to all changes in this revision

Viewing changes to tests/unit-tests/graphics/android/test_buffer_tex_bind.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:
38
38
    {
39
39
        using namespace testing;
40
40
 
41
 
        mock_native_buffer = std::make_shared<mtd::MockAndroidNativeBuffer>();
 
41
        mock_native_buffer = std::make_shared<NiceMock<mtd::MockAndroidNativeBuffer>>();
42
42
        size = geom::Size{300, 220};
43
43
        pf = geom::PixelFormat::abgr_8888;
44
44
        extensions = std::make_shared<mg::EGLExtensions>();
45
 
 
46
 
        mock_egl.silence_uninteresting();
47
45
    };
48
 
    virtual void TearDown()
49
 
    {
50
 
        buffer.reset();
51
 
    }
52
46
 
53
47
    geom::Size size;
54
48
    geom::PixelFormat pf;
55
49
 
56
 
    mtd::MockEGL mock_egl;
 
50
    testing::NiceMock<mtd::MockEGL> mock_egl;
57
51
    std::shared_ptr<mg::EGLExtensions> extensions;
58
 
    std::shared_ptr<mga::Buffer> buffer;
59
52
    std::shared_ptr<mtd::MockAndroidNativeBuffer> mock_native_buffer;
60
53
};
61
54