Commit 94ed2610 authored by Kevin Funk's avatar Kevin Funk
Browse files

Merge remote-tracking branch 'origin/5.0'

parents 7449d982 273b4d4f
......@@ -29,11 +29,19 @@
#=============================================================================
set(KNOWN_VERSIONS 3.9 3.8 3.7 3.6 3.5)
foreach(version ${KNOWN_VERSIONS})
if (LLVM_DIR OR (DEFINED Clang_FIND_VERSION AND Clang_FIND_VERSION VERSION_GREATER version))
break()
endif ()
if (${Clang_FIND_REQUIRED})
find_package(LLVM ${Clang_FIND_VERSION} REQUIRED)
find_package(LLVM ${version} REQUIRED)
else ()
find_package(LLVM ${Clang_FIND_VERSION})
find_package(LLVM ${version})
endif ()
endforeach()
set(CLANG_FOUND FALSE)
......
......@@ -56,13 +56,16 @@ void TestManPageModel::testDocumentation()
QVERIFY(spy.wait());
const QString description = documentation.description();
if (!description.isEmpty()) {
qDebug() << description;
// check that we've found the correct page by checking some references
QVERIFY(description.contains("dlclose"));
QVERIFY(description.contains("dlerror"));
QVERIFY(description.contains("dlopen"));
QVERIFY(!description.isEmpty());
qDebug() << "Description:" << description;
if (description.isEmpty() || description.contains("No man page matching to dlmopen found")) {
QSKIP("This test requires installed man pages for dlmopen & friends");
}
// check that we've found the correct page by checking some references
QVERIFY(description.contains("dlclose"));
QVERIFY(description.contains("dlerror"));
QVERIFY(description.contains("dlopen"));
}
QTEST_MAIN(TestManPageModel)
......
......@@ -276,7 +276,7 @@ void TestAssistants::testRenameAssistant_data()
<< StateChange(Testbed::CppDoc, Range(0,13,0,13), "b", "abi")
<< StateChange(Testbed::CppDoc, Range(0,14,0,14), "c", "abci")
)
<< "int foo(int abc)\n { abc = 0; return abc; }";
<< "int foo(int abci)\n { abci = 0; return abci; }";
QTest::newRow("Letter-by-Letter Insert")
<< "int foo(int abg)\n { abg = 0; return abg; }"
<< "abg"
......
......@@ -43,7 +43,7 @@ using namespace KDevelop;
void TestDeclarations::initTestCase()
{
AutoTestShell::init();
AutoTestShell::init({"kdevqmljslanguagesupport"});
TestCore::initialize(Core::NoUi);
QmlJS::registerDUChainItems();
......@@ -266,9 +266,6 @@ void TestDeclarations::testQMLtypesImportPaths()
path = QmlJS::Cache::instance().modulePath(stubPath, "QtQuick.Dialogs", "1.1");
QVERIFY(QFileInfo::exists(path + "/plugins.qmltypes"));
path = QmlJS::Cache::instance().modulePath(stubPath, "QtQuick.Extras", "1.1");
QVERIFY(QFileInfo::exists(path + "/plugins.qmltypes"));
path = QmlJS::Cache::instance().modulePath(stubPath, "QtQuick.LocalStorage", "2.0");
QVERIFY(QFileInfo::exists(path + "/plugins.qmltypes"));
......@@ -282,15 +279,9 @@ void TestDeclarations::testQMLtypesImportPaths()
QVERIFY(QFileInfo::exists(path + "/plugins.qmltypes"));
// QtQml QML modules
path = QmlJS::Cache::instance().modulePath(stubPath, "QtQml", "2.2");
QVERIFY(QFileInfo::exists(path + "/plugins.qmltypes"));
path = QmlJS::Cache::instance().modulePath(stubPath, "QtQml.Models", "2.3");
QVERIFY(QFileInfo::exists(path + "/plugins.qmltypes"));
path = QmlJS::Cache::instance().modulePath(stubPath, "QtQml.StateMachine", "1.0");
QVERIFY(QFileInfo::exists(path + "/plugins.qmltypes"));
// QtMultimedia QML modules
path = QmlJS::Cache::instance().modulePath(stubPath, "QtMultimedia", "5.6");
QVERIFY(QFileInfo::exists(path + "/plugins.qmltypes"));
......
import ".././files/directory_to_import/" as MyDir
import "types.js" as MyTypes
import org.kde.kdevplatform 1.0 as KDevPlatform
/**
* "internalContext" : { "importedParents" : { "0" : {"type" : "Class" }}}
......@@ -13,10 +12,5 @@ MyDir.MyComponent {
* "type" : { "toString" : "bool" }
*/
var from_types_js = MyTypes.simple_compare;
/**
* "EXPECT_FAIL" : {"type" : { "toString": "ICore" }}
*/
var icore = KDevPlatform.ICore;
}
}
......@@ -46,7 +46,7 @@ QTEST_MAIN(TestFiles)
void TestFiles::initTestCase()
{
AutoTestShell::init();
AutoTestShell::init({"kdevqmljslanguagesupport"});
TestCore::initialize(KDevelop::Core::NoUi);
DUChain::self()->disablePersistentStorage();
Core::self()->languageController()->backgroundParser()->setDelay(0);
......@@ -134,6 +134,7 @@ void TestFiles::parseAndCheck(const QString& fileName, bool check)
if (!QTest::currentDataTag() || strcmp("failparse.js", QTest::currentDataTag()) != 0) {
QEXPECT_FAIL("plugins.qml", "not working properly yet", Continue);
QEXPECT_FAIL("qrc_import.qml", "just making sure it does not crash", Continue);
QEXPECT_FAIL("dynamicObjectProperties.2.qml", "just making sure it does not crash", Continue);
QVERIFY(top->problems().isEmpty());
}
}
......
......@@ -63,9 +63,7 @@ void TestCustomBuildSystemPlugin::loadSimpleProject()
KDevSignalSpy* projectSpy = new KDevSignalSpy( ICore::self()->projectController(), SIGNAL( projectOpened( KDevelop::IProject* ) ) );
ICore::self()->projectController()->openProject( projecturl );
// Wait for the project to be opened
if( !projectSpy->wait( 20000 ) ) {
qFatal("Expected project to be loaded within 20 seconds, but this didn't happen");
}
QVERIFY(projectSpy->wait(10000));
IProject* project = ICore::self()->projectController()->findProjectByName( "SimpleProject" );
QVERIFY( project );
......@@ -79,9 +77,7 @@ void TestCustomBuildSystemPlugin::buildDirProject()
KDevSignalSpy* projectSpy = new KDevSignalSpy( ICore::self()->projectController(), SIGNAL( projectOpened( KDevelop::IProject* ) ) );
ICore::self()->projectController()->openProject( projecturl );
// Wait for the project to be opened
if( !projectSpy->wait( 20000 ) ) {
qFatal("Expected project to be loaded within 20 seconds, but this didn't happen");
}
QVERIFY(projectSpy->wait(10000));
IProject* project = ICore::self()->projectController()->findProjectByName( "BuilddirProject" );
QVERIFY( project );
......@@ -97,9 +93,7 @@ void TestCustomBuildSystemPlugin::loadMultiPathProject()
KDevSignalSpy* projectSpy = new KDevSignalSpy( ICore::self()->projectController(), SIGNAL( projectOpened( KDevelop::IProject* ) ) );
ICore::self()->projectController()->openProject( projecturl );
// Wait for the project to be opened
if( !projectSpy->wait( 20000 ) ) {
qFatal("Expected project to be loaded within 20 seconds, but this didn't happen");
}
QVERIFY(projectSpy->wait(10000));
IProject* project = ICore::self()->projectController()->findProjectByName( "MultiPathProject" );
QVERIFY( project );
KDevelop::ProjectBaseItem* mainfile = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment