~kdub/+junk/no-native

« back to all changes in this revision

Viewing changes to tests/unit-tests/graphics/mesa/test_native_platform.cpp

  • Committer: Kevin DuBois
  • Date: 2014-11-17 18:38:55 UTC
  • mfrom: (2050.5.10 mesa-platform-split)
  • Revision ID: kevin.dubois@canonical.com-20141117183855-pmmmzpcw461tyq05
merge in no-2step

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
TEST_F(MesaNativePlatformTest, auth_magic_is_delegated_to_nested_context)
69
69
{
70
70
    using namespace testing;
71
 
 
72
 
    mgm::NativePlatform native;
73
 
 
74
71
    EXPECT_CALL(mock_nested_context, drm_auth_magic(_));
75
72
 
76
 
    native.initialize(mt::fake_shared(mock_nested_context));
 
73
    mgm::NativePlatform native(mt::fake_shared(mock_nested_context));
77
74
    native.connection_ipc_package();
78
75
}
79
76
 
80
77
TEST_F(MesaNativePlatformTest, sets_gbm_device_during_initialization)
81
78
{
82
 
    using namespace testing;
83
 
 
84
 
    mgm::NativePlatform native;
85
 
 
86
79
    EXPECT_CALL(mock_nested_context, drm_set_gbm_device(mock_gbm.fake_gbm.device));
87
 
 
88
 
    native.initialize(mt::fake_shared(mock_nested_context));
 
80
    mgm::NativePlatform native(mt::fake_shared(mock_nested_context));
89
81
}
90
82
 
91
83
TEST_F(MesaNativePlatformTest, packs_buffer_ipc_package_correctly)
117
109
    EXPECT_CALL(mock_ipc_msg, pack_size(stub_buffer.size()))
118
110
        .Times(Exactly(1));
119
111
 
120
 
    mgm::NativePlatform native;
 
112
    mgm::NativePlatform native(mt::fake_shared(mock_nested_context));
121
113
 
122
114
    native.fill_buffer_package(&mock_ipc_msg, &stub_buffer, mg::BufferIpcMsgType::full_msg);
123
115
    native.fill_buffer_package(&mock_ipc_msg, &stub_buffer, mg::BufferIpcMsgType::update_msg);