From 8e9bfdfbff1eee5d00cac44c2270a14467eccd35 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 15 Aug 2013 15:54:05 +0200 Subject: mark module as dead Change-Id: I97cc8c13f62b1dce18509de0b6947115b305233a Reviewed-by: Simon Hausmann --- tests/auto/auto.pro | 2 - tests/auto/v8/Makefile.nonqt | 33 -- tests/auto/v8/README.txt | 45 -- tests/auto/v8/tst_v8.cpp | 164 ------ tests/auto/v8/v8.pro | 11 - tests/auto/v8/v8main.cpp | 81 --- tests/auto/v8/v8test.cpp | 1246 ------------------------------------------ tests/auto/v8/v8test.h | 69 --- tests/tests.pro | 2 - 9 files changed, 1653 deletions(-) delete mode 100644 tests/auto/auto.pro delete mode 100644 tests/auto/v8/Makefile.nonqt delete mode 100644 tests/auto/v8/README.txt delete mode 100644 tests/auto/v8/tst_v8.cpp delete mode 100644 tests/auto/v8/v8.pro delete mode 100644 tests/auto/v8/v8main.cpp delete mode 100644 tests/auto/v8/v8test.cpp delete mode 100644 tests/auto/v8/v8test.h delete mode 100644 tests/tests.pro (limited to 'tests') diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro deleted file mode 100644 index 5d6dc20..0000000 --- a/tests/auto/auto.pro +++ /dev/null @@ -1,2 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS = v8 diff --git a/tests/auto/v8/Makefile.nonqt b/tests/auto/v8/Makefile.nonqt deleted file mode 100644 index 8d911e4..0000000 --- a/tests/auto/v8/Makefile.nonqt +++ /dev/null @@ -1,33 +0,0 @@ -V8PATH = ../../../src/3rdparty/v8 -V8INCPATH = $(V8PATH)/include -SOURCES = v8main.cpp v8test.cpp - -CCFLAGS_RELEASE = -DNONQT_TESTING -lpthread -O2 -CCFLAGS_DEBUG = -DNONQT_TESTING -lpthread -g - -LIBS_SNAPSHOT = -lv8_base -lv8_snapshot -LIBS_NOSNAPSHOT = -lv8_base -lv8_nosnapshot - -ia32-release: $(SOURCES) - g++ -o v8test_ia32_release -m32 $(CCFLAGS_RELEASE) -I$(V8INCPATH) $(SOURCES) -L$(V8PATH)/out/ia32.release/obj.target/tools/gyp $(LIBS_SNAPSHOT) - -ia32-debug: $(SOURCES) - g++ -o v8test_ia32_debug -m32 $(CCFLAGS_DEBUG) -I$(V8INCPATH) $(SOURCES) -L$(V8PATH)/out/ia32.debug/obj.target/tools/gyp $(LIBS_SNAPSHOT) - -x64-release: $(SOURCES) - g++ -o v8test_x64_release $(CCFLAGS_RELEASE) -I$(V8INCPATH) $(SOURCES) -L$(V8PATH)/out/x64.release/obj.target/tools/gyp $(LIBS_SNAPSHOT) - -x64-debug: $(SOURCES) - g++ -o v8test_x64_debug $(CCFLAGS_DEBUG) -I$(V8INCPATH) $(SOURCES) -L$(V8PATH)/out/x64.debug/obj.target/tools/gyp $(LIBS_SNAPSHOT) - -mips-release: $(SOURCES) - g++ -o v8test_mips_release -m32 $(CCFLAGS_RELEASE) -I$(V8INCPATH) $(SOURCES) -L$(V8PATH)/out/mips.release/obj.target/tools/gyp -Wl,-rpath,$(V8PATH)/out/mips.release/obj.target/tools/gyp $(LIBS_NOSNAPSHOT) - -mips-debug: $(SOURCES) - g++ -o v8test_mips_debug -m32 $(CCFLAGS_DEBUG) -I$(V8INCPATH) $(SOURCES) -L$(V8PATH)/out/mips.debug/obj.target/tools/gyp -Wl,-rpath,$(V8PATH)/out/mips.debug/obj.target/tools/gyp $(LIBS_NOSNAPSHOT) - -arm-release: $(SOURCES) - g++ -o v8test_arm_release -m32 $(CCFLAGS_RELEASE) -I$(V8INCPATH) $(SOURCES) -L$(V8PATH)/out/arm.release/obj.target/tools/gyp -Wl,-rpath,$(V8PATH)/out/arm.release/obj.target/tools/gyp $(LIBS_NOSNAPSHOT) - -arm-debug: $(SOURCES) - g++ -o v8test_arm_debug -m32 $(CCFLAGS_DEBUG) -I$(V8INCPATH) $(SOURCES) -L$(V8PATH)/out/arm.debug/obj.target/tools/gyp -Wl,-rpath,$(V8PATH)/out/arm.debug/obj.target/tools/gyp $(LIBS_NOSNAPSHOT) diff --git a/tests/auto/v8/README.txt b/tests/auto/v8/README.txt deleted file mode 100644 index da74642..0000000 --- a/tests/auto/v8/README.txt +++ /dev/null @@ -1,45 +0,0 @@ -The v8 tests are actually implemented in v8test.[h|cpp]. There are also QtTest -(tst_v8.cpp) and non-Qt (v8main.cpp) stubs provided to run these tests. This -is done to allow the tests to be run both in the Qt CI system, and manually -without a build of Qt. The latter is necessary to run them against more exotic -build of V8, like the ARM simulator. - -To build the non-Qt version of the tests, first build a debug or release V8 -library under src/3rdparty/v8 using gyp build. - -For example: -make x64.release - -NOTE: If you get error message like "/bin/sh: build/gyp/gyp: not found" first use: -make dependencies - -For detailed description about gyp build, see: -http://code.google.com/p/v8/wiki/BuildingWithGYP - -After the successful build use Makefile.nonqt under tests/auto/v8 for testing. - -For example: -make -f Makefile.nonqt x64.release -./v8test_x64_release - -The following targets are available for non-Qt testing: - ia32-release: Build the tests with -O2 -m32 and link against libv8_base and - libv8_snapshot. - ia32-debug: Build the tests with -g -m32 and link against libv8_base and - libv8_snapshot. - x64-release: Build the tests with -O2 and link against libv8_base and - libv8_snapshot. - x64-debug: Build the tests with -g and link against libv8_base and - libv8_snapshot. - mips-release: Build the tests with -O2 -m32 and link against libv8_base and - libv8_nosnapshot. - mips-debug: Build the tests with -g and link against libv8_base and - libv8_nosnapshot. - arm-release: Build the tests with -O2 -m32 and link against libv8_base and - libv8_nosnapshot. - arm-debug: Build the tests with -g and link against libv8_base and - libv8_nosnapshot. - -NOTE: It is necessary to build the corresponding V8 libraries for each target. For -example the arm simulator testing in release mode (arm-release) needs: -make arm.release diff --git a/tests/auto/v8/tst_v8.cpp b/tests/auto/v8/tst_v8.cpp deleted file mode 100644 index d4193e4..0000000 --- a/tests/auto/v8/tst_v8.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** 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, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#include -#include -#include "v8test.h" - -using namespace v8; - -class tst_v8 : public QObject -{ - Q_OBJECT -public: - tst_v8() {} - -private slots: - void initTestCase() {} - void cleanupTestCase() {} - - void eval(); - void evalwithinwith(); - void userobjectcompare(); - void externalteardown(); - void globalcall(); - void getcallingqmlglobal(); - void typeOf(); - void referenceerror(); - void qtbug_24871(); - void fallbackpropertyhandler_callbacks(); - void fallbackpropertyhandler_in_prototype(); - void fallbackpropertyhandler_nonempty(); - void completehash(); - void stringhashcomparison(); - void qmlmodevariables(); - void qmlmodeinlinelocal(); -}; - -void tst_v8::eval() -{ - QVERIFY(v8test_eval()); -} - -void tst_v8::evalwithinwith() -{ - QVERIFY(v8test_evalwithinwith()); -} - -void tst_v8::userobjectcompare() -{ - QVERIFY(v8test_userobjectcompare()); -} - -void tst_v8::externalteardown() -{ - QVERIFY(v8test_externalteardown()); -} - -void tst_v8::globalcall() -{ - QVERIFY(v8test_globalcall()); -} - -void tst_v8::getcallingqmlglobal() -{ - QVERIFY(v8test_getcallingqmlglobal()); -} - -void tst_v8::typeOf() -{ - QVERIFY(v8test_typeof()); -} - -void tst_v8::referenceerror() -{ - QVERIFY(v8test_referenceerror()); -} - -void tst_v8::qtbug_24871() -{ - QVERIFY(v8test_qtbug_24871()); -} - -void tst_v8::fallbackpropertyhandler_callbacks() -{ - QVERIFY(v8test_fallbackpropertyhandler_callbacks()); -} - -void tst_v8::fallbackpropertyhandler_in_prototype() -{ - QVERIFY(v8test_fallbackpropertyhandler_in_prototype()); -} - -void tst_v8::fallbackpropertyhandler_nonempty() -{ - QVERIFY(v8test_fallbackpropertyhandler_nonempty()); -} - -void tst_v8::completehash() -{ - QVERIFY(v8test_completehash()); -} - -void tst_v8::stringhashcomparison() -{ - QVERIFY(v8test_stringhashcomparison()); -} - -void tst_v8::qmlmodevariables() -{ - QVERIFY(v8test_qmlmodevariables()); -} - -void tst_v8::qmlmodeinlinelocal() -{ - QVERIFY(v8test_qmlmodeinlinelocal()); -} - -int main(int argc, char *argv[]) -{ - V8::SetFlagsFromCommandLine(&argc, argv, true); - - QCoreApplication app(argc, argv); - tst_v8 tc; - return QTest::qExec(&tc, argc, argv); -} - -#include "tst_v8.moc" diff --git a/tests/auto/v8/v8.pro b/tests/auto/v8/v8.pro deleted file mode 100644 index eddbbf6..0000000 --- a/tests/auto/v8/v8.pro +++ /dev/null @@ -1,11 +0,0 @@ -CONFIG += testcase -TARGET = tst_v8 -macx:CONFIG -= app_bundle - -SOURCES += tst_v8.cpp v8test.cpp -HEADERS += v8test.h - -CONFIG += parallel_test - -QT = core v8-private testlib -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/v8/v8main.cpp b/tests/auto/v8/v8main.cpp deleted file mode 100644 index 21440fd..0000000 --- a/tests/auto/v8/v8main.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** 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, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "v8test.h" -#include -#include -#include -#include - -static int exit_status = EXIT_SUCCESS; - -#define RUN_TEST(testname) { \ - if (argc == 1 || 0 == ::strcmp(argv[1], # testname)) { \ - if (!v8test_ ## testname()) { \ - printf ("Test %s FAILED\n", # testname); \ - exit_status = EXIT_FAILURE; \ - } else \ - printf ("Test %s PASS\n", # testname); \ - } \ -} - -int main(int argc, char *argv[]) -{ - v8::V8::SetFlagsFromCommandLine(&argc, argv, true); - - RUN_TEST(eval); - RUN_TEST(evalwithinwith); - RUN_TEST(userobjectcompare); - RUN_TEST(externalteardown); - RUN_TEST(globalcall); - RUN_TEST(getcallingqmlglobal); - RUN_TEST(typeof); - RUN_TEST(referenceerror); - RUN_TEST(qtbug_24871); - RUN_TEST(fallbackpropertyhandler_callbacks); - RUN_TEST(fallbackpropertyhandler_in_prototype); - RUN_TEST(fallbackpropertyhandler_nonempty); - RUN_TEST(completehash); - RUN_TEST(qmlmodevariables); - RUN_TEST(qmlmodeinlinelocal); - - return exit_status; -} diff --git a/tests/auto/v8/v8test.cpp b/tests/auto/v8/v8test.cpp deleted file mode 100644 index 6429cd7..0000000 --- a/tests/auto/v8/v8test.cpp +++ /dev/null @@ -1,1246 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** 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, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "v8test.h" -#ifndef NONQT_TESTING -#include -#endif - -using namespace v8; - -#define BEGINTEST() bool _testPassed = true; -#define ENDTEST() return _testPassed; - -#define VERIFY(expr) { \ - if (!(expr)) { \ - fprintf(stderr, "FAIL: %s:%d %s\n", __FILE__, __LINE__, # expr); \ - _testPassed = false; \ - goto cleanup; \ - } \ -} - -static inline Local CompileRun(const char* source) -{ - return Script::Compile(String::New(source))->Run(); -} - -struct MyStringResource : public String::ExternalAsciiStringResource -{ - static bool wasDestroyed; - virtual ~MyStringResource() { wasDestroyed = true; } - virtual const char* data() const { return "v8test"; } - virtual size_t length() const { return 6; } -}; -bool MyStringResource::wasDestroyed = false; - -struct MyResource : public Object::ExternalResource -{ - static bool wasDestroyed; - virtual ~MyResource() { wasDestroyed = true; } -}; -bool MyResource::wasDestroyed = false; - -bool v8test_externalteardown() -{ - BEGINTEST(); - - Isolate *isolate = v8::Isolate::New(); - isolate->Enter(); - - { - HandleScope handle_scope; - Persistent context = Context::New(); - Context::Scope context_scope(context); - - String::NewExternal(new MyStringResource); - - Local ft = FunctionTemplate::New(); - ft->InstanceTemplate()->SetHasExternalResource(true); - - Local obj = ft->GetFunction()->NewInstance(); - obj->SetExternalResource(new MyResource); - - context.Dispose(); - } - - // while (!v8::V8::IdleNotification()) ; - isolate->Exit(); - isolate->Dispose(); - - // ExternalString resources aren't guaranteed to be freed by v8 at this - // point. Uncommenting the IdleNotification() line above helps. -// VERIFY(MyStringResource::wasDestroyed); - - VERIFY(MyResource::wasDestroyed); - -cleanup: - - ENDTEST(); -} - -bool v8test_eval() -{ - BEGINTEST(); - - HandleScope handle_scope; - Persistent context = Context::New(); - Context::Scope context_scope(context); - - Local qmlglobal = Object::New(); - qmlglobal->Set(String::New("a"), Integer::New(1922)); - - Local