[test] define G_APPROX_VALUE and EPSILON only when used
resolves -Weverything bot complain
This commit is contained in:
parent
29c903223b
commit
fefaa8c835
|
@ -28,17 +28,17 @@
|
|||
|
||||
/* Unit tests for hb_font_[gs]et_var_coords_ */
|
||||
|
||||
static void
|
||||
test_get_var_coords (void)
|
||||
{
|
||||
#ifdef HB_EXPERIMENTAL_API
|
||||
#ifndef G_APPROX_VALUE
|
||||
#define G_APPROX_VALUE(a, b, epsilon) \
|
||||
(((a) > (b) ? (a) - (b) : (b) - (a)) < (epsilon))
|
||||
#endif
|
||||
|
||||
#define EPSILON 0.05f
|
||||
|
||||
static void
|
||||
test_get_var_coords (void)
|
||||
{
|
||||
#ifdef HB_EXPERIMENTAL_API
|
||||
|
||||
hb_face_t *face = hb_test_open_font_file ("fonts/TestCFF2VF.otf");
|
||||
hb_font_t *font = hb_font_create (face);
|
||||
|
||||
|
|
Loading…
Reference in New Issue