mirror of
https://github.com/boostorg/build.git
synced 2026-02-14 12:42:11 +00:00
Merged revisions 51013,51230,51275,51300,51313 via svnmerge from
https://svn.boost.org/svn/boost/trunk ........ r51013 | jhunold | 2009-02-04 20:14:01 +0100 (Wed, 04 Feb 2009) | 3 lines Apply patch from Alexey Pakhunov for improved msvc assembler support. Fixes https://zigzag.lvk.cs.msu.su:7813/boost.build/ticket/214 ........ r51230 | jhunold | 2009-02-12 21:38:33 +0100 (Thu, 12 Feb 2009) | 7 lines Major refactoring of Qt4 toolchain featuring: - support for multiple 'using qt' statements. - auto-detection of Qt version using qmake. - support for user-specified version. - better debug messages. - support for toolset requirements. ........ r51275 | jhunold | 2009-02-16 20:35:15 +0100 (Mon, 16 Feb 2009) | 2 lines Fix: Correct handling of include paths with spaces. ........ r51300 | jhunold | 2009-02-17 20:30:19 +0100 (Tue, 17 Feb 2009) | 2 lines Add support for QtScriptTools (Qt-4.5) ........ r51313 | jhunold | 2009-02-18 20:11:49 +0100 (Wed, 18 Feb 2009) | 2 lines Refactoring: Rename uic-h to uic to get uniform toolnames. ........ [SVN r51334]
This commit is contained in:
47
test/qt4/qtscripttools.cpp
Normal file
47
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();
|
||||
}
|
||||
Reference in New Issue
Block a user