File indexing completed on 2024-06-23 04:34:56
0001 /* 0002 SPDX-FileCopyrightText: 2010 Milian Wolff <mail@milianw.de> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "test_highlighting.h" 0008 0009 #include <QTest> 0010 #include <tests/autotestshell.h> 0011 #include <tests/testcore.h> 0012 #include <language/duchain/duchain.h> 0013 #include <language/codegen/coderepresentation.h> 0014 #include <language/highlighting/codehighlighting.h> 0015 0016 QTEST_MAIN(TestHighlighting) 0017 0018 using namespace KDevelop; 0019 0020 void TestHighlighting::initTestCase() 0021 { 0022 AutoTestShell::init(); 0023 TestCore::initialize(Core::NoUi); 0024 0025 DUChain::self()->disablePersistentStorage(); 0026 CodeRepresentation::setDiskChangesForbidden(true); 0027 } 0028 0029 void TestHighlighting::cleanupTestCase() 0030 { 0031 TestCore::shutdown(); 0032 } 0033 0034 void TestHighlighting::testInitialization() 0035 { 0036 CodeHighlighting highlighting(this); 0037 QVERIFY(highlighting.attributeForDepth(0)); 0038 } 0039 0040 #include "moc_test_highlighting.cpp"