Skip to content

DrMock v0.3.0

Compare
Choose a tag to compare
@maltekliemann maltekliemann released this 05 Jul 10:54
· 415 commits to master since this release

Added/Changed

  • Add emits method that allows Method objects to emit signals when
    called (for details, see the tutorials). Implementing this feature
    meant introducing some significant changes (taken from git log):

    • All major class templates now have a new template parameter,
      the type of the parent mock object (MO). For every MO, the mocker passes
      to each Method object of the MO a pointer to the MO. This pointer is
      required for Signal::invoke(Parent*) [see below].

    • A new class template, Signal, represents such signal emissions.

    • Introduce the --qt flag for the DrMockGenerator, which, when set,
      #defines the DRMOCK_USE_QT macro in all mock source code. The
      DrMock macros automatically apply --qt if a test is linked
      against a Qt library. If DRMOCK_USE_QT is not set, calling
      Signal::emit raises an error.

    • Update samples/qt

  • Throw if conflicts occur during mock object configuration