~azzar1/unity/fix-1172769

« back to all changes in this revision

Viewing changes to tests/test_im_text_entry_slow.cpp

  • Committer: Tarmac
  • Author(s): Marco Trevisan (Treviño)
  • Date: 2013-09-27 14:20:32 UTC
  • mfrom: (3536.3.3 trunk)
  • Revision ID: tarmac-20130927142032-grmj0aahddz0c6om
TestIMTextEntry: fix failing tests with IBus, use TEST_F and TEST_P.

Approved by PS Jenkins bot, Brandon Schaefer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright 2012-2013 Canonical Ltd.
3
 
 *
4
 
 * This program is free software: you can redistribute it and/or modify it
5
 
 * under the terms of the GNU Lesser General Public License version 3, as
6
 
 * published by the  Free Software Foundation.
7
 
 *
8
 
 * This program is distributed in the hope that it will be useful, but
9
 
 * WITHOUT ANY WARRANTY; without even the implied warranties of
10
 
 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
11
 
 * PURPOSE.  See the applicable version of the GNU Lesser General Public
12
 
 * License for more details.
13
 
 *
14
 
 * You should have received a copy of both the GNU Lesser General Public
15
 
 * License version 3 along with this program.  If not, see
16
 
 * <http://www.gnu.org/licenses/>
17
 
 *
18
 
 * Authored by: Marco Trevisan (Treviño) <3v1n0@ubuntu.com>
19
 
 *
20
 
 */
21
 
 
22
 
#include "test_im_text_entry.h"
23
 
 
24
 
using namespace nux;
25
 
 
26
 
TEST(TestIMTextEntry, AltKeybindings)
27
 
{
28
 
  MockTextEntry text_entry;
29
 
 
30
 
  for (unsigned long keysym = 0; keysym < XK_VoidSymbol; ++keysym)
31
 
  {
32
 
    TestEvent event(KEY_MODIFIER_ALT, keysym);
33
 
    EXPECT_FALSE(text_entry.InspectKeyEvent(event));
34
 
  }
35
 
}
36
 
 
37
 
TEST(TestIMTextEntry, SuperKeybindings)
38
 
{
39
 
  MockTextEntry text_entry;
40
 
 
41
 
  for (unsigned long keysym = 0; keysym < XK_VoidSymbol; ++keysym)
42
 
  {
43
 
    TestEvent event(KEY_MODIFIER_SUPER, keysym);
44
 
    EXPECT_FALSE(text_entry.InspectKeyEvent(event));
45
 
  }
46
 
}