feedback_deinitialize();
}
+static void test_get_count_of_sound_theme_internal(void)
+{
+ unsigned int count_of_theme = 0;
+
+ RESULT(feedback_get_count_of_theme_internal(FEEDBACK_TYPE_SOUND, &count_of_theme),
+ FEEDBACK_ERROR_NOT_INITIALIZED, "not initialized");
+
+ feedback_initialize();
+ RESULT(feedback_get_count_of_theme_internal(FEEDBACK_TYPE_SOUND, NULL),
+ FEEDBACK_ERROR_INVALID_PARAMETER, "invalid parameter");
+ RESULT(feedback_get_count_of_theme_internal(FEEDBACK_TYPE_VIBRATION, &count_of_theme),
+ FEEDBACK_ERROR_NOT_SUPPORTED, "not supported");
+ RESULT(feedback_get_count_of_theme_internal(FEEDBACK_TYPE_SOUND, &count_of_theme),
+ FEEDBACK_ERROR_NONE, "error none");
+ _D("Feedback type=%d count of theme=%d is get", FEEDBACK_TYPE_SOUND, count_of_theme);
+ feedback_deinitialize();
+}
+
+bool TEST_FEEDBACK_GET_COUNT_OF_SOUND_THEME_INTERNAL(void)
+{
+ INIT();
+ test_get_count_of_sound_theme_internal();
+ REPORT_AND_RETURN();
+}
+
+static void test_get_sound_theme_index_internal(void)
+{
+ unsigned int index_of_theme = 0;
+
+ feedback_initialize();
+ RESULT(feedback_get_theme_index_internal(FEEDBACK_TYPE_SOUND, NULL),
+ FEEDBACK_ERROR_INVALID_PARAMETER, "invalid parameter");
+ RESULT(feedback_get_theme_index_internal(FEEDBACK_TYPE_VIBRATION, &index_of_theme),
+ FEEDBACK_ERROR_NOT_SUPPORTED, "not supported");
+ RESULT(feedback_get_theme_index_internal(FEEDBACK_TYPE_SOUND, &index_of_theme),
+ FEEDBACK_ERROR_NONE, "error none");
+ _D("Feedback type=%d sound theme index=%d is get", FEEDBACK_TYPE_SOUND, index_of_theme);
+ feedback_deinitialize();
+}
+
+bool TEST_FEEDBACK_GET_SOUND_THEME_INDEX_INTERNAL(void)
+{
+ INIT();
+ test_get_sound_theme_index_internal();
+ REPORT_AND_RETURN();
+}
+
+static void test_set_sound_theme_index_internal(void)
+{
+ unsigned int count_of_theme = 0;
+ unsigned int index = 0;
+
+ feedback_initialize();
+ feedback_get_count_of_theme_internal(FEEDBACK_TYPE_SOUND, &count_of_theme);
+
+ RESULT(feedback_set_theme_index_internal(FEEDBACK_TYPE_SOUND, count_of_theme + 1),
+ FEEDBACK_ERROR_OPERATION_FAILED, "operation failed");
+
+ RESULT(feedback_set_theme_index_internal(FEEDBACK_TYPE_VIBRATION, index),
+ FEEDBACK_ERROR_NOT_SUPPORTED, "not supported");
+ if (count_of_theme > index) {
+ for (int index = 1; index <= count_of_theme; index++) {
+ RESULT(feedback_set_theme_index_internal(FEEDBACK_TYPE_SOUND, index),
+ FEEDBACK_ERROR_NONE, "error none");
+ test_play_type_by_name_p();
+ _D("Feedback type=%d sound theme index=%d is set", FEEDBACK_TYPE_SOUND, index);
+ }
+ } else if (count_of_theme == 0) {
+ RESULT(feedback_set_theme_index_internal(FEEDBACK_TYPE_SOUND, index),
+ FEEDBACK_ERROR_NONE, "error none");
+ test_play_type_by_name_p();
+ _D("Feedback type=%d sound theme index=%d is set", FEEDBACK_TYPE_SOUND, index);
+ }
+ feedback_deinitialize();
+}
+
+bool TEST_FEEDBACK_SET_SOUND_THEME_INDEX_INTERNAL(void)
+{
+ INIT();
+ test_set_sound_theme_index_internal();
+ REPORT_AND_RETURN();
+}
+
void TEST_INTERNAL_INIT()
{
init_supported_pattern(FEEDBACK_TYPE_SOUND, pattern_s);