Merge lp:~azzar1/unity/fix-1089894 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Łukasz Zemczak
Approved revision: no longer in the source branch.
Merged at revision: 2981
Proposed branch: lp:~azzar1/unity/fix-1089894
Merge into: lp:unity
Diff against target: 11 lines (+1/-0)
1 file modified
tests/test_launcher_controller.cpp (+1/-0)
To merge this branch: bzr merge lp:~azzar1/unity/fix-1089894
Reviewer Review Type Date Requested Status
Łukasz Zemczak Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+139685@code.launchpad.net

Commit message

Avoid segfaults in launcher controller tests.

Description of the change

== Problem ==
TestLauncherController.GetLastIconPriorityUnStickyWithNoIconsAndUri segfaults.

== Fix ==
We should check for null in tests too. We'll get a test failure now (will be fixed in a different branch)

To post a comment you must log in.
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Yes, that's a +1 as well! But there are still some other segfaults in other tests left ;)! Keep those coming!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/test_launcher_controller.cpp'
2--- tests/test_launcher_controller.cpp 2012-11-28 09:34:44 +0000
3+++ tests/test_launcher_controller.cpp 2012-12-13 12:35:29 +0000
4@@ -929,6 +929,7 @@
5 lc.Impl()->SetupIcons();
6
7 auto first_icon = lc.Impl()->GetIconByUri(FavoriteStore::URI_PREFIX_APP + app::SW_CENTER);
8+ ASSERT_TRUE(first_icon);
9
10 int last_priority = lc.Impl()->GetLastIconPriority<VolumeLauncherIcon>(places::DEVICES_URI);
11 EXPECT_EQ(last_priority, first_icon->SortPriority() - 1);