Back to index

unity  6.0.0
test_unityshell_private.cpp
Go to the documentation of this file.
00001 /*
00002  * Copyright 2012 Canonical Ltd.
00003  *
00004  * This program is free software: you can redistribute it and/or modify it
00005  * under the terms of the GNU General Public License version 3, as published
00006  * by the  Free Software Foundation.
00007  *
00008  * This program is distributed in the hope that it will be useful, but
00009  * WITHOUT ANY WARRANTY; without even the implied warranties of
00010  * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
00011  * PURPOSE.  See the GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * version 3 along with this program.  If not, see
00015  * <http://www.gnu.org/licenses/>
00016  *
00017  * Authored by: Andrea Azzarone <azzaronea@gmail.com>
00018  *
00019  */
00020 
00021 #include <gtest/gtest.h>
00022  
00023 #include "UnityshellPrivate.h"
00024 
00025 using namespace unity;
00026 
00027 TEST(TestUnityshellPrivate, TestCreateActionString)
00028 {
00029   EXPECT_EQ(impl::CreateActionString("<Super>", 'a'), "<Super>a");
00030   EXPECT_EQ(impl::CreateActionString("<Super>", '1'), "<Super>1");
00031 
00032   EXPECT_EQ(impl::CreateActionString("<Alt>", 'a'), "<Alt>a");
00033   EXPECT_EQ(impl::CreateActionString("<Alt>", '1'), "<Alt>1");
00034   
00035   EXPECT_EQ(impl::CreateActionString("<Super>", '1', impl::ActionModifiers::USE_NUMPAD), "<Super>KP_1");
00036 
00037   EXPECT_EQ(impl::CreateActionString("<Super>", '1', impl::ActionModifiers::USE_SHIFT), "<Super><Shift>1");
00038 }
00039