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