Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

Curses


Data Structures

struct  APPWINDOWS
 Pointers to curses interface windows. More...
struct  APPPAD
 Window elements. More...

Defines

#define curses_run_tests()   CU_curses_run_tests()
 Deprecated (version 1).
#define false   (0)
 Local boolean definition for false.
#define true   (~false)
 Local boolean definition for true.
#define STRING_LENGTH   128
 Standard string length.

Enumerations

enum  STATUS { CONTINUE = 1, MOVE_UP, STOP }
 Curses interface status flag. More...
enum  MENU_TYPE { MAIN_MENU = 1, GROUP_MENU }
 Menu type. More...

Functions

void CU_curses_run_tests (void)
 Run registered CUnit tests using the curses interface.
bool initialize_windows (void)
 Initialize the curses interface windows.
void uninitialize_windows (void)
 Clean up and delete curses interface windows.
void refresh_windows (void)
 Refresh curses interface windows.
void refresh_title_window (void)
 Refresh the title window.
void refresh_progress_window (void)
 Refresh the progress bar window.
void refresh_summary_window (void)
 Refresh the summary window.
void refresh_run_summary_window (void)
 Refresh the run summary window.
void refresh_details_window (void)
 Refresh the details window.
void refresh_options_window (void)
 Refresh the options window.
bool create_pad (APPPAD *pPad, WINDOW *pParent, unsigned int uiRows, unsigned int uiCols)
 Create a window having specified parent and dimensions.
void scroll_window (int nCommand, APPPAD *pPad, void(*parent_refresh)(void))
 Scroll a window.
bool test_initialize (void)
 Initialize the message handlers in preparation for running tests.
void show_progress_bar (void)
 Show the progress bar window.
const char * get_hotkey (const char *szStr, int *pPos)
 Parse a string and return the coded hotkeys.
void read_input_string (const char szPropmt[], char szValue[], int nBytes)
 Display a prompt, then read a string from the keyboard.
STATUS curses_registry_level_run (CU_pTestRegistry pRegistry)
 Main loop for curses interface.
STATUS curses_suite_level_run (CU_pSuite pSuite)
 Run a selected suite within the curses interface.
CU_ErrorCode curses_run_all_tests (CU_pTestRegistry pRegistry)
 Run all tests within the curses interface.
CU_ErrorCode curses_run_suite_tests (CU_pSuite pSuite)
 Run a specified suite within the curses interface.
CU_ErrorCode curses_run_single_test (CU_pSuite pSuite, CU_pTest pTest)
 Run a specific test for the specified suite within the curses interface.
void curses_test_start_message_handler (const CU_pTest pTest, const CU_pSuite pSuite)
 Handler function called at start of each test.
void curses_test_complete_message_handler (const CU_pTest pTest, const CU_pSuite pSuite, const CU_pFailureRecord pFailure)
 Handler function called at completion of each test.
void curses_all_tests_complete_message_handler (const CU_pFailureRecord pFailure)
 Handler function called at completion of all tests in a suite.
void curses_suite_init_failure_message_handler (const CU_pSuite pSuite)
 Handler function called when suite initialization fails.
void list_suites (CU_pTestRegistry pRegistry)
 Print a list of registered suites in the detail window.
void list_tests (CU_pSuite pSuite)
 Print a list of tests contained in a specified suite in the detail window.
void show_failures (void)
 Display the record of test failures in the detail window.
void reset_run_parameters (void)
 Reset the local run counters and prepare for a test run.

Variables

const char * MAIN_OPTIONS = "(R)un (S)elect Suite (L)ist (F)ailures (Q)uit"
 String holding main menu run options.
const char * SUITE_OPTIONS = "(R)un (S)elect Test (L)ist (F)ailures (U)p (Q)uit"
 String holding suite menu run options.
const int CLEAR_COLOR = 1
 Clear color.
const int TITLE_COLOR = 2
 Title color.
const int PROGRESS_BACKGROUND_COLOR = 3
 progress bar background color.
const int PROGRESS_SUCCESS_COLOR = 4
 Progress bar success color.
const int PROGRESS_FAILURE_COLOR = 5
 Progress bar failure color.
const int MENU_COLOR = 6
 Menu color.
const char *const f_szProgress = "Progress "
 Test for progress bar.
const char * f_szOptions = NULL
 String containing options.
CU_pTest f_pCurrentTest = NULL
 Pointer to the test currently being run.
CU_pSuite f_pCurrentSuite = NULL
 Pointer to the suite currently being run.
unsigned int f_uiTotalTests = 0
 Number of tests in registered suites.
unsigned int f_uiTestsRun = 0
 Number of tests actually run.
unsigned int f_uiTestsSkipped = 0
 Number of tests skipped during run.
unsigned int f_uiTestsFailed = 0
 Number of tests having failed assertions.
unsigned int f_uiTestsRunSuccessful = 0
 Number of tests run with no failed assertions.
unsigned int f_uiTotalSuites = 0
 Number of registered suites.
unsigned int f_uiSuitesSkipped = 0
 Number of suites skipped during run.
short f_nLeft
 Left window position.
short f_nTop
 Top window position.
short f_nWidth
 Width of window.
short f_nHeight
 Height of window.
APPWINDOWS application_windows = {NULL, NULL, NULL, NULL, NULL, NULL, NULL}
 Pointers to curses interface windows.
APPPAD details_pad = {NULL, 0, 0, 0, 0, 0, 0, 0, 0}
 Details window definition.


Define Documentation

 
#define curses_run_tests  )     CU_curses_run_tests()
 

Deprecated (version 1).

Deprecated:
Use CU_curses_run_tests().

#define false   (0)
 

Local boolean definition for false.

#define STRING_LENGTH   128
 

Standard string length.

#define true   (~false)
 

Local boolean definition for true.


Enumeration Type Documentation

enum MENU_TYPE
 

Menu type.

Enumeration values:
MAIN_MENU 
GROUP_MENU 

enum STATUS
 

Curses interface status flag.

Enumeration values:
CONTINUE  Continue processing commands in current menu.
MOVE_UP  Move up to the previous menu.
STOP  Stop processing (user selected 'Quit').


Function Documentation

bool create_pad APPPAD pPad,
WINDOW *  pParent,
unsigned int  uiRows,
unsigned int  uiCols
[static]
 

Create a window having specified parent and dimensions.

Parameters:
pPad Pointer to the new window.
pParent Parent window.
uiRows Number of rows for new window.
uiCols Number of columnss for new window.

void CU_curses_run_tests void   ) 
 

Run registered CUnit tests using the curses interface.

void curses_all_tests_complete_message_handler const CU_pFailureRecord  pFailure  )  [static]
 

Handler function called at completion of all tests in a suite.

Parameters:
pFailure Pointer to the test failure record list.

STATUS curses_registry_level_run CU_pTestRegistry  pRegistry  )  [static]
 

Main loop for curses interface.

Displays actions and responds based on user imput.

Parameters:
pRegistry The CU_pTestRegistry to use for testing (non-NULL).

CU_ErrorCode curses_run_all_tests CU_pTestRegistry  pRegistry  )  [static]
 

Run all tests within the curses interface.

The test registry is changed to the specified registry before running the tests, and reset to the original registry when done.

Parameters:
pRegistry The CU_pTestRegistry containing the tests to be run (non-NULL).
Returns:
An error code indicating the error status during the test run.

CU_ErrorCode curses_run_single_test CU_pSuite  pSuite,
CU_pTest  pTest
[static]
 

Run a specific test for the specified suite within the curses interface.

Parameters:
pSuite The suite containing the test to be run (non-NULL).
pTest The test to be run (non-NULL).
Returns:
An error code indicating the error status during the test run.

CU_ErrorCode curses_run_suite_tests CU_pSuite  pSuite  )  [static]
 

Run a specified suite within the curses interface.

Parameters:
pSuite The suite to be run (non-NULL).
Returns:
An error code indicating the error status during the test run.

void curses_suite_init_failure_message_handler const CU_pSuite  pSuite  )  [static]
 

Handler function called when suite initialization fails.

Parameters:
pSuite The suite for which initialization failed.

STATUS curses_suite_level_run CU_pSuite  pSuite  )  [static]
 

Run a selected suite within the curses interface.

Displays actions and responds based on user imput.

Parameters:
pSuite The suite to use for testing (non-NULL).

void curses_test_complete_message_handler const CU_pTest  pTest,
const CU_pSuite  pSuite,
const CU_pFailureRecord  pFailure
[static]
 

Handler function called at completion of each test.

Parameters:
pTest The test being run.
pSuite The suite containing the test.
pFailure Pointer to the 1st failure record for this test.

void curses_test_start_message_handler const CU_pTest  pTest,
const CU_pSuite  pSuite
[static]
 

Handler function called at start of each test.

Parameters:
pTest The test being run.
pSuite The suite containing the test.

const char * get_hotkey const char *  szStr,
int *  pPos
[static]
 

Parse a string and return the coded hotkeys.

If called with szStr non-NULL, the string is simply stored. Subsequent calls with szStr NULL will cause the hotkeys in the string (chars between parentheses) to be returned sequentially in the order in which they appear in the original string.

Parameters:
szStr String to parse (non-NULL to set, NULL to parse).
pPos Used to store position of the next '('.
Returns:
If szStr is non-NULL, it is returned. If szStr is NULL, the next hotkey character is returned, or NULL if there are no more hotkey characters in the original string.

bool initialize_windows void   )  [static]
 

Initialize the curses interface windows.

void list_suites CU_pTestRegistry  pRegistry  )  [static]
 

Print a list of registered suites in the detail window.

Parameters:
pRegistry The CU_pTestRegistry to query (non-NULL).

void list_tests CU_pSuite  pSuite  )  [static]
 

Print a list of tests contained in a specified suite in the detail window.

Parameters:
pSuite The suite to query (non-NULL).

void read_input_string const char  szPrompt[],
char  szValue[],
int  nBytes
[static]
 

Display a prompt, then read a string from the keyboard.

Parameters:
szPrompt The prompt to display.
szValue The string in which to store the response.
nBytes The length of the szValue buffer.

void refresh_details_window void   )  [static]
 

Refresh the details window.

void refresh_options_window void   )  [static]
 

Refresh the options window.

void refresh_progress_window void   )  [static]
 

Refresh the progress bar window.

void refresh_run_summary_window void   )  [static]
 

Refresh the run summary window.

void refresh_summary_window void   )  [static]
 

Refresh the summary window.

void refresh_title_window void   )  [static]
 

Refresh the title window.

void refresh_windows void   )  [static]
 

Refresh curses interface windows.

void reset_run_parameters void   )  [static]
 

Reset the local run counters and prepare for a test run.

void scroll_window int  nCommand,
APPPAD pPad,
void(*)(void)  parent_refresh
[static]
 

Scroll a window.

Parameters:
nCommand Code for the direction to scroll.
pPad The window to scroll.
parent_refresh Function to call to refresh the parent window.

void show_failures void   )  [static]
 

Display the record of test failures in the detail window.

void show_progress_bar void   )  [static]
 

Show the progress bar window.

bool test_initialize void   )  [static]
 

Initialize the message handlers in preparation for running tests.

void uninitialize_windows void   )  [static]
 

Clean up and delete curses interface windows.


Variable Documentation

APPWINDOWS application_windows = {NULL, NULL, NULL, NULL, NULL, NULL, NULL} [static]
 

Pointers to curses interface windows.

const int CLEAR_COLOR = 1 [static]
 

Clear color.

APPPAD details_pad = {NULL, 0, 0, 0, 0, 0, 0, 0, 0} [static]
 

Details window definition.

short f_nHeight [static]
 

Height of window.

short f_nLeft [static]
 

Left window position.

short f_nTop [static]
 

Top window position.

short f_nWidth [static]
 

Width of window.

CU_pSuite f_pCurrentSuite = NULL [static]
 

Pointer to the suite currently being run.

CU_pTest f_pCurrentTest = NULL [static]
 

Pointer to the test currently being run.

const char* f_szOptions = NULL [static]
 

String containing options.

const char* const f_szProgress = "Progress " [static]
 

Test for progress bar.

unsigned int f_uiSuitesSkipped = 0 [static]
 

Number of suites skipped during run.

unsigned int f_uiTestsFailed = 0 [static]
 

Number of tests having failed assertions.

unsigned int f_uiTestsRun = 0 [static]
 

Number of tests actually run.

unsigned int f_uiTestsRunSuccessful = 0 [static]
 

Number of tests run with no failed assertions.

unsigned int f_uiTestsSkipped = 0 [static]
 

Number of tests skipped during run.

unsigned int f_uiTotalSuites = 0 [static]
 

Number of registered suites.

unsigned int f_uiTotalTests = 0 [static]
 

Number of tests in registered suites.

const char* MAIN_OPTIONS = "(R)un (S)elect Suite (L)ist (F)ailures (Q)uit" [static]
 

String holding main menu run options.

const int MENU_COLOR = 6 [static]
 

Menu color.

const int PROGRESS_BACKGROUND_COLOR = 3 [static]
 

progress bar background color.

const int PROGRESS_FAILURE_COLOR = 5 [static]
 

Progress bar failure color.

const int PROGRESS_SUCCESS_COLOR = 4 [static]
 

Progress bar success color.

const char* SUITE_OPTIONS = "(R)un (S)elect Test (L)ist (F)ailures (U)p (Q)uit" [static]
 

String holding suite menu run options.

const int TITLE_COLOR = 2 [static]
 

Title color.


Generated on Thu Apr 28 12:36:10 2005 for CUnit by  doxygen 1.3.9.1