mock.cpp 632 B

1234567891011121314151617181920212223242526
  1. // (c) Copyright Juergen Hunold 2011
  2. // Use, modification and distribution is subject to the Boost Software
  3. // License, Version 1.0. (See accompanying file LICENSE.txt or copy at
  4. // https://www.bfgroup.xyz/b2/LICENSE.txt)
  5. #define BOOST_TEST_MODULE QtMoc
  6. #include "mock.h"
  7. #include <boost/test/unit_test.hpp>
  8. Mock::Mock()
  9. {
  10. }
  11. /*!
  12. Check that the compiler get the correct #defines.
  13. The logic to test the moc is in the header file "mock.h"
  14. */
  15. BOOST_AUTO_TEST_CASE(construct_mock)
  16. {
  17. delete new Mock();
  18. BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
  19. BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(TEST_MOCK), true);
  20. }