Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
hooks.h
Go to the documentation of this file.
1/*
2 * The MIT License (MIT)
3 *
4 * Copyright © 2015-2016 Franklin "Snaipe" Mathieu <http://snai.pe/>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24/**
25 * @file
26 * @brief Report hooks
27 *****************************************************************************/
28#ifndef CRITERION_HOOKS_H_
29#define CRITERION_HOOKS_H_
30
31#include "internal/hooks.h"
32
33/**
34 * This enum lists all the phases of the runner lifecycle.
35 */
49
50typedef void (*f_report_hook)(void *);
51
52/**
53 * ReportHook(Kind)(Type *param) { Function Body }
54 *
55 * Defines a report hook for the phase defined by Kind.
56 *
57 * The type of the parameter depends on the phase:
58 *
59 * - struct criterion_test_set for PRE_ALL.
60 * - struct criterion_suite_set for PRE_SUITE.
61 * - struct criterion_test for PRE_INIT and PRE_TEST.
62 * - struct criterion_assert_stats for ASSERT.
63 * - struct criterion_theory_stats for THEORY_FAIL.
64 * - struct criterion_test_stats for POST_TEST, POST_FINI, and TEST_CRASH.
65 * - struct criterion_suite_stats for POST_SUITE.
66 * - struct criterion_global_stats for POST_ALL.
67 *
68 * @param Kind The report phase to hook the function onto.
69 */
70#define ReportHook(Kind) CR_REPORT_HOOK_IMPL(Kind)
71
72#endif /* !CRITERION_HOOKS_H_ */
void(* f_report_hook)(void *)
Definition hooks.h:50
e_report_status
Definition hooks.h:36
@ POST_TEST
Definition hooks.h:44
@ PRE_INIT
Definition hooks.h:39
@ THEORY_FAIL
Definition hooks.h:42
@ TEST_CRASH
Definition hooks.h:43
@ PRE_TEST
Definition hooks.h:40
@ ASSERT
Definition hooks.h:41
@ POST_ALL
Definition hooks.h:47
@ PRE_SUITE
Definition hooks.h:38
@ POST_SUITE
Definition hooks.h:46
@ POST_FINI
Definition hooks.h:45
@ PRE_ALL
Definition hooks.h:37