Mir

Merge lp:~vanvugt/mir/fix-1308905 into lp:mir

Proposed by Daniel van Vugt
Status: Rejected
Rejected by: Daniel van Vugt
Proposed branch: lp:~vanvugt/mir/fix-1308905
Merge into: lp:mir
Diff against target: 39 lines (+8/-0)
1 file modified
tests/unit-tests/compositor/test_gl_renderer.cpp (+8/-0)
To merge this branch: bzr merge lp:~vanvugt/mir/fix-1308905
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Alan Griffiths Approve
Review via email: mp+216266@code.launchpad.net

Commit message

Fix warnings arising from unexpected (uninteresting) mock_gl calls
(LP: #1308905)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Before:

$ bin/mir_unit_tests --gtest_filter=GLRenderer.*
Note: Google Test filter = GLRenderer.*
[==========] Running 3 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 3 tests from GLRenderer
[ RUN ] GLRenderer.TestSetUpRenderContextBeforeRendering
[ OK ] GLRenderer.TestSetUpRenderContextBeforeRendering (1 ms)
[ RUN ] GLRenderer.disables_blending_for_rgbx_surfaces
[ OK ] GLRenderer.disables_blending_for_rgbx_surfaces (1 ms)
[ RUN ] GLRenderer.caches_and_uploads_texture_only_on_buffer_changes
[ OK ] GLRenderer.caches_and_uploads_texture_only_on_buffer_changes (2 ms)
[----------] 3 tests from GLRenderer (4 ms total)

[----------] Global test environment tear-down
[==========] 3 tests from 1 test case ran. (4 ms total)
[ PASSED ] 3 tests.

So what noise?

review: Needs Information
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The noise is detailed in bug 1308905.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Are the ".Times(1);" actually the requirement being tested for? Or would ".Times(AnyNumber());" be better documentation of the uninteresting nature of these calls?

review: Needs Information
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Exactly one is important. Zero is not enough and more than one would indicate bugs.

Revision history for this message
Alan Griffiths (alan-griffiths) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Failure looks unrelated. Re-approving

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

1563. By Daniel van Vugt

Fix warnings arising from unexpected (uninteresting) mock_gl calls
(LP: #1308905)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/unit-tests/compositor/test_gl_renderer.cpp'
2--- tests/unit-tests/compositor/test_gl_renderer.cpp 2014-04-07 20:28:58 +0000
3+++ tests/unit-tests/compositor/test_gl_renderer.cpp 2014-04-17 08:40:21 +0000
4@@ -174,6 +174,7 @@
5
6 EXPECT_CALL(mock_gl, glGetShaderiv(stub_v_shader, GL_INFO_LOG_LENGTH, _))
7 .WillOnce(SetArgPointee<2>(stub_info_log_length));
8+ EXPECT_CALL(mock_gl, glDeleteShader(stub_v_shader)).Times(1);
9 EXPECT_CALL(mock_gl, glGetShaderInfoLog(stub_v_shader,
10 stub_info_log_length,
11 _,
12@@ -195,6 +196,7 @@
13
14 EXPECT_CALL(mock_gl, glGetShaderiv(stub_f_shader, GL_INFO_LOG_LENGTH, _))
15 .WillOnce(SetArgPointee<2>(stub_info_log_length));
16+ EXPECT_CALL(mock_gl, glDeleteShader(stub_f_shader)).Times(1);
17 EXPECT_CALL(mock_gl, glGetShaderInfoLog(stub_f_shader,
18 stub_info_log_length,
19 _,
20@@ -202,6 +204,8 @@
21 .WillOnce(CopyString(stub_info_log.c_str(),
22 stub_info_log.size()));
23
24+ EXPECT_CALL(mock_gl, glDeleteShader(stub_v_shader)).Times(1);
25+
26 EXPECT_THROW({
27 auto r = gl_renderer_factory.create_renderer_for(display_area);
28 }, std::runtime_error);
29@@ -224,6 +228,10 @@
30 .WillOnce(CopyString(stub_info_log.c_str(),
31 stub_info_log.size()));
32
33+ EXPECT_CALL(mock_gl, glDeleteShader(stub_v_shader)).Times(1);
34+ EXPECT_CALL(mock_gl, glDeleteShader(stub_f_shader)).Times(1);
35+ EXPECT_CALL(mock_gl, glDeleteProgram(stub_program)).Times(1);
36+
37 EXPECT_THROW({
38 auto r = gl_renderer_factory.create_renderer_for(display_area);
39 }, std::runtime_error);

Subscribers

People subscribed via source and target branches