3 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * PROPRIETARY/CONFIDENTIAL
6 * This software is the confidential and proprietary information of SAMSUNG
7 * ELECTRONICS ("Confidential Information"). You agree and acknowledge that
8 * this software is owned by Samsung and you shall not disclose such
9 * Confidential Information and shall use it only in accordance with the terms
10 * of the license agreement you entered into with SAMSUNG ELECTRONICS. SAMSUNG
11 * make no representations or warranties about the suitability of the software,
12 * either express or implied, including but not limited to the implied
13 * warranties of merchantability, fitness for a particular purpose, or
14 * non-infringement. SAMSUNG shall not be liable for any damages suffered by
15 * licensee arising out of or related to this software.
19 #include <dd-control.h>
21 #define API_NAME_DEVICED_MMC_CONTROL "deviced_mmc_control"
22 #define API_NAME_DEVICED_USB_CONTROL "deviced_usb_control"
23 #define API_NAME_DEVICED_GET_USB_CONTROL "deviced_get_usb_control"
24 #define API_NAME_DEVICED_RGBLED_CONTROL "deviced_rgbled_control"
26 static void startup(void);
27 static void cleanup(void);
29 void (*tet_startup)(void) = startup;
30 void (*tet_cleanup)(void) = cleanup;
33 static void utc_system_deviced_deviced_mmc_control_p_1(void);
34 static void utc_system_deviced_deviced_mmc_control_p_2(void);
35 static void utc_system_deviced_deviced_usb_control_p_1(void);
36 static void utc_system_deviced_deviced_usb_control_p_2(void);
37 static void utc_system_deviced_deviced_get_usb_control_p(void);
38 static void utc_system_deviced_deviced_rgbled_control_p_1(void);
39 static void utc_system_deviced_deviced_rgbled_control_p_2(void);
40 static void utc_system_deviced_deviced_rgbled_control_n(void);
43 POSITIVE_TC_IDX = 0x01,
47 struct tet_testlist tet_testlist[] = {
48 { utc_system_deviced_deviced_mmc_control_p_1, POSITIVE_TC_IDX },
49 { utc_system_deviced_deviced_mmc_control_p_2, POSITIVE_TC_IDX },
50 // { utc_system_deviced_deviced_usb_control_p_1, POSITIVE_TC_IDX },
51 // { utc_system_deviced_deviced_usb_control_p_2, POSITIVE_TC_IDX },
52 { utc_system_deviced_deviced_get_usb_control_p, POSITIVE_TC_IDX },
53 { utc_system_deviced_deviced_rgbled_control_p_1, POSITIVE_TC_IDX },
54 { utc_system_deviced_deviced_rgbled_control_p_2, POSITIVE_TC_IDX },
58 static void startup(void)
62 static void cleanup(void)
67 * @brief Positive test case of deviced_mmc_control()
69 static void utc_system_deviced_deviced_mmc_control_p_1(void)
73 ret = deviced_mmc_control(false);
74 dts_check_eq(API_NAME_DEVICED_MMC_CONTROL, ret, 0, "Disable MMC");
78 * @brief Positive test case of deviced_mmc_control()
80 static void utc_system_deviced_deviced_mmc_control_p_2(void)
84 ret = deviced_mmc_control(true);
85 dts_check_eq(API_NAME_DEVICED_MMC_CONTROL, ret, 0, "Enable MMC");
89 * @brief Positive test case of deviced_usb_control()
91 static void utc_system_deviced_deviced_usb_control_p_1(void)
95 ret = deviced_usb_control(false);
96 dts_check_eq(API_NAME_DEVICED_USB_CONTROL, ret, 0, "Disable USB");
100 * @brief Positive test case of deviced_usb_control()
102 static void utc_system_deviced_deviced_usb_control_p_2(void)
106 ret = deviced_usb_control(true);
107 dts_check_eq(API_NAME_DEVICED_USB_CONTROL, ret, 0, "Enable USB");
111 * @brief Positive test case of deviced_get_usb_control()
113 static void utc_system_deviced_deviced_get_usb_control_p(void)
117 ret = deviced_get_usb_control();
118 dts_check_ge(API_NAME_DEVICED_GET_USB_CONTROL, ret, 0);
122 * @brief Positive test case of deviced_rgbled_control()
124 static void utc_system_deviced_deviced_rgbled_control_p_1(void)
128 ret = deviced_rgbled_control(false);
129 dts_check_eq(API_NAME_DEVICED_RGBLED_CONTROL, ret, 0, "Disable RGB led");
133 * @brief Positive test case of deviced_rgbled_control()
135 static void utc_system_deviced_deviced_rgbled_control_p_2(void)
139 ret = deviced_rgbled_control(true);
140 dts_check_eq(API_NAME_DEVICED_USB_CONTROL, ret, 0, "Enable RGB led");