MAPITests 2.0 API Documentation

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

Functions
mapitest_stat.c File Reference

mapitest statistics functions More...

## Functions
uint32_t | mapitest_stat_add_result (struct mapitest_suite *suite, const char *name, enum TestResult testresult)
uint32_t | mapitest_stat_add_skipped_test (struct mapitest_suite *suite, const char *name, enum TestApplicabilityFlags flags)
int32_t | mapitest_stat_dump (struct mapitest *mt)
struct mapitest_stat * | mapitest_stat_init (TALLOC_CTX *mem_ctx)

## Detailed Description

mapitest statistics functions

mapitest records and prints the results of each test using these functions

## Function Documentation

uint32_t mapitest_stat_add_result | ( | struct mapitest_suite * | suite,
|  | const char * | name,
|  | enum TestResult | testresult
| ) |  |

Add test result to the suite statistic parameter

Parameters

  suite | the suite container
  name | the test name
  testresult | the test result

Returns
  MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR

References mapitest_stat::enabled, ExpectedFailure, Fail, mapitest_stat::failure, mapitest_stat::failure_info, mapitest_unit::name, Pass, mapitest_unit::reason, mapitest_suite::stat, mapitest_stat::success, UnexpectedPass, and mapitest_stat::x_fail.

uint32_t mapitest_stat_add_skipped_test | ( | struct mapitest_suite * | suite,
|  | const char * | name,
|  | enum TestApplicabilityFlags | flags
| ) |  |

Add a skipped test to the suite statistic parameters

Parameters

  suite | the suite container
  name | the test name
  flags | flags to indicate the reason why the test was skipped

Returns
  MAPITEST_SUCCESS on success, otherwise MAPITEST_ERROR

References mapitest_stat::enabled, mapitest_unit::name, mapitest_stat::skip_info, mapitest_stat::skipped, and mapitest_suite::stat.

int32_t mapitest_stat_dump | ( | struct mapitest * | mt | ) |

Dump mapitest statistics about test failures

Parameters

  mt | the global mapitest structure

Returns
  the number of test steps that failed (i.e. 0 for all success)

References mapitest_stat::enabled, mapitest_stat::failure, mapitest_stat::failure_info, mapitest::mapi_suite, mapitest_print(), mapitest_print_test_title_end(), mapitest_print_title(), mapitest_unit::name, mapitest_suite::name, mapitest_unit::next, mapitest_suite::next, mapitest_unit::reason, mapitest_stat::skip_info, mapitest_stat::skipped, mapitest_suite::stat, mapitest_stat::success, and mapitest_stat::x_fail.

Referenced by main().

struct mapitest_stat* mapitest_stat_init | ( | TALLOC_CTX * | mem_ctx | ) |
| read

Initialize the mapitest statistic structure

Parameters

  mem_ctx | memory allocation context

Returns
  Allocated stat structure on success, otherwise NULL

References mapitest_stat::enabled, mapitest_stat::failure, mapitest_stat::failure_info, mapitest_stat::skip_info, mapitest_stat::skipped, mapitest_stat::success, and mapitest_stat::x_fail.

Referenced by mapitest_suite_init().

| This content is licensed under the Creative Commons Attribution ShareAlike License v. 3.0: http://creativecommons.org/licenses/by-sa/3.0/