Skip to content
  • Philip Withnall's avatar
    gtestutils: Bail out of g_test_init() if G_DISABLE_ASSERT is defined · ca23acdb
    Philip Withnall authored
    
    
    If G_DISABLE_ASSERT is defined, g_assert() is a no-op. Despite it now
    being standard practice to *not* use g_assert() in unit tests (use
    g_assert_*() instead), a lot of existing unit tests still use it.
    Compiling those tests with G_DISABLE_ASSERT would make them silently
    no-ops. Avoid that by warning the user loudly.
    
    Note that it’s pretty rare for people to compile with G_DISABLE_ASSERT,
    so it’s not expected that this will be hit often.
    
    Signed-off-by: default avatarPhilip Withnall <withnall@endlessm.com>
    
    #976
    ca23acdb