Merge lp://qastaging/~mardy/gnome-control-center-signon/lib-unit-tests into lp://qastaging/gnome-control-center-signon

Proposed by Alberto Mardegan
Status: Merged
Approved by: David King
Approved revision: 134
Merged at revision: 132
Proposed branch: lp://qastaging/~mardy/gnome-control-center-signon/lib-unit-tests
Merge into: lp://qastaging/gnome-control-center-signon
Diff against target: 201 lines (+98/-17)
3 files modified
Makefile.am (+4/-1)
libaccount-plugin/oauth-plugin.c (+33/-16)
tests/test-account-plugin.vala (+61/-0)
To merge this branch: bzr merge lp://qastaging/~mardy/gnome-control-center-signon/lib-unit-tests
Reviewer Review Type Date Requested Status
David King (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+144923@code.qastaging.launchpad.net

Description of the change

Tests: improve testing of libaccount-plugin

* Add a couple of tests to give some coverage to the file libaccount-plugin/client.c
* Add a test of a very important bit of code in the OAuthPlugin (this also required a small code tweak to make the code actually testable)
* Include libaccount-plugin in coverage reports

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
David King (amigadave) wrote :

Looks good.

57 + if (priv->socket != NULL) {

Curly brace should be on the next line, by itself.

98 +GVariant *prepare_session_data_test(ApOAuthPlugin *self);
99 +GVariant *prepare_session_data_test(ApOAuthPlugin *self)

Spaces before brackets.

112 +extern GLib.Variant prepare_session_data_test(Ap.OAuthPlugin self);

Same again.

121 + Test.add_func ("/libaccount-plugin/client/load_plugin/0",
122 + client_load_plugin_0);
123 + Test.add_func ("/libaccount-plugin/client/load_application_plugin/0",
124 + client_load_application_plugin_0);

I do not like the "_0" naming here. As you assert on the plugin being null later, use "_null" instead, or some other more descriptive term such as "_not_found".

review: Needs Fixing
134. By Alberto Mardegan

Fix coding style

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
David King (amigadave) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches