~unity-team/nux/nux.redirected-views

« back to all changes in this revision

Viewing changes to tests/xtest-vlayout-key-navigation.cpp

  • Committer: Tarmac
  • Author(s): Michi Henning
  • Date: 2012-10-02 01:05:45 UTC
  • mfrom: (667.2.5 1056633)
  • Revision ID: tarmac-20121002010545-jphizk30nj3oe9ui
Added -Wextra to compiler flags and removed a large number of warnings about unused parameters. Code compiles clean now without warnings, except for one remaining warning (see bug #1052765).. Fixes: https://bugs.launchpad.net/bugs/1056633. Approved by Michi Henning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
 
92
92
VLayoutKeyNavigationTest* key_navigation_test = NULL;
93
93
 
94
 
void TestingThread(nux::NThread* thread, void* user_data)
 
94
void TestingThread(nux::NThread* /* thread */, void* user_data)
95
95
{
96
96
  while (key_navigation_test->ReadyToGo() == false)
97
97
  {
142
142
    test.SendFakeKeyEvent(XK_Up, 0);
143
143
    nux::SleepForMilliseconds(500);
144
144
    test.TestReportMsg(!key_navigation_test->views_[i]->has_focus_, "Up: key focus out");
145
 
    if ((i - 1) == ID_UNFOCUSABLE_VIEW)
 
145
    if ((i - 1) == (int)ID_UNFOCUSABLE_VIEW)
146
146
    {
147
147
      test.TestReportMsg(!key_navigation_test->views_[i-1]->has_focus_, "Up: key focus skipped");
148
148
      test.TestReportMsg(key_navigation_test->views_[i-2]->has_focus_, "Up: key focus in");
178
178
  nuxDebugMsg("Exit testing thread");
179
179
}
180
180
 
181
 
int main(int argc, char** argv)
 
181
int main()
182
182
{
183
 
  int xstatus = XInitThreads();
184
 
  nuxAssertMsg(xstatus > 0, "XInitThreads has failed");
 
183
  XInitThreads();
185
184
 
186
185
  key_navigation_test = new VLayoutKeyNavigationTest("Key navigation Test", 500, 400, 8000);
187
186
  key_navigation_test->Startup();