qtwebchannel.cpp 878 B

1234567891011121314151617181920212223242526272829
  1. // (c) Copyright Juergen Hunold 2016
  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 QtWebChannel
  6. #include <QtWebChannel>
  7. #include <QGuiApplication>
  8. #include <boost/test/unit_test.hpp>
  9. BOOST_AUTO_TEST_CASE (defines)
  10. {
  11. BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
  12. BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
  13. BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBCHANNEL_LIB), true);
  14. }
  15. BOOST_AUTO_TEST_CASE( webchannel )
  16. {
  17. QGuiApplication app(boost::unit_test::framework::master_test_suite().argc,
  18. boost::unit_test::framework::master_test_suite().argv);
  19. QWebChannel channel;
  20. QObject dummy;
  21. channel.registerObject(QStringLiteral("dummy"), &dummy);
  22. }