[test] define G_APPROX_VALUE and EPSILON only when used

resolves -Weverything bot complain
This commit is contained in:
Ebrahim Byagowi 2020-04-17 22:28:09 +04:30 committed by GitHub
parent 29c903223b
commit fefaa8c835
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -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);