<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [WPE][GTK] Purge use of g_assert() under TestWebKitAPI"
   href="https://bugs.webkit.org/show_bug.cgi?id=192841">192841</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[WPE][GTK] Purge use of g_assert() under TestWebKitAPI
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Tools / Tests
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned@lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mcatanzaro@igalia.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>bugs-noreply@webkitgtk.org, lforschler@apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The documentation of g_assert() says:

"""
The macro can be turned off in final releases of code by defining G_DISABLE_ASSERT when compiling the application, so code must not depend on any side effects from expr . Similarly, it must not be used in unit tests, otherwise the unit tests will be ineffective if compiled with G_DISABLE_ASSERT. Use g_assert_true() and related macros in unit tests instead.
"""

There are separate g_assert_*() macros for use in tests, which we use inconsistently currently. Use them always. This probably wasn't the best use of my time today, but it's been annoying me for a while and makes sense to do. We'll get nicer error messages now when tests fail.

The documentation also says not to use g_assert_not_reached() in tests, but there is no good replacement for that.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>