~azzar1/unity/lp-1226116

« back to all changes in this revision

Viewing changes to tests/unit/TestQuicklistMenuitems.cpp

  • Committer: Daniel van Vugt
  • Date: 2012-03-14 06:24:18 UTC
  • mfrom: (2108 unity)
  • mto: This revision was merged to the branch mainline in revision 2146.
  • Revision ID: daniel.van.vugt@canonical.com-20120314062418-nprucpbr0m7qky5e
MergedĀ latestĀ lp:unity

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
#include "QuicklistView.h"
37
37
#include "TestThreadHelper.h"
38
38
 
 
39
using unity::QuicklistView;
 
40
using unity::QuicklistMenuItem;
 
41
using unity::QuicklistMenuItemCheckmark;
 
42
using unity::QuicklistMenuItemLabel;
 
43
using unity::QuicklistMenuItemRadio;
 
44
using unity::QuicklistMenuItemSeparator;
 
45
 
39
46
static void TestMenuItemCheckmark(void);
40
47
static void TestMenuItemLabel(void);
41
48
static void TestMenuItemRadio(void);
232
239
  quicklist->TestMenuItems(root);
233
240
 
234
241
  g_assert_cmpint(quicklist->GetNumItems(), == , 4);
235
 
  g_assert_cmpint(quicklist->GetNthType(0), == , MENUITEM_TYPE_LABEL);
236
 
  g_assert_cmpint(quicklist->GetNthType(1), == , MENUITEM_TYPE_SEPARATOR);
237
 
  g_assert_cmpint(quicklist->GetNthType(2), == , MENUITEM_TYPE_LABEL);
238
 
  g_assert_cmpint(quicklist->GetNthType(3), == , MENUITEM_TYPE_CHECK);
 
242
  g_assert_cmpint(quicklist->GetNthType(0), == , unity::MENUITEM_TYPE_LABEL);
 
243
  g_assert_cmpint(quicklist->GetNthType(1), == , unity::MENUITEM_TYPE_SEPARATOR);
 
244
  g_assert_cmpint(quicklist->GetNthType(2), == , unity::MENUITEM_TYPE_LABEL);
 
245
  g_assert_cmpint(quicklist->GetNthType(3), == , unity::MENUITEM_TYPE_CHECK);
239
246
 
240
247
  g_assert_cmpstr(quicklist->GetNthItems(0)->GetLabel(), == , "label 0");
241
248
  g_assert_cmpstr(quicklist->GetNthItems(2)->GetLabel(), == , "label 1");
242
249
  g_assert_cmpstr(quicklist->GetNthItems(3)->GetLabel(), == , "check mark 0");
243
250
 
 
251
  g_assert_cmpint(quicklist->GetChildren().size(), == , 4);
244
252
 
245
253
  quicklist->Dispose();
246
254
}