<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Simpler cppunit tests, use CPPUNIT_TEST_FIXTURE"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=122169">122169</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Simpler cppunit tests, use CPPUNIT_TEST_FIXTURE
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Inherited From OOo
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Keywords</th>
          <td>difficultyInteresting, easyHack, skillCpp, topicCleanup
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vmiklos@collabora.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre><<a href="https://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=48145587c4c2dc4f1e07d83073e136336c81ce79">https://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=48145587c4c2dc4f1e07d83073e136336c81ce79</a>>
adds a macro in cppunit that allows not spelling out the declaration /
definition / registration of a testcase in a testsuite, but you can just
do all of this with a single line of code. If you used googletest in
other projects, this is probably familiar to you.

This is just a macro, so it's easy to "bundle" it in core.git (for both
the system and bundled cppunit case), so we can unconditionally use it
right now.  An example conversion looks like this:

<a href="https://cgit.freedesktop.org/libreoffice/core/commit/?id=caec23449a21c0eacbb593330a5b22f8c60d58e8">https://cgit.freedesktop.org/libreoffice/core/commit/?id=caec23449a21c0eacbb593330a5b22f8c60d58e8</a>

Hopefully it's obvious how this avoids repetition, also makes it
impossible to get the wrapping ifdefs wrong around the
declaration/definition/registration in case such a condition is
necessary.

Declaring what exact testcase you want to run is still possible by
setting CPPUNIT_TEST_NAME to "testFoo" from
CPPUNIT_TEST_FIXTURE(FooTest, testFoo).

It would be good to use this markup in our cppunit tests, if you just grep for
CPPUNIT_TEST_SUITE, you'll see the places that could be converted over to
CPPUNIT_TEST_FIXTURE.

One test suite conversion / commit, please.</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>