|
|
|
|
|
||
#include <stlsoft/stlsoft.h>
#include <stdexcept>
#include <stdio.h>
#include <xcover/internal/reporter.h>
Go to the source code of this file.
Classes | |
| struct | xcover_coverItem_t |
| Structure used by reporters to indicate an uncovered mark. More... | |
| class | xcover_initialiser |
| Schwarz Counter class used to automatically initialise the library. More... | |
Defines | |
| #define | XCOVER_VER_MAJOR 0 |
| The Major version number of the xCover library. | |
| #define | XCOVER_VER_MINOR 2 |
| Minor version number of the xCover library. | |
| #define | XCOVER_VER_REVISION 1 |
| The revision number of the xCover library. | |
| #define | XCOVER_VER 0x000201ff |
| The composite version of the xCover library. | |
| #define | XCOVER_MARK_FILE_START() XCOVER_NS_QUAL(::xcover, xcover_markFileStart)(__FILE__, __LINE__, __FUNCTION__, __COUNTER__) |
| Used to define the start of a file. | |
| #define | XCOVER_MARK_FILE_END() XCOVER_NS_QUAL(::xcover, xcover_markFileEnd)(__FILE__, __LINE__, __FUNCTION__, __COUNTER__) |
| Used to define the end of a file. | |
| #define | XCOVER_MARK_LINE() XCOVER_NS_QUAL(::xcover, xcover_markLine)(__FILE__, __LINE__, __FUNCTION__, __COUNTER__) |
| Used to mark a line. | |
| #define | XCOVER_CREATE_FILE_ALIAS(aliasName) XCOVER_NS_QUAL(::xcover, xcover_createFileAlias)(__FILE__, __LINE__, aliasName) |
| Creates a well-known alias for the file. | |
| #define | XCOVER_ASSOCIATE_FILE_WITH_GROUP(groupName) XCOVER_NS_QUAL(::xcover, xcover_associateFileWithGroup)(__FILE__, __LINE__, groupName) |
| Associates a file with a group. | |
| #define | XCOVER_START_GROUP_COVERAGE(groupName) XCOVER_NS_QUAL(::xcover, xcover_startGroupCoverage)(__FILE__, __LINE__, groupName) |
| Used to define the start of a group. | |
| #define | XCOVER_END_GROUP_COVERAGE(groupName) XCOVER_NS_QUAL(::xcover, xcover_endGroupCoverage)(__FILE__, __LINE__, groupName) |
| Used to define the end of a group. | |
| #define | XCOVER_REPORT_GROUP_COVERAGE(groupName, reporter) XCOVER_NS_QUAL(::xcover, xcover_reportGroupCoverage)(__FILE__, __LINE__, groupName, reporter) |
| Reports coverage for a group. | |
| #define | XCOVER_REPORT_FILE_COVERAGE(fileName, reporter) XCOVER_NS_QUAL(::xcover, xcover_reportFileCoverage)(fileName, reporter) |
| Reports coverage of a file. | |
| #define | XCOVER_REPORT_THIS_FILE_COVERAGE(reporter) XCOVER_NS_QUAL(::xcover, xcover_reportFileCoverage)(__FILE__, reporter) |
| Reports coverage of the current file. | |
| #define | XCOVER_REPORT_ALIAS_COVERAGE(aliasName, reporter) XCOVER_NS_QUAL(::xcover, xcover_reportAliasCoverage)(aliasName, reporter) |
| Reports coverage for an alias. | |
Enumerations | |
| enum | xcover_rc_t { XCOVER_RC_SUCCESS = 0, XCOVER_RC_EXCEPTION = -1001, XCOVER_RC_OUT_OF_MEMORY, XCOVER_RC_UNEXPECTED, XCOVER_RC_GROUP_NOT_FOUND, XCOVER_RC_FILE_NOT_FOUND, XCOVER_RC_ALIAS_NOT_FOUND, XCOVER_RC_ALIAS_ALREADY_USED } |
| API function error code. More... | |
Functions | |
| xcover_rc_t | xcover_init (void) |
| Initialises the xCover API. | |
| void | xcover_uninit (void) |
| Uninitialises the xCover API. | |
| xcover_rc_t | xcover_createFileAlias (char const *fileName, int line, char const *aliasName) |
| Create file alias. | |
| xcover_rc_t | xcover_associateFileWithGroup (char const *fileName, int line, char const *groupName) |
| Associates the file with a group. | |
| xcover_rc_t | xcover_markFileStart (char const *fileName, int line, char const *function, int counter) |
| Marks the start of a file. | |
| xcover_rc_t | xcover_markFileEnd (char const *fileName, int line, char const *function, int counter) |
| Marks the end of a file. | |
| xcover_rc_t | xcover_markLine (char const *fileName, int line, char const *function, int counter) |
| Marks a line for coverage. | |
| xcover_rc_t | xcover_startGroupCoverage (char const *fileName, int line, char const *groupName) |
| xcover_rc_t | xcover_endGroupCoverage (char const *fileName, int line, char const *groupName) |
| xcover_rc_t | xcover_reportGroupCoverage (char const *fileName, int line, char const *groupName, xcover_reporter_t *reporter) |
| Reports coverage for all files in the group. | |
| xcover_rc_t | xcover_reportFileCoverage (char const *fileName, xcover_reporter_t *reporter) |
| Reports coverage for a files. | |
| xcover_rc_t | xcover_reportAliasCoverage (char const *aliasName, xcover_reporter_t *reporter) |
| Reports coverage for all files matching the alias. | |
| #define XCOVER_ASSOCIATE_FILE_WITH_GROUP | ( | groupName | ) | XCOVER_NS_QUAL(::xcover, xcover_associateFileWithGroup)(__FILE__, __LINE__, groupName) |
Associates a file with a group.
| groupName | The name of the group to which the file will be associated |
| #define XCOVER_CREATE_FILE_ALIAS | ( | aliasName | ) | XCOVER_NS_QUAL(::xcover, xcover_createFileAlias)(__FILE__, __LINE__, aliasName) |
Creates a well-known alias for the file.
| aliasName | The name for the alias |
| #define XCOVER_END_GROUP_COVERAGE | ( | groupName | ) | XCOVER_NS_QUAL(::xcover, xcover_endGroupCoverage)(__FILE__, __LINE__, groupName) |
Used to define the end of a group.
Any line marks after this point will not be reported
| #define XCOVER_MARK_FILE_END | ( | ) | XCOVER_NS_QUAL(::xcover, xcover_markFileEnd)(__FILE__, __LINE__, __FUNCTION__, __COUNTER__) |
Used to define the end of a file.
Any line marks after this point will not be reported
| #define XCOVER_MARK_FILE_START | ( | ) | XCOVER_NS_QUAL(::xcover, xcover_markFileStart)(__FILE__, __LINE__, __FUNCTION__, __COUNTER__) |
Used to define the start of a file.
Any line marks before this point will not be reported
| #define XCOVER_MARK_LINE | ( | ) | XCOVER_NS_QUAL(::xcover, xcover_markLine)(__FILE__, __LINE__, __FUNCTION__, __COUNTER__) |
Used to mark a line.
| #define XCOVER_REPORT_ALIAS_COVERAGE | ( | aliasName, | |||
| reporter | ) | XCOVER_NS_QUAL(::xcover, xcover_reportAliasCoverage)(aliasName, reporter) |
Reports coverage for an alias.
| aliasName | The name of the alias | |
| reporter | A pointer to a reporter instance. May be NULL |
| #define XCOVER_REPORT_FILE_COVERAGE | ( | fileName, | |||
| reporter | ) | XCOVER_NS_QUAL(::xcover, xcover_reportFileCoverage)(fileName, reporter) |
Reports coverage of a file.
| fileName | The name of the file, or a name that can match the file | |
| reporter | A pointer to a reporter instance. May be NULL |
| #define XCOVER_REPORT_GROUP_COVERAGE | ( | groupName, | |||
| reporter | ) | XCOVER_NS_QUAL(::xcover, xcover_reportGroupCoverage)(__FILE__, __LINE__, groupName, reporter) |
Reports coverage for a group.
| groupName | The name of the group | |
| reporter | A pointer to a reporter instance. May be NULL |
| #define XCOVER_REPORT_THIS_FILE_COVERAGE | ( | reporter | ) | XCOVER_NS_QUAL(::xcover, xcover_reportFileCoverage)(__FILE__, reporter) |
Reports coverage of the current file.
| reporter | A pointer to a reporter instance. May be NULL |
| #define XCOVER_START_GROUP_COVERAGE | ( | groupName | ) | XCOVER_NS_QUAL(::xcover, xcover_startGroupCoverage)(__FILE__, __LINE__, groupName) |
Used to define the start of a group.
Any line marks before this point will not be reported
| #define XCOVER_VER 0x000201ff |
The composite version of the xCover library.
| #define XCOVER_VER_MAJOR 0 |
The Major version number of the xCover library.
| #define XCOVER_VER_MINOR 2 |
Minor version number of the xCover library.
| #define XCOVER_VER_REVISION 1 |
The revision number of the xCover library.
| enum xcover_rc_t |
API function error code.
| xcover_rc_t xcover_associateFileWithGroup | ( | char const * | fileName, | |
| int | line, | |||
| char const * | groupName | |||
| ) |
Associates the file with a group.
| fileName | The file name | |
| line | The line number | |
| groupName | The group name |
| xcover_rc_t xcover_createFileAlias | ( | char const * | fileName, | |
| int | line, | |||
| char const * | aliasName | |||
| ) |
Create file alias.
| fileName | The file name | |
| line | The line number | |
| aliasName | The alias name |
| xcover_rc_t xcover_endGroupCoverage | ( | char const * | fileName, | |
| int | line, | |||
| char const * | groupName | |||
| ) |
| fileName | The file name | |
| line | The line number | |
| groupName | The group name |
| xcover_rc_t xcover_init | ( | void | ) |
| xcover_rc_t xcover_markFileEnd | ( | char const * | fileName, | |
| int | line, | |||
| char const * | function, | |||
| int | counter | |||
| ) |
Marks the end of a file.
| fileName | The file name | |
| line | The line number | |
| function | The function name | |
| counter | The counter |
| xcover_rc_t xcover_markFileStart | ( | char const * | fileName, | |
| int | line, | |||
| char const * | function, | |||
| int | counter | |||
| ) |
Marks the start of a file.
| fileName | The file name | |
| line | The line number | |
| function | The function name | |
| counter | The counter |
| xcover_rc_t xcover_markLine | ( | char const * | fileName, | |
| int | line, | |||
| char const * | function, | |||
| int | counter | |||
| ) |
Marks a line for coverage.
| fileName | The file name | |
| line | The line number | |
| function | The function name | |
| counter | The counter |
| xcover_rc_t xcover_reportAliasCoverage | ( | char const * | aliasName, | |
| xcover_reporter_t * | reporter | |||
| ) |
Reports coverage for all files matching the alias.
| aliasName | The name of the alias. May not be NULL | |
| reporter | A pointer to a reporter instance. May be NULL |
| xcover_rc_t xcover_reportFileCoverage | ( | char const * | fileName, | |
| xcover_reporter_t * | reporter | |||
| ) |
Reports coverage for a files.
| fileName | The file name. May be a file name only, a file name + extension, a full path name, or a shell wild-card path | |
| reporter | A pointer to a reporter instance. May be NULL |
| xcover_rc_t xcover_reportGroupCoverage | ( | char const * | fileName, | |
| int | line, | |||
| char const * | groupName, | |||
| xcover_reporter_t * | reporter | |||
| ) |
Reports coverage for all files in the group.
| fileName | The file name | |
| line | The line number | |
| groupName | The name of the group. May not be NULL | |
| reporter | A pointer to a reporter instance. May be NULL |
| xcover_rc_t xcover_startGroupCoverage | ( | char const * | fileName, | |
| int | line, | |||
| char const * | groupName | |||
| ) |
| fileName | The file name | |
| line | The line number | |
| groupName | The group name |
| void xcover_uninit | ( | void | ) |
Uninitialises the xCover API.
|
|
|
| xCover Library documentation © Matthew Wilson and Synesis Software Pty Ltd, 2008-2009 |
|