]> begriffs open source - cmsis-driver-validation/blob - Include/DV_Report.h
Updated WiFi test example for STMicroelectonics B-L475E-IOT01A1 board (added test...
[cmsis-driver-validation] / Include / DV_Report.h
1 /*-----------------------------------------------------------------------------
2  *      Name:         DV_Report.h 
3  *      Purpose:      Report statistics and layout header
4  *----------------------------------------------------------------------------
5  *      Copyright(c) KEIL - An ARM Company
6  *----------------------------------------------------------------------------*/
7
8 #ifndef __CMSIS_DV_REPORT_H__
9 #define __CMSIS_DV_REPORT_H__
10
11 #include "DV_Config.h"
12 #include "DV_Typedefs.h"
13
14 /*-----------------------------------------------------------------------------
15  * Test report global definitions
16  *----------------------------------------------------------------------------*/
17  
18 /* Test case result definition */
19 typedef enum {
20   PASSED = 0,
21   FAILED,
22   NOT_EXECUTED
23 } TC_RES;
24
25 /* Test group statistics */
26 typedef struct {
27   uint32_t idx;                         /* Group index                        */
28   uint32_t tests;                       /* Total test cases count             */
29   uint32_t passed;                      /* Total test cases passed            */
30   uint32_t failed;                      /* Total test cases failed            */
31 } TEST_GROUP_RESULTS;
32
33 /* Test report interface */
34 typedef struct {
35   void (* tr_Init)  (void);
36   void (* tr_Uninit)(void);
37   void (* tg_Init)  (const char *title, const char *date, const char *time, const char *file);
38   void (* tg_Uninit)(void);
39   void (* tc_Init)  (uint32_t num, const char *fn);
40   void (* tc_Uninit)(void);
41   void (* tc_Detail)(const char *module, uint32_t line, const char *message);
42   void (* as_Result)(TC_RES res);
43 } REPORT_ITF;
44
45 /* Global structure for interfacing test report */
46 extern REPORT_ITF ritf;
47
48 /* Assertions and test results */
49 extern void __set_result (const char *module, uint32_t line, const char *message, TC_RES res);
50 extern void __set_message(const char *module, uint32_t line, const char *message);
51
52 #endif /* __CMSIS_DV_REPORT_H__ */