• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5 
6 #define BOOST_TEST_MODULE QtWebChannel
7 
8 #include <QtWebChannel>
9 
10 #include <QGuiApplication>
11 
12 #include <boost/test/unit_test.hpp>
13 
BOOST_AUTO_TEST_CASE(defines)14 BOOST_AUTO_TEST_CASE (defines)
15 {
16     BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
17     BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
18     BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_WEBCHANNEL_LIB), true);
19 }
20 
BOOST_AUTO_TEST_CASE(webchannel)21 BOOST_AUTO_TEST_CASE( webchannel )
22 {
23     QGuiApplication app(boost::unit_test::framework::master_test_suite().argc,
24                         boost::unit_test::framework::master_test_suite().argv);
25 
26     QWebChannel channel;
27     QObject dummy;
28     channel.registerObject(QStringLiteral("dummy"), &dummy);
29 }
30