diff options
| author | Brandon Schaefer <brandontschaefer@gmail.com> | 2012-07-10 16:28:01 -0700 |
|---|---|---|
| committer | Brandon Schaefer <brandontschaefer@gmail.com> | 2012-07-10 16:28:01 -0700 |
| commit | c93e5edb814a864400f45b2baf0f6e47f309c508 (patch) | |
| tree | 84db095f5dded6cc2ce832015d42d39cb14611fe /tests | |
| parent | 064be635cfb2e187d4c14ffe1ccacafc2cd226c5 (diff) | |
* Adds a gtest
(bzr r2487.2.2)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | tests/data/no-icon.desktop | 7 | ||||
| -rw-r--r-- | tests/test_bamflaunchericon.cpp | 13 |
3 files changed, 22 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0cea996e3..347f99312 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -11,6 +11,8 @@ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/data/update-manager.desktop ${CMAKE_BINARY_DIR}/tests/data/update-manager.desktop) configure_file (${CMAKE_CURRENT_SOURCE_DIR}/data/bzr-handle-patch.desktop ${CMAKE_BINARY_DIR}/tests/data/bzr-handle-patch.desktop) +configure_file (${CMAKE_CURRENT_SOURCE_DIR}/data/no-icon.desktop + ${CMAKE_BINARY_DIR}/tests/data/no-icon.desktop) # # Unit tests # diff --git a/tests/data/no-icon.desktop b/tests/data/no-icon.desktop new file mode 100644 index 000000000..4f2902fe2 --- /dev/null +++ b/tests/data/no-icon.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Default +Comment=Interactive viewer for a Default icon! +Exec=gedit +Terminal=false +Type=Application +Categories=GTK;Science;Graphics; diff --git a/tests/test_bamflaunchericon.cpp b/tests/test_bamflaunchericon.cpp index 9719e9a5f..f896ac6c4 100644 --- a/tests/test_bamflaunchericon.cpp +++ b/tests/test_bamflaunchericon.cpp @@ -62,4 +62,17 @@ TEST_F(TestBamfLauncherIcon, TestCustomBackgroundColor) EXPECT_EQ(color.alpha, 0xff / 255.0f); } +TEST_F(TestBamfLauncherIcon, TestDefaultIcon) +{ + BamfApplication* bamf_app_d; + bamf_app_d = bamf_matcher_get_application_for_desktop_file(bamf_matcher, + BUILDDIR"/tests/data/no-icon.desktop", + TRUE); + + + nux::ObjectPtr<launcher::BamfLauncherIcon> default_icon; + default_icon = new launcher::BamfLauncherIcon(bamf_app_d); + + EXPECT_EQ(default_icon->icon_name.Get(), "application-default-icon"); +} } |
