From 4abe791e3cd28b06cf4060f40a9ddea40afa1ce5 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 5 Feb 2010 15:34:34 +1000 Subject: Pass tst_headers::licenseCheck --- .../declarative/painting/paintbenchmark.cpp | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/tests/benchmarks/declarative/painting/paintbenchmark.cpp b/tests/benchmarks/declarative/painting/paintbenchmark.cpp index 87854bd..f869ddf 100644 --- a/tests/benchmarks/declarative/painting/paintbenchmark.cpp +++ b/tests/benchmarks/declarative/painting/paintbenchmark.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ #include #include -- cgit v0.12 From d8398192d50ce9e664910ebdd42b7ada5eabaacb Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 5 Feb 2010 15:47:11 +1000 Subject: Fix bad merge (compile) --- .../qscriptengineagent/tst_qscriptengineagent.cpp | 83 ---------------------- 1 file changed, 83 deletions(-) diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp index 027d301..8e26696 100644 --- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp +++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp @@ -2208,89 +2208,6 @@ void tst_QScriptEngineAgent::isEvaluatingInExtension() QVERIFY(spy->wasEvaluating); } -void tst_QScriptEngineAgent::evaluateProgram() -{ - QScriptEngine eng; - QScriptProgram program("1 + 2", "foo.js", 123); - ScriptEngineSpy *spy = new ScriptEngineSpy(&eng); - qint64 scriptId = -1; - for (int x = 0; x < 10; ++x) { - spy->clear(); - (void)eng.evaluate(program); - QCOMPARE(spy->count(), (x == 0) ? 4 : 3); - - if (x == 0) { - // script is only loaded on first execution - QCOMPARE(spy->at(0).type, ScriptEngineEvent::ScriptLoad); - scriptId = spy->at(0).scriptId; - QVERIFY(scriptId != -1); - QCOMPARE(spy->at(0).script, program.sourceCode()); - QCOMPARE(spy->at(0).fileName, program.fileName()); - QCOMPARE(spy->at(0).lineNumber, program.lineNumber()); - spy->removeFirst(); - } - - QCOMPARE(spy->at(0).type, ScriptEngineEvent::FunctionEntry); // evaluate() - QCOMPARE(spy->at(0).scriptId, scriptId); - - QCOMPARE(spy->at(1).type, ScriptEngineEvent::PositionChange); - QCOMPARE(spy->at(1).scriptId, scriptId); - QCOMPARE(spy->at(1).lineNumber, program.lineNumber()); - - QCOMPARE(spy->at(2).type, ScriptEngineEvent::FunctionExit); // evaluate() - QCOMPARE(spy->at(2).scriptId, scriptId); - QVERIFY(spy->at(2).value.isNumber()); - QCOMPARE(spy->at(2).value.toNumber(), qsreal(3)); - } -} - -void tst_QScriptEngineAgent::evaluateProgram_SyntaxError() -{ - QScriptEngine eng; - QScriptProgram program("this is not valid syntax", "foo.js", 123); - ScriptEngineSpy *spy = new ScriptEngineSpy(&eng); - qint64 scriptId = -1; - for (int x = 0; x < 10; ++x) { - spy->clear(); - (void)eng.evaluate(program); - QCOMPARE(spy->count(), (x == 0) ? 8 : 7); - - if (x == 0) { - // script is only loaded on first execution - QCOMPARE(spy->at(0).type, ScriptEngineEvent::ScriptLoad); - scriptId = spy->at(0).scriptId; - QVERIFY(scriptId != -1); - QCOMPARE(spy->at(0).script, program.sourceCode()); - QCOMPARE(spy->at(0).fileName, program.fileName()); - QCOMPARE(spy->at(0).lineNumber, program.lineNumber()); - spy->removeFirst(); - } - - QCOMPARE(spy->at(0).type, ScriptEngineEvent::FunctionEntry); // evaluate() - QCOMPARE(spy->at(0).scriptId, scriptId); - - QCOMPARE(spy->at(1).type, ScriptEngineEvent::ContextPush); // SyntaxError constructor - QCOMPARE(spy->at(2).type, ScriptEngineEvent::FunctionEntry); // SyntaxError constructor - QCOMPARE(spy->at(3).type, ScriptEngineEvent::FunctionExit); // SyntaxError constructor - QCOMPARE(spy->at(4).type, ScriptEngineEvent::ContextPop); // SyntaxError constructor - - QCOMPARE(spy->at(5).type, ScriptEngineEvent::ExceptionThrow); - QVERIFY(spy->at(5).value.isError()); - QCOMPARE(spy->at(5).value.toString(), QString::fromLatin1("SyntaxError: Parse error")); - - QCOMPARE(spy->at(6).type, ScriptEngineEvent::FunctionExit); // evaluate() - QCOMPARE(spy->at(6).scriptId, scriptId); - } -} - -void tst_QScriptEngineAgent::evaluateNullProgram() -{ - QScriptEngine eng; - ScriptEngineSpy *spy = new ScriptEngineSpy(&eng); - (void)eng.evaluate(QScriptProgram()); - QCOMPARE(spy->count(), 0); -} - class NewSpy :public QScriptEngineAgent { bool m_result; -- cgit v0.12