diff options
author | Ted Gould <ted@gould.cx> | 2014-03-25 08:52:31 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2014-03-25 08:52:31 -0500 |
commit | da388be5f313d0517a730bda29104c10ad326716 (patch) | |
tree | 541ed5bced75c9d464de48e84ab1b7b99fe24ab3 /tests | |
parent | ff7c955f16c4692d2071d9b0ad902af4719468f8 (diff) | |
download | ayatana-indicator-sound-da388be5f313d0517a730bda29104c10ad326716.tar.gz ayatana-indicator-sound-da388be5f313d0517a730bda29104c10ad326716.tar.bz2 ayatana-indicator-sound-da388be5f313d0517a730bda29104c10ad326716.zip |
Adding an iterator test (that fails)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 3 | ||||
-rw-r--r-- | tests/greeter-list.cc | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d5bb82a..ae68c45 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -177,4 +177,7 @@ target_link_libraries ( add_test(greeter-list-test-basic greeter-list-test --gtest_filter=GreeterListTest.BasicObject ) +add_test(greeter-list-test-iterator + greeter-list-test --gtest_filter=GreeterListTest.BasicIterator +) diff --git a/tests/greeter-list.cc b/tests/greeter-list.cc index f8e2204..2c4fd61 100644 --- a/tests/greeter-list.cc +++ b/tests/greeter-list.cc @@ -51,3 +51,18 @@ TEST_F(GreeterListTest, BasicObject) { return; } +TEST_F(GreeterListTest, BasicIterator) { + MediaPlayerListGreeter * list = media_player_list_greeter_new(); + ASSERT_NE(nullptr, list); + + MediaPlayerListGreeterIterator * iter = media_player_list_greeter_iterator_new(list); + ASSERT_NE(nullptr, iter); + + MediaPlayer * player = media_player_list_iterator_next_value (MEDIA_PLAYER_LIST_ITERATOR(iter)); + ASSERT_EQ(nullptr, player); + + g_clear_object(&iter); + g_clear_object(&list); + return; +} + |