Add unit test case for problem fixed in fcf4f610a68

This commit is contained in:
Martin Gräßlin 2013-01-09 14:22:49 +01:00
parent 508eaf9f4e
commit 134e42b05c

View file

@ -287,6 +287,7 @@ void TestVirtualDesktops::testDirection(const QString &actionName)
vds->initShortcuts(keys.data()); vds->initShortcuts(keys.data());
QAction *action = keys->action(actionName); QAction *action = keys->action(actionName);
QVERIFY(action); QVERIFY(action);
QVERIFY(static_cast<KAction*>(action)->isGlobalShortcutEnabled());
action->trigger(); action->trigger();
QCOMPARE(vds->current(), result); QCOMPARE(vds->current(), result);
QCOMPARE(functor(initCurrent, wrap), result); QCOMPARE(functor(initCurrent, wrap), result);
@ -571,6 +572,7 @@ void TestVirtualDesktops::switchToShortcuts()
const QString desktop(toDesktop.arg(i)); const QString desktop(toDesktop.arg(i));
QAction *action = keys->action(desktop); QAction *action = keys->action(desktop);
QVERIFY2(action, desktop.toUtf8().constData()); QVERIFY2(action, desktop.toUtf8().constData());
QVERIFY(static_cast<KAction*>(action)->isGlobalShortcutEnabled());
action->trigger(); action->trigger();
QCOMPARE(vds->current(), i); QCOMPARE(vds->current(), i);
} }