mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
Add support for QtScriptTools (Qt-4.5)
[SVN r51300]
This commit is contained in:
@@ -27,6 +27,7 @@ if [ qt4.initialized ]
|
||||
[ run qtxml.cpp /qt//QtXml ]
|
||||
[ run qtnetwork.cpp /qt//QtNetwork ]
|
||||
[ run qtscript.cpp /qt//QtScript ]
|
||||
[ run qtscripttools.cpp /qt//QtScriptTools ]
|
||||
[ run qtxmlpatterns.cpp /qt//QtXmlPatterns ]
|
||||
|
||||
# ToDo: runable example code
|
||||
|
||||
@@ -20,7 +20,7 @@ operator << (std::ostream& stream, QString const& string)
|
||||
|
||||
BOOST_AUTO_TEST_CASE( defines)
|
||||
{
|
||||
BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
|
||||
BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SCRIPT_LIB), true);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( script )
|
||||
@@ -30,5 +30,4 @@ BOOST_AUTO_TEST_CASE( script )
|
||||
|
||||
BOOST_CHECK_EQUAL(three.toNumber(), 3);
|
||||
BOOST_CHECK_EQUAL(three.toString(), QLatin1String("3"));
|
||||
|
||||
}
|
||||
|
||||
47
v2/test/qt4/qtscripttools.cpp
Normal file
47
v2/test/qt4/qtscripttools.cpp
Normal file
@@ -0,0 +1,47 @@
|
||||
// (c) Copyright Juergen Hunold 2009
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_TEST_MODULE QtScriptTools
|
||||
|
||||
#include <QScriptEngine>
|
||||
|
||||
#include <QScriptEngineDebugger>
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace utf = boost::unit_test::framework;
|
||||
|
||||
std::ostream&
|
||||
operator << (std::ostream& stream, QString const& string)
|
||||
{
|
||||
stream << qPrintable(string);
|
||||
return stream;
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( defines)
|
||||
{
|
||||
BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_SCRIPTTOOLS_LIB), true);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( script )
|
||||
{
|
||||
QApplication app(utf::master_test_suite().argc,
|
||||
utf::master_test_suite().argv);
|
||||
|
||||
QScriptEngine myEngine;
|
||||
QScriptValue three = myEngine.evaluate("1 + 2");
|
||||
|
||||
QScriptEngineDebugger debugger;
|
||||
debugger.attachTo(&myEngine);
|
||||
|
||||
BOOST_CHECK_EQUAL(three.toNumber(), 3);
|
||||
BOOST_CHECK_EQUAL(three.toString(), QLatin1String("3"));
|
||||
|
||||
debugger.detach();
|
||||
}
|
||||
@@ -423,7 +423,10 @@ rule init ( prefix : full_bin ? : full_inc ? : full_lib ? : version ? : conditio
|
||||
add-shared-library QtDBus : QtXml : : $(target-requirements) ;
|
||||
|
||||
# Script-Engine (Qt 4.3)
|
||||
add-shared-library QtScript : QtGui QtXml : : $(target-requirements) ;
|
||||
add-shared-library QtScript : QtGui QtXml : QT_SCRIPT_LIB : $(target-requirements) ;
|
||||
|
||||
# Tools for the Script-Engine (Qt 4.5)
|
||||
add-shared-library QtScriptTools : QtScript : QT_SCRIPTTOOLS_LIB : $(target-requirements) ;
|
||||
|
||||
# WebKit (Qt 4.4)
|
||||
add-shared-library QtWebKit : QtGui : QT_WEBKIT_LIB : $(target-requirements) ;
|
||||
|
||||
Reference in New Issue
Block a user