Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / external / c-tap-harness / tests / tap / float.h
1 /*
2 * Floating point check function for the TAP protocol.
3 *
4 * This file is part of C TAP Harness. The current version plus supporting
5 * documentation is at <http://www.eyrie.org/~eagle/software/c-tap-harness/>.
6 *
7 * Copyright 2008, 2010, 2012 Russ Allbery <rra@stanford.edu>
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 * DEALINGS IN THE SOFTWARE.
26 */
27
28 #ifndef TAP_FLOAT_H
29 #define TAP_FLOAT_H 1
30
31 #include <tests/tap/macros.h>
32
33 BEGIN_DECLS
34
35 /* Check an expected value against a seen value within epsilon. */
36 void is_double(double wanted, double seen, double epsilon,
37 const char *format, ...)
38 __attribute__((__format__(printf, 4, 5)));
39
40 END_DECLS
41
42 #endif /* TAP_FLOAT_H */