D-Bus  1.13.7
dbus-test-tap.h
1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2 /* dbus-test-tap — TAP helpers for "embedded tests"
3  *
4  * Copyright © 2017 Collabora Ltd.
5  *
6  * Permission is hereby granted, free of charge, to any person
7  * obtaining a copy of this software and associated documentation files
8  * (the "Software"), to deal in the Software without restriction,
9  * including without limitation the rights to use, copy, modify, merge,
10  * publish, distribute, sublicense, and/or sell copies of the Software,
11  * and to permit persons to whom the Software is furnished to do so,
12  * subject to the following conditions:
13  *
14  * The above copyright notice and this permission notice shall be
15  * included in all copies or substantial portions of the Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
21  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
22  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24  * SOFTWARE.
25  */
26 
27 #ifndef DBUS_TEST_TAP_H
28 #define DBUS_TEST_TAP_H
29 
30 #include <dbus/dbus-internals.h>
31 
32 #ifdef DBUS_ENABLE_EMBEDDED_TESTS
33 
34 DBUS_PRIVATE_EXPORT
35 void _dbus_test_fatal (const char *format,
36  ...) _DBUS_GNUC_NORETURN _DBUS_GNUC_PRINTF (1, 2);
37 
38 DBUS_PRIVATE_EXPORT
39 void _dbus_test_diag (const char *format,
40  ...) _DBUS_GNUC_PRINTF (1, 2);
41 
42 DBUS_PRIVATE_EXPORT
43 void _dbus_test_skip_all (const char *format,
44  ...) _DBUS_GNUC_NORETURN _DBUS_GNUC_PRINTF (1, 2);
45 
46 DBUS_PRIVATE_EXPORT
47 void _dbus_test_ok (const char *format,
48  ...) _DBUS_GNUC_PRINTF (1, 2);
49 DBUS_PRIVATE_EXPORT
50 void _dbus_test_not_ok (const char *format,
51  ...) _DBUS_GNUC_PRINTF (1, 2);
52 DBUS_PRIVATE_EXPORT
53 void _dbus_test_skip (const char *format,
54  ...) _DBUS_GNUC_PRINTF (1, 2);
55 
56 DBUS_PRIVATE_EXPORT
57 void _dbus_test_check_memleaks (const char *test_name);
58 
59 DBUS_PRIVATE_EXPORT
60 int _dbus_test_done_testing (void);
61 
62 #endif
63 
64 #endif