tizen 2.3 release
[framework/api/url-download.git] / TC / testcase / utc_download_set_auto_download_negative.c
1 /*\r
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved\r
3  *\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
7  *\r
8  * http://www.apache.org/licenses/LICENSE-2.0\r
9  *\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
15  */\r
16 \r
17 #include <tet_api.h>\r
18 #include <download.h>\r
19 \r
20 static void startup(void);\r
21 static void cleanup(void);\r
22 \r
23 void (*tet_startup)(void) = startup;\r
24 void (*tet_cleanup)(void) = cleanup;\r
25 \r
26 static void utc_download_set_auto_download_negative1(void);\r
27 \r
28 struct tet_testlist tet_testlist[] = {\r
29         {utc_download_set_auto_download_negative1, 1},\r
30         {NULL, 0},\r
31 };\r
32 \r
33 static void startup(void)\r
34 {\r
35 \r
36 }\r
37 \r
38 static void cleanup(void)\r
39 {\r
40         /* end of TC */\r
41 }\r
42 \r
43 void utc_download_set_auto_download_negative1(void)\r
44 {\r
45         const char *TC_NAME = __FUNCTION__;\r
46         int retcode = 0;\r
47         bool enable = false;\r
48 \r
49         retcode = download_set_auto_download(-1,enable );\r
50 \r
51         if (retcode != DOWNLOAD_ERROR_NONE)\r
52                 dts_pass(TC_NAME, "retcode has invalid parameter");\r
53         else\r
54                 dts_fail(TC_NAME, "retcode does not have invalid parameter");\r
55 }\r
56 \r