1 /*-----------------------------------------------------------------------------
3 * Purpose: Report statistics and layout header
4 *----------------------------------------------------------------------------
5 * Copyright (c) 2017 ARM Limited. All rights reserved.
6 *----------------------------------------------------------------------------*/
10 #include "CV_Config.h"
11 #include "CV_Typedefs.h"
13 /*-----------------------------------------------------------------------------
14 * Test report global definitions
15 *----------------------------------------------------------------------------*/
22 /* Test case result definition */
30 /* Assertion result info */
32 const char *module; /* Module name */
33 uint32_t line; /* Assertion line */
36 /* Test case callback interface definition */
38 BOOL (* Result) (TC_RES res);
39 BOOL (* Dbgi) (TC_RES res, const char *fn, uint32_t ln, char *desc);
42 /* Assert interface to the report */
45 /* Assertion result buffer */
47 AS_INFO passed[BUFFER_ASSERTIONS];
48 AS_INFO failed[BUFFER_ASSERTIONS];
49 AS_INFO warnings[BUFFER_ASSERTIONS];
52 /* Assertion statistics */
54 uint32_t passed; /* Total assertions passed */
55 uint32_t failed; /* Total assertions failed */
56 uint32_t warnings; /* Total assertions warnings */
57 AS_T_INFO info; /* Detailed assertion info */
60 /* Test global statistics */
62 uint32_t tests; /* Total test cases count */
63 uint32_t executed; /* Total test cases executed */
64 uint32_t passed; /* Total test cases passed */
65 uint32_t failed; /* Total test cases failed */
66 uint32_t warnings; /* Total test cases warnings */
67 AS_STAT assertions; /* Total assertions statistics */
70 /* Test report interface */
73 BOOL (* Open) (const char *title, const char *date, const char *time, const char *fn);
74 BOOL (* Close) (void);
75 BOOL (* Open_TC) (uint32_t num, const char *fn);
76 BOOL (* Close_TC) (void);
79 /* Test report statistics */
80 extern TEST_REPORT test_report;
82 /* Test report interface */
83 extern REPORT_ITF ritf;
85 /* Assertions and test results */
86 extern TC_RES __set_result (const char *fn, uint32_t ln, TC_RES res, char* desc);
87 extern TC_RES __assert_true (const char *fn, uint32_t ln, uint32_t cond);
89 #endif /* __REPORT_H__ */