| /*! |
| * @file sys_test.h |
| * @author TJ Chang <tj.chang@mediatek.com> |
| * @version 1.0 |
| * @section LICENSE |
| * |
| * This software is protected by Copyright and the information contained |
| * herein is confidential. The software may not be copied and the information |
| * contained herein may not be used or disclosed except with the written |
| * permission of MediaTek Inc. (C) 2005 |
| * |
| * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES |
| * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") |
| * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON |
| * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, |
| * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF |
| * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. |
| * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE |
| * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR |
| * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH |
| * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO |
| * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S |
| * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. |
| * |
| * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE |
| * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, |
| * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, |
| * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO |
| * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. |
| * |
| * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE |
| * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF |
| * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND |
| * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER |
| * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). |
| * |
| * @section DESCRIPTION |
| * |
| */ |
| #ifndef _SYS_TEST_H |
| #define _SYS_TEST_H |
| |
| #include "kal_general_types.h" |
| |
| |
| // ========================================================== |
| // Data Structure Definition |
| // ========================================================== |
| /*! |
| * struct _ST_TCASE_T |
| * |
| * @brief register information of a test module. |
| * |
| * @param p_param the parameter of test function. |
| * @param p_ret_err_str returned string of error description. |
| * This string buffer is allocated by caller (sys_test) module, |
| * and the callee module fills in error description in this buffer. |
| * |
| * @param p_ret_err_str_sz The caller (sys_test) module use this parameter to define the max size of error string buffer, |
| * and the callee module fills in the actual size of error string buffer when returning. |
| * Note: The callee module CAN NOT fill into 'p_ret_err_str' with exceeding size limit. |
| */ |
| typedef kal_bool (*st_fn)(void *p_param, kal_char *p_ret_err_str, kal_uint32 *p_ret_err_str_sz); |
| typedef struct _ST_TCASE_T { |
| kal_char *test_func_name; /* string description of test function */ |
| st_fn test_func; /* entry point of test function */ |
| void *test_param; /* parameter of test function */ |
| } ST_TCASE_T; |
| |
| |
| // ========================================================== |
| // SYS_TEST API |
| // ========================================================== |
| /*! |
| * st_reg_test |
| * |
| * @brief register test function to SYS_TEST module. |
| * |
| * @param p_mod_name test module naming. |
| * @param p_tcase test function information used to register. |
| * @param tcase_num number of test function struct. |
| * |
| * @return kal_bool KAL_TRUE if success, otherwise KAL_FALSE if fail. |
| */ |
| kal_bool st_reg_test(kal_char *p_mod_name, ST_TCASE_T *p_tcase, kal_uint32 tcase_num); |
| |
| |
| #endif /* _SYS_TEST_H */ |
| |