Revision f3ac1c96 core/inc/aos_unittest.h
| core/inc/aos_unittest.h | ||
|---|---|---|
| 31 | 31 | 
    #if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)  | 
| 32 | 32 | 
    #include <hal.h>  | 
| 33 | 33 | 
    #include <aos_shell.h>  | 
| 34 | 
    /******************************************************************************/  | 
|
| 35 | 
    /* CONSTANTS */  | 
|
| 36 | 
    /******************************************************************************/  | 
|
| 37 | 
     | 
|
| 38 | 
    /******************************************************************************/  | 
|
| 39 | 
    /* SETTINGS */  | 
|
| 40 | 
    /******************************************************************************/  | 
|
| 41 | 
     | 
|
| 42 | 
    /******************************************************************************/  | 
|
| 43 | 
    /* CHECKS */  | 
|
| 44 | 
    /******************************************************************************/  | 
|
| 45 | 
     | 
|
| 46 | 
    /******************************************************************************/  | 
|
| 47 | 
    /* DATA STRUCTURES AND TYPES */  | 
|
| 48 | 
    /******************************************************************************/  | 
|
| 34 | 49 | 
     | 
| 35 | 50 | 
    /*  | 
| 36 | 
     * Forward declarations.
   | 
|
| 51 | 
     * forward declarations
   | 
|
| 37 | 52 | 
    */  | 
| 38 | 
    typedef struct aos_unittest aos_unittest_t;  | 
|
| 39 | 53 | 
    typedef struct aos_utresult aos_utresult_t;  | 
| 54 | 
    typedef struct aos_unittest aos_unittest_t;  | 
|
| 40 | 55 | 
     | 
| 41 | 56 | 
    /**  | 
| 42 | 57 | 
    * @brief Unit test interface function definition.  | 
| ... | ... | |
| 46 | 61 | 
    *  | 
| 47 | 62 | 
    * @return A result containing the number of passed and failed tests.  | 
| 48 | 63 | 
    */  | 
| 49 | 
    typedef aos_utresult_t (*aos_utfunction_t)(BaseSequentialStream* stream, aos_unittest_t* ut);
   | 
|
| 64 | 
    typedef aos_utresult_t (*aos_utfunction_t)(BaseSequentialStream*, aos_unittest_t*);
   | 
|
| 50 | 65 | 
     | 
| 51 | 66 | 
    /**  | 
| 52 | 67 | 
    * @brief Unit test result struct.  | 
| ... | ... | |
| 93 | 108 | 
    void* data;  | 
| 94 | 109 | 
    };  | 
| 95 | 110 | 
     | 
| 111 | 
     | 
|
| 112 | 
    /******************************************************************************/  | 
|
| 113 | 
    /* MACROS */  | 
|
| 114 | 
    /******************************************************************************/  | 
|
| 115 | 
     | 
|
| 116 | 
    /******************************************************************************/  | 
|
| 117 | 
    /* EXTERN DECLARATIONS */  | 
|
| 118 | 
    /******************************************************************************/  | 
|
| 119 | 
     | 
|
| 96 | 120 | 
    #ifdef __cplusplus  | 
| 97 | 121 | 
    extern "C" {
   | 
| 98 | 122 | 
    #endif  | 
| ... | ... | |
| 110 | 134 | 
    }  | 
| 111 | 135 | 
    #endif  | 
| 112 | 136 | 
     | 
| 137 | 
    /******************************************************************************/  | 
|
| 138 | 
    /* INLINE FUNCTIONS */  | 
|
| 139 | 
    /******************************************************************************/  | 
|
| 140 | 
     | 
|
| 113 | 141 | 
    #endif /* AMIROOS_CFG_TESTS_ENABLE == true */  | 
| 114 | 142 | 
     | 
| 115 | 143 | 
    #endif /* AMIROOS_UNITTEST_H */  | 
Also available in: Unified diff