add TC
authorHaejeong Kim <backto.kim@samsung.com>
Fri, 10 Feb 2012 01:53:13 +0000 (10:53 +0900)
committerHaejeong Kim <backto.kim@samsung.com>
Fri, 10 Feb 2012 01:53:13 +0000 (10:53 +0900)
TC/utc/audio/utc_audio_svc_create_table_func.c [new file with mode: 0755]

diff --git a/TC/utc/audio/utc_audio_svc_create_table_func.c b/TC/utc/audio/utc_audio_svc_create_table_func.c
new file mode 100755 (executable)
index 0000000..11bfdf8
--- /dev/null
@@ -0,0 +1,84 @@
+/*\r
+ * libmedia-service\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: Hyunjun Ko <zzoon.ko@samsung.com>, Haejeong Kim <backto.kim@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+\r
+/**\r
+* @file        utc_audio_svc_create_table_func.c\r
+* @brief       This is a suit of unit test cases to test audio_svc_create_table API function\r
+* @author              \r
+* @version     Initial Creation Version 0.1\r
+* @date        2010-09-13\r
+*/\r
+\r
+#include "utc_audio_svc_create_table_func.h"\r
+\r
+void startup()\r
+{\r
+       UTC_AUDIO_SVC_OPEN();\r
+}\r
+\r
+\r
+void cleanup()\r
+{\r
+       UTC_AUDIO_SVC_CLOSE();\r
+}\r
+\r
+/**\r
+* @brief       This tests int audio_svc_create_table() API with valid parameter\r
+*              Create a player handle with valid parameter & Test the handle by playing\r
+* @par ID      utc_audio_svc_create_table_func_01\r
+* @param       [in] &player = handle of player to be populated\r
+* @return      This function returns zero on success, or negative value with error code\r
+*/\r
+void utc_audio_svc_create_table_func_01()\r
+{\r
+       int ret = AUDIO_SVC_ERROR_NONE;\r
+       \r
+       ret = audio_svc_create_table(db_handle);\r
+       dts_check_eq("audio_svc_create_table", ret, AUDIO_SVC_ERROR_NONE, "unable to create music phone table.");\r
+\r
+}\r
+\r
+#if 0\r
+/**\r
+* @brief       This tests int audio_svc_create_table() API with invalid parameter\r
+*              Create a player handle with a NULL out param\r
+* @par ID      utc_audio_svc_create_table_func_02\r
+* @param       [in] &player = NULL\r
+* @return      error code on success \r
+*/\r
+void utc_audio_svc_create_table_func_02()\r
+{      \r
+       int ret = AUDIO_SVC_ERROR_NONE;\r
+       \r
+       ret = audio_svc_create_table();\r
+       \r
+       if (ret !=  AUDIO_SVC_ERROR_NONE)\r
+       {\r
+               dts_pass("audio_svc_create_table","abnormal condition test for invalid storage type parameter.");\r
+       }\r
+       else\r
+       {\r
+               dts_fail("audio_svc_create_table","create music table should be failed because of the invalid storage type.");\r
+       }\r
+\r
+}\r
+#endif\r