upgrading copyright year from 2015 to 2016
[hkl.git] / tests / tap / hkl-tap.h
blob4dde2aa05ce4a53ae534231e9339f299215aff6f
1 /* This file is part of the hkl library.
3 * The hkl library is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
8 * The hkl library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with the hkl library. If not, see <http://www.gnu.org/licenses/>.
16 * Copyright (C) 2003-2016 Synchrotron SOLEIL
17 * L'Orme des Merisiers Saint-Aubin
18 * BP 48 91192 GIF-sur-YVETTE CEDEX
20 * Authors: Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>
22 #ifndef __HKL_TAP_H__
23 #define __HKL_TAP_H__
25 #include "hkl.h"
27 #define STRINGIFY(x) #x
28 #define TOSTRING(x) STRINGIFY(x)
30 /* BEWARE here we are using a GCC extension */
31 #define DIAG(_success) \
32 ({ typeof(_success) __success = (_success); \
33 if(!__success) \
34 diag("status: %d " __FILE__ ":" TOSTRING(__LINE__) ":%s", (__success) , __func__); \
35 __success; \
38 G_BEGIN_DECLS
40 extern void is_quaternion(const HklQuaternion *wanted, const HklQuaternion *seen, const char *format, ...)
41 __attribute__((__format__(printf, 3, 4)));
43 extern void is_matrix(const HklMatrix *wanted, const HklMatrix *seen, const char *format, ...)
44 __attribute__((__format__(printf, 3, 4)));
46 extern int check_pseudoaxes_v(HklEngine *engine, ...);
48 extern int check_pseudoaxes(HklEngine *engine,
49 double expected[], uint len);
51 extern void hkl_tap_engine_pseudo_axes_randomize(HklEngine *self,
52 double values[], size_t n_values,
53 HklUnitEnum unit_type) HKL_ARG_NONNULL(1, 2);
55 extern void hkl_tap_engine_parameters_randomize(HklEngine *self) HKL_ARG_NONNULL(1);
57 extern HklGeometryList *hkl_engine_set_values_v(HklEngine *self, ...);
59 G_END_DECLS
61 #endif /* __HKL_TAP_H__ */