4 * Copyright (C) 2006 Robert Collins <robertc@robertcollins.net>
6 * Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
7 * license at the users choice. A copy of both licenses are available in the
8 * project source as Apache-2.0 and BSD. You may not use this file except in
9 * compliance with one of these two licences.
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under these licenses is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the license you chose for the specific language governing permissions
15 * and limitations under that license.
27 * Report that a test is starting.
28 * @name: test case name
30 extern void subunit_test_start(char const * const name);
36 * Report that a test has passed.
38 * @name: test case name
40 extern void subunit_test_pass(char const * const name);
46 * Report that a test has failed.
47 * @name: test case name
48 * @error: a string describing the error.
50 extern void subunit_test_fail(char const * const name, char const * const error);
56 * Report that a test has errored. An error is an unintentional failure - i.e.
57 * a segfault rather than a failed assertion.
58 * @name: test case name
59 * @error: a string describing the error.
61 extern void subunit_test_error(char const * const name,
62 char const * const error);
68 * Report that a test has been skipped. An skip is a test that has not run to
69 * conclusion but hasn't given an error either - its result is unknown.
70 * @name: test case name
71 * @reason: a string describing the reason for the skip.
73 extern void subunit_test_skip(char const * const name,
74 char const * const reason);
77 enum subunit_progress_whence {
81 SUBUNIT_PROGRESS_PUSH,
87 * Report the progress of a test run.
88 * @whence: The type of progress update to report.
89 * @offset: Offset of the progress (only for SUBUNIT_PROGRESS_SET
90 * and SUBUNIT_PROGRESS_CUR).
92 extern void subunit_progress(enum subunit_progress_whence whence, int offset);