Commit e357f3cb authored by Kevin Funk's avatar Kevin Funk
Browse files

test_files: Fix directory_import.qml test

Problem:
QDEBUG : TestFiles::testFiles(directory_import.qml) "Warning: Module not
found, some types or properties may not be recognized in
/home/jenkins/sources/kdevelop/stable-kf5-qt5/languages/qmljs/tests/files/directory_import.qml:[(2,0),(2,47)]:
<no explanation> (found by Semantic analysis)"
FAIL!  : TestFiles::testFiles(directory_import.qml)
'top->problems().isEmpty()' returned FALSE. ()
   Loc:
[/home/jenkins/sources/kdevelop/stable-kf5-qt5/languages/qmljs/tests/test_files.cpp(137)]

I'm not sure why a module import is tested in a file called
'directory_import.qml'. I also don't know how the QML/JS is supposed to
find the kdevplatform module without knowing about its location.
parent fd302ac7
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);
......
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