cppunit 1.14 released

It has been quite some time since the last cppunit release – about 3.5 years according to wikipedia – despite having enough changes for quite some time. After seeing some recent LibreOffice commits that would have benefited from the existing unreleased commits I finished the work. Here is a short summary of the changes to cppunit 1.14:

Removed features and platform support

  • Removed special support for BeOS
  • Removed QT test runner
  • Removed MSVC6 test runner
  • Removed MSVC6 plugin
  • Removed support for pre-C++11 compilers
  • Removed support for compilers that don’t support RTTI and default template arguments in standard containers

 

New features

  • Support for enum class in template<typename T> CppUnit::assertEquals, and therefore in CPPUNIT_ASSERT_EQUAL
    • An example can be found in the internal examples directory
  • New assertion macros: CPPUNIT_ASSERT_LESS, CPPUNIT_ASSERT_GREATER, CPPUNIT_ASSERT_LESSEQUAL, CPPUNIT_ASSERT_GREATEREQUAL
    • Examples for the new assertion macros can be found in the internal examples directory
    • Note that the first argument is always the reference value, so CPPUNIT_ASSERT_LESS(x, y) will check that y is less than x. Sadly this confusing behavior is required to keep compatibility with CPPUNIT_ASSERT_EQUAL.
  • TestCaller now takes as a constructor argument any callable that can be put into std::function<void()>
  • Based on the TestCaller change, CPPUNIT_TEST_PARAMETERIZED has been added that works similar to CPPUNIT_TEST but takes as a second argument an iteratable whose items can be passed to the test function. std::bind of the test method with each element of the iteratable needs to result in an object that can be stored in std::function<void()>.
    • An example can be seen in the examples directory.
  • Various warning and bug fixes
  • New and improved build system (thanks to Tomas Chvatal and David Tardon)

 

With the removal of the old features the code now much smaller and the next release will most likely move into the directory of modernizing the code base. Thanks to all contributors who provided patches for this release.

As always bug reports are welcome at the LibreOffice bug tracker.

 

Advertisements

About Markus Mohrhard

Hacking at Libreoffice calc
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s