Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Latest commit

 

History

History
120 lines (107 loc) · 4.16 KB

plain_logger.h

File metadata and controls

120 lines (107 loc) · 4.16 KB
 
1
2
3
4
5
#ifndef _PLAIN_LOGGER_H
#define _PLAIN_LOGGER_H
#include "logger.h"
Jun 27, 2011
Jun 27, 2011
6
7
8
9
10
/*!
* Prints out information about starting the test run.
*
* \param parameterCount How many parameters were given
* \param runnerParameters What parameters were given to the runner
Jul 25, 2011
Jul 25, 2011
11
* \param runSeed Fuzzer seed of the harness
Jun 27, 2011
Jun 27, 2011
12
* \param eventTime When the execution started
Jun 30, 2011
Jun 30, 2011
13
14
* \param data Any additional data logger needs
*
Jun 27, 2011
Jun 27, 2011
15
*/
Jul 25, 2011
Jul 25, 2011
16
17
void PlainRunStarted(int parameterCount, char *runnerParameters[], char *runSeed,
time_t eventTime, void *data);
Jun 27, 2011
Jun 27, 2011
19
20
21
22
23
24
/*!
* Prints out information about ending the test run.
*
* \param testCount How many tests were executed in total
* \param suiteCount How many suite were executed in total
* \param testPassCount How many tests passed in total
Jul 14, 2011
Jul 14, 2011
25
* \param testSkippedCount How many tests were skipped in total
Jun 27, 2011
Jun 27, 2011
26
27
28
29
* \param testFailCount How many tests failed in total
* \param endTime When the execution ended
* \param totalRuntime How long the execution took
*/
Jun 22, 2011
Jun 22, 2011
30
void PlainRunEnded(int testCount, int suiteCount, int testPassCount, int testFailCount,
Jul 11, 2011
Jul 11, 2011
31
int testSkippedCount, time_t endTime, double totalRuntime);
Jun 27, 2011
Jun 27, 2011
33
34
35
36
37
38
/*!
* Prints the data about the test suite that'll be executed next
*
* \param suiteName Name of the test suite
* \param eventTime When the execution starts
*/
39
40
void PlainSuiteStarted(const char *suiteName, time_t eventTime);
Jun 27, 2011
Jun 27, 2011
41
42
43
44
45
46
47
48
49
/*!
* Prints information about the test suite that was just executed
*
* \param testsPassed how many tests passed from this suite
* \param testsFailed how many tests failed from this suite
* \param testsSkipped how many tests were skipped (not implemented)
* \param endTime When the suite execution ended
* \param totalRuntime How long did the suite's execution take
*/
50
void PlainSuiteEnded(int testsPassed, int testsFailed, int testsSkipped,
Jun 27, 2011
Jun 27, 2011
51
time_t endTime, double totalRuntime);
Jun 27, 2011
Jun 27, 2011
53
54
55
56
57
58
/*!
* Prints the data about the test test that'll be executed next
*
* \param testName Name of the test that'll be executed
* \param suiteName Name of the suite of the test
* \param testDescription Description of the test
Jul 24, 2011
Jul 24, 2011
59
* \param execKey Execution key for fuzzing
Jun 27, 2011
Jun 27, 2011
60
61
* \param startTime When the test started to execute
*/
Jun 22, 2011
Jun 22, 2011
62
void PlainTestStarted(const char *testName, const char *suiteName,
Jul 24, 2011
Jul 24, 2011
63
const char *testDescription, int execKey, time_t startTime);
Jun 27, 2011
Jun 27, 2011
65
66
67
68
69
70
71
72
73
/*!
* Prints information about the test test that was just executed
*
* \param testName Name of the executed test
* \param suiteName Name of the suite of the test
* \param testResult Did the test fail (!= 0) or pass (== 0)
* \param endTime When the test execution ended
* \param totalRuntime Total runtime of the executed test
*/
Jun 22, 2011
Jun 22, 2011
74
void PlainTestEnded(const char *testName, const char *suiteName,
Jun 27, 2011
Jun 27, 2011
75
int testResult, time_t endTime, double totalRuntime);
Jun 26, 2011
Jun 26, 2011
76
Jun 27, 2011
Jun 27, 2011
78
79
80
81
82
83
84
85
/*!
* Prints information about plain assert
*
* \param assertName Name of the assert
* \param assertResult Did assert fail (== 0) or success (!= 0)
* \param assertMessage Message of the assert
* \param eventTime When the assert happened
*/
86
void PlainAssert(const char *assertName, int assertResult, const char *assertMessage,
Jun 27, 2011
Jun 27, 2011
87
88
time_t eventTime);
Jun 27, 2011
Jun 27, 2011
89
90
91
92
93
94
95
96
97
98
/*!
* Prints information about assert that has actual and expected values
*
* \param assertName Name of the assert
* \param assertResult Did assert fail (== 0) or success (!= 0)
* \param assertMessage Message of the assert
* \param actualValue Actual value of assert
* \param expected Excepted value of assert
* \param eventTime When the assert happened
*/
Jun 27, 2011
Jun 27, 2011
99
void PlainAssertWithValues(const char *assertName, int assertResult, const char *assertMessage,
Jun 27, 2011
Jun 27, 2011
100
int actualValue, int expected, time_t eventTime);
Jun 27, 2011
Jun 27, 2011
102
103
104
105
106
107
108
109
/*!
* Prints summary of all assertions of certain tests
*
* \param numAsserts Total assert count for the executed test
* \param numAssertsFailed Count of failed asserts in the test
* \param numAssertsPass Count of passed asserts in the test
* \param eventTime Timestamp of the summary
*/
Jun 27, 2011
Jun 27, 2011
110
void PlainAssertSummary(int numAsserts, int numAssertsFailed, int numAssertsPass, time_t eventTime);
Jun 26, 2011
Jun 26, 2011
111
Jun 27, 2011
Jun 27, 2011
112
113
114
115
116
117
/*!
* Prints given message
*
* \param logMessage Message to be logged
* \param eventTime Timestamp for log message
*/
Jul 18, 2011
Jul 18, 2011
118
void PlainLog(time_t eventTime, char *fmt, ...);
119
120
#endif