2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
\r
4 * Licensed under the Apache License, Version 2.0 (the License);
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an AS IS BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
17 #include <tet_api.h>
\r
18 #include <download.h>
\r
20 static void startup(void);
\r
21 static void cleanup(void);
\r
23 void (*tet_startup)(void) = startup;
\r
24 void (*tet_cleanup)(void) = cleanup;
\r
26 static void utc_download_get_file_name_negative1(void);
\r
27 static void utc_download_get_file_name_negative2(void);
\r
29 struct tet_testlist tet_testlist[] = {
\r
30 {utc_download_get_file_name_negative1, 1},
\r
31 {utc_download_get_file_name_negative2, 2},
\r
35 static void startup(void)
\r
40 static void cleanup(void)
\r
45 void utc_download_get_file_name_negative1(void)
\r
47 const char *TC_NAME = __FUNCTION__;
\r
49 char *file_name = NULL;
\r
51 retcode = download_get_file_name(-1,&file_name);
\r
53 if (retcode == DOWNLOAD_ERROR_INVALID_PARAMETER)
\r
54 dts_pass(TC_NAME, "retcode has invalid parameter");
\r
56 dts_fail(TC_NAME, "retcode does not have invalid parameter");
\r
59 void utc_download_get_file_name_negative2(void)
\r
61 const char *TC_NAME = __FUNCTION__;
\r
65 download_create(&id);
\r
66 retcode = download_get_file_name(id, NULL);
\r
67 download_destroy(id);
\r
69 if (retcode == DOWNLOAD_ERROR_INVALID_PARAMETER)
\r
70 dts_pass(TC_NAME, "retcode has invalid parameter");
\r
72 dts_fail(TC_NAME, "retcode does not have invalid parameter");
\r