Mistake on this page?
Report an issue in GitHub or email us
Public Member Functions | Private Attributes
Case Class Reference

Test case wrapper class. More...

#include <utest_case.h>

Inheritance diagram for Case:

Public Member Functions

const char * get_description () const
bool is_empty () const

Private Attributes

const char * description
 Textual description of the test case. More...
const case_handler_t handler
 Primitive test case handler This is called only if the case setup succeeded. More...
const case_control_handler_t control_handler
const case_call_count_handler_t repeat_count_handler
const case_setup_handler_t setup_handler
 Handler called before the execution of the case handler. More...
const case_teardown_handler_t teardown_handler
 Handler called after the execution of the case handler. More...
const case_failure_handler_t failure_handler
 Handler called whenever a faillure occur; at any stage of the case execution (including setup and teardown). More...

Detailed Description

Test case wrapper class.

This class contains the description of the test case and all handlers for setting up, running the test case, tearing down and handling failures.

By default you only need to provide a description and a test case handler. You may override the setup, teardown and failure handlers, but you do not have to. If you do not override these handler, the specified default handlers will be called.

These constructors are overloaded to allow you a comfortable declaration of all your callbacks. The order is always:

While you can specify an empty test case (ie. use ignore_handler for all callbacks), the harness will abort the test unconditionally.

Definition at line 108 of file utest_case.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.