]> begriffs open source - cmsis-driver-validation/blob - Include/DV_Framework.h
Changes:
[cmsis-driver-validation] / Include / DV_Framework.h
1 /*-----------------------------------------------------------------------------
2  *      Name:         DV_Framework.h 
3  *      Purpose:      Framework header
4  *----------------------------------------------------------------------------
5  *      Copyright(c) KEIL - An ARM Company
6  *----------------------------------------------------------------------------*/
7
8 #ifndef __CMSIS_DV_FRAMEWORK_H__
9 #define __CMSIS_DV_FRAMEWORK_H__
10
11 #include "DV_Typedefs.h"
12 #include "DV_Report.h"
13
14 /*-----------------------------------------------------------------------------
15  * Test framework global definitions
16  *----------------------------------------------------------------------------*/
17
18 /* Test case definition macro                                                 */
19 #define TCD(x, y) {x, #x, y}
20
21 /* Test case description structure                                            */
22 typedef struct {
23   void (*TestFunc)(void);             /* Test function                        */
24   const char *TFName;                 /* Test function name string            */
25   BOOL en;                            /* Test function enabled                */
26 } const TEST_CASE;
27
28 /* Test group description structure                                           */
29 typedef struct {
30   const char *FileName;               /* Test module file name                */
31   const char *Date;                   /* Compilation date                     */
32   const char *Time;                   /* Compilation time                     */
33   const char *ReportTitle;            /* Title or name of module under test   */
34   void (*Init)(void);                 /* Init function callback               */
35   void (*Uninit)(void);               /* Uninit function callback             */
36   
37   uint32_t TCBaseNum;                 /* Base number for test case numbering  */
38   TEST_CASE *TC;                      /* Array of test cases                  */
39   uint32_t NumOfTC;                   /* Number of test cases (sz of TC array)*/
40
41 } const TEST_GROUP;
42
43 /* Defined in user test module                                                */
44 extern TEST_GROUP ts[];
45 extern uint32_t   tg_cnt;
46
47 #endif /* __CMSIS_DV_FRAMEWORK_H__ */