aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/CMakeLists.txt3
-rw-r--r--tests/greeter-list.cc15
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;
+}
+