~unity-team/unity/trunk

« back to all changes in this revision

Viewing changes to tests/test_im_text_entry_slow.cpp

  • Committer: Tarmac
  • Author(s): Brandon Schaefer
  • Date: 2013-03-19 20:34:17 UTC
  • mfrom: (3225.2.1 unity)
  • Revision ID: tarmac-20130319203417-yh60syepnv1iko3h
New test suite, test-gtest-slow for tests that are slow, now test-gtest runs at about ~30 seconds which is a huge improvement. Fixes: https://bugs.launchpad.net/bugs/1053163.

Approved by PS Jenkins bot, Marco Trevisan (Treviño).

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
}