CV_Framework.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*-----------------------------------------------------------------------------
  2. * Name: CV_Framework.h
  3. * Purpose: Framework header
  4. *----------------------------------------------------------------------------
  5. * Copyright (c) 2017 ARM Limited. All rights reserved.
  6. *----------------------------------------------------------------------------*/
  7. #ifndef __FRAMEWORK_H__
  8. #define __FRAMEWORK_H__
  9. #include "CV_Typedefs.h"
  10. #include "CV_Report.h"
  11. /*-----------------------------------------------------------------------------
  12. * Test framework global definitions
  13. *----------------------------------------------------------------------------*/
  14. /* Test case definition macro */
  15. #define TCD(x, y) {x, #x, y}
  16. /* Test case description structure */
  17. typedef struct __TestCase {
  18. void (*TestFunc)(void); /* Test function */
  19. const char *TFName; /* Test function name string */
  20. BOOL en; /* Test function enabled */
  21. } TEST_CASE;
  22. /* Test suite description structure */
  23. typedef struct __TestSuite {
  24. const char *FileName; /* Test module file name */
  25. const char *Date; /* Compilation date */
  26. const char *Time; /* Compilation time */
  27. const char *ReportTitle; /* Title or name of module under test */
  28. void (*Init)(void); /* Init function callback */
  29. uint32_t TCBaseNum; /* Base number for test case numbering */
  30. TEST_CASE *TC; /* Array of test cases */
  31. uint32_t NumOfTC; /* Number of test cases (sz of TC array)*/
  32. } TEST_SUITE;
  33. /* Defined in user test module */
  34. extern TEST_SUITE ts;
  35. #endif /* __FRAMEWORK_H__ */