qtwidgets.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // (c) Copyright Juergen Hunold 2012
  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 QtGui
  6. #include <QtWidgets/QApplication>
  7. #include <boost/test/unit_test.hpp>
  8. struct Fixture
  9. {
  10. Fixture()
  11. : application(boost::unit_test::framework::master_test_suite().argc,
  12. boost::unit_test::framework::master_test_suite().argv,
  13. false)
  14. {
  15. BOOST_TEST_MESSAGE( "setup QApplication fixture" );
  16. }
  17. ~Fixture()
  18. {
  19. BOOST_TEST_MESSAGE( "teardown QApplication fixture" );
  20. }
  21. QApplication application;
  22. };
  23. BOOST_GLOBAL_FIXTURE( Fixture );
  24. BOOST_AUTO_TEST_CASE( defines)
  25. {
  26. BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
  27. BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
  28. BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WIDGETS_LIB), true);
  29. }
  30. BOOST_AUTO_TEST_CASE( qtgui_test)
  31. {
  32. BOOST_CHECK_EQUAL(true, true);
  33. }