⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243288 in webkit


Ignore:
Timestamp:
Mar 21, 2019, 6:09:00 AM (7 years ago)
Author:
Carlos Garcia Campos
Message:

Unreviewed. Fix GTK build with GLib < 2.58 after r243285.

Add g_assert_cmpfloat_with_epsilon macro if not defined.

  • TestWebKitAPI/glib/WebKitGLib/TestMain.h:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r243285 r243288  
     12019-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        Unreviewed. Fix GTK build with GLib < 2.58 after r243285.
     4
     5        Add g_assert_cmpfloat_with_epsilon macro if not defined.
     6
     7        * TestWebKitAPI/glib/WebKitGLib/TestMain.h:
     8
    192019-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
    210
  • trunk/Tools/TestWebKitAPI/glib/WebKitGLib/TestMain.h

    r242055 r243288  
    7979    } while (0)
    8080
     81#if !defined(g_assert_cmpfloat_with_epsilon)
     82#define g_assert_cmpfloat_with_epsilon(n1,n2,epsilon)                   \
     83    do {                                                                \
     84        double __n1 = (n1);                                             \
     85        double __n2 = (n2);                                             \
     86        double __epsilon = (epsilon);                                   \
     87        if ((((__n1) > (__n2) ? (__n1) - (__n2) : (__n2) - (__n1)) < (__epsilon))) ; \
     88        else {                                                          \
     89            g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, \
     90                G_STRFUNC, #n1 " == " #n2 " (+/- " #epsilon ")", __n1, "==", __n2, 'f'); \
     91        }                                                               \
     92    } while(0)
     93#endif
    8194
    8295class Test {
Note: See TracChangeset for help on using the changeset viewer.