diff options
author | Ted Gould <ted@gould.cx> | 2014-03-03 11:11:32 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2014-03-03 11:11:32 -0600 |
commit | cc8600927594dcdfcba74813788d90c999156468 (patch) | |
tree | 6883553012005d380deb43f899d3cc0214b1aad5 /tests | |
parent | 248a67022dcfb0cc2540720007ee122fbc3eb6ea (diff) | |
download | ayatana-indicator-sound-cc8600927594dcdfcba74813788d90c999156468.tar.gz ayatana-indicator-sound-cc8600927594dcdfcba74813788d90c999156468.tar.bz2 ayatana-indicator-sound-cc8600927594dcdfcba74813788d90c999156468.zip |
Test the number of entries in the menu
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sound-menu-test.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/sound-menu-test.cc b/tests/sound-menu-test.cc index 4d28c4a..5d18d08 100644 --- a/tests/sound-menu-test.cc +++ b/tests/sound-menu-test.cc @@ -44,6 +44,8 @@ class SoundMenuTest : public ::testing::Test TEST_F(SoundMenuTest, BasicObject) { SoundMenu * menu = sound_menu_new (nullptr, SOUND_MENU_DISPLAY_FLAGS_NONE); + ASSERT_NE(nullptr, menu); + g_clear_object(&menu); return; } @@ -67,11 +69,12 @@ TEST_F(SoundMenuTest, AddRemovePlayer) { sound_menu_add_player(menu, MEDIA_PLAYER(media)); - /* TODO: Verify */ + ASSERT_NE(nullptr, menu->menu); + EXPECT_EQ(2, g_menu_model_get_n_items(G_MENU_MODEL(menu->menu))); sound_menu_remove_player(menu, MEDIA_PLAYER(media)); - /* TODO: Verify */ + EXPECT_EQ(1, g_menu_model_get_n_items(G_MENU_MODEL(menu->menu))); g_clear_object(&media); g_clear_object(&menu); |