|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51300 - in trunk/tools/build/v2: test/qt4 tools
From: juergen.hunold_at_[hidden]
Date: 2009-02-17 14:30:19
Author: jhunold
Date: 2009-02-17 14:30:19 EST (Tue, 17 Feb 2009)
New Revision: 51300
URL: http://svn.boost.org/trac/boost/changeset/51300
Log:
Add support for QtScriptTools (Qt-4.5)
Added:
trunk/tools/build/v2/test/qt4/qtscripttools.cpp
- copied, changed from r51288, /trunk/tools/build/v2/test/qt4/qtscript.cpp
Text files modified:
trunk/tools/build/v2/test/qt4/jamroot.jam | 1 +
trunk/tools/build/v2/test/qt4/qtscript.cpp | 3 +--
trunk/tools/build/v2/test/qt4/qtscripttools.cpp | 19 ++++++++++++++++---
trunk/tools/build/v2/tools/qt4.jam | 5 ++++-
4 files changed, 22 insertions(+), 6 deletions(-)
Modified: trunk/tools/build/v2/test/qt4/jamroot.jam
==============================================================================
--- trunk/tools/build/v2/test/qt4/jamroot.jam (original)
+++ trunk/tools/build/v2/test/qt4/jamroot.jam 2009-02-17 14:30:19 EST (Tue, 17 Feb 2009)
@@ -27,6 +27,7 @@
[ 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
Modified: trunk/tools/build/v2/test/qt4/qtscript.cpp
==============================================================================
--- trunk/tools/build/v2/test/qt4/qtscript.cpp (original)
+++ trunk/tools/build/v2/test/qt4/qtscript.cpp 2009-02-17 14:30:19 EST (Tue, 17 Feb 2009)
@@ -20,7 +20,7 @@
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_CHECK_EQUAL(three.toNumber(), 3);
BOOST_CHECK_EQUAL(three.toString(), QLatin1String("3"));
-
}
Copied: trunk/tools/build/v2/test/qt4/qtscripttools.cpp (from r51288, /trunk/tools/build/v2/test/qt4/qtscript.cpp)
==============================================================================
--- /trunk/tools/build/v2/test/qt4/qtscript.cpp (original)
+++ trunk/tools/build/v2/test/qt4/qtscripttools.cpp 2009-02-17 14:30:19 EST (Tue, 17 Feb 2009)
@@ -1,16 +1,22 @@
-// (c) Copyright Juergen Hunold 2008
+// (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 QtScript
+#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)
{
@@ -20,15 +26,22 @@
BOOST_AUTO_TEST_CASE( defines)
{
- BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
+ 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();
}
Modified: trunk/tools/build/v2/tools/qt4.jam
==============================================================================
--- trunk/tools/build/v2/tools/qt4.jam (original)
+++ trunk/tools/build/v2/tools/qt4.jam 2009-02-17 14:30:19 EST (Tue, 17 Feb 2009)
@@ -423,7 +423,10 @@
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) ;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk