summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYunhee Seo <yuni.seo@samsung.com>2023-12-19 17:43:41 +0900
committerYunhee Seo <yuni.seo@samsung.com>2023-12-26 13:15:36 +0900
commit2b524b10a718e8b55c33bfc4d64e8cefa7734699 (patch)
tree72ff78a27f34c7d279c2970f7bf69e3689b41c99 /tests
parent39bd53c9b2899f4fe5c5ea197cc62fd939806939 (diff)
downloadlibsvi-2b524b10a718e8b55c33bfc4d64e8cefa7734699.tar.gz
libsvi-2b524b10a718e8b55c33bfc4d64e8cefa7734699.tar.bz2
libsvi-2b524b10a718e8b55c33bfc4d64e8cefa7734699.zip
feedback: Add feedback_put_theme_ids_internal()
This function is added to feedback. - int feedback_put_theme_ids_internal(unsigned int **theme_ids); - This function free the array of theme ids from feedback_get_theme_ids_internal(). After use the array of theme id, it should be freed by caller. Also, it is possible for the user to release the array directly. Change-Id: I7d2f2a4456d9e6662c59e3360a1eb0a5490ed6b1 Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/main.c1
-rw-r--r--tests/test-feedback-internal.c24
-rw-r--r--tests/test-feedback-internal.h1
3 files changed, 26 insertions, 0 deletions
diff --git a/tests/main.c b/tests/main.c
index 46586f5..0fbdff3 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -31,6 +31,7 @@ void test_all()
LOG_RESULT(TEST_FEEDBACK_GET_SOUND_THEME_ID_INTERNAL(), "TEST_FEEDBACK_GET_SOUND_THEME_ID_INTERNAL");
LOG_RESULT(TEST_FEEDBACK_SET_SOUND_THEME_ID_INTERNAL(), "TEST_FEEDBACK_SET_SOUND_THEME_ID_INTERNAL");
LOG_RESULT(TEST_FEEDBACK_GET_SOUND_THEME_IDS_INTERNAL(), "TEST_FEEDBACK_GET_SOUND_THEME_IDS_INTERNAL");
+ LOG_RESULT(TEST_FEEDBACK_PUT_SOUND_THEME_IDS_INTERNAL(), "TEST_FEEDBACK_PUT_SOUND_THEME_IDS_INTERNAL");
LOG_RESULT(TEST_FEEDBACK_PLAY_TYPE_WITH_FLAGS_INTERNAL(), "TEST_FEEDBACK_PLAY_TYPE_WITH_FLAGS_INTERNAL");
}
diff --git a/tests/test-feedback-internal.c b/tests/test-feedback-internal.c
index 5447c83..d9fff2a 100644
--- a/tests/test-feedback-internal.c
+++ b/tests/test-feedback-internal.c
@@ -441,6 +441,30 @@ bool TEST_FEEDBACK_GET_SOUND_THEME_IDS_INTERNAL(void)
REPORT_AND_RETURN();
}
+static void test_put_sound_theme_ids_internal(void)
+{
+ unsigned int count_of_theme = 0;
+ unsigned int *sound_theme_ids = NULL;
+
+ feedback_initialize();
+ RESULT(feedback_put_theme_ids_internal(&sound_theme_ids),
+ FEEDBACK_ERROR_INVALID_PARAMETER, "invalid parameter");
+ RESULT(feedback_put_theme_ids_internal(NULL),
+ FEEDBACK_ERROR_INVALID_PARAMETER, "invalid parameter");
+
+ feedback_get_theme_ids_internal(FEEDBACK_TYPE_SOUND, &count_of_theme, &sound_theme_ids);
+ RESULT(feedback_put_theme_ids_internal(&sound_theme_ids),
+ FEEDBACK_ERROR_NONE, "error none");
+ feedback_deinitialize();
+}
+
+bool TEST_FEEDBACK_PUT_SOUND_THEME_IDS_INTERNAL(void)
+{
+ INIT();
+ test_put_sound_theme_ids_internal();
+ REPORT_AND_RETURN();
+}
+
static void test_feedback_play_type_with_flags_internal(void)
{
feedback_initialize();
diff --git a/tests/test-feedback-internal.h b/tests/test-feedback-internal.h
index 1b93d8e..23b6a02 100644
--- a/tests/test-feedback-internal.h
+++ b/tests/test-feedback-internal.h
@@ -124,6 +124,7 @@ bool TEST_FEEDBACK_GET_COUNT_OF_SOUND_THEME_INTERNAL(void);
bool TEST_FEEDBACK_GET_SOUND_THEME_ID_INTERNAL(void);
bool TEST_FEEDBACK_SET_SOUND_THEME_ID_INTERNAL(void);
bool TEST_FEEDBACK_GET_SOUND_THEME_IDS_INTERNAL(void);
+bool TEST_FEEDBACK_PUT_SOUND_THEME_IDS_INTERNAL(void);
bool TEST_FEEDBACK_PLAY_TYPE_WITH_FLAGS_INTERNAL(void);
void TEST_INTERNAL_INIT(void);