Differential D8317 Diff 20958 plugins/custom-definesandincludes/compilerprovider/tests/test_compilerprovider.cpp
Changeset View
Changeset View
Standalone View
Standalone View
plugins/custom-definesandincludes/compilerprovider/tests/test_compilerprovider.cpp
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Line(s) | |||||
108 | } | 108 | } | ||
109 | 109 | | |||
110 | void TestCompilerProvider::testCompilerIncludesAndDefines() | 110 | void TestCompilerProvider::testCompilerIncludesAndDefines() | ||
111 | { | 111 | { | ||
112 | auto settings = SettingsManager::globalInstance(); | 112 | auto settings = SettingsManager::globalInstance(); | ||
113 | auto provider = settings->provider(); | 113 | auto provider = settings->provider(); | ||
114 | for (auto c : provider->compilers()) { | 114 | for (auto c : provider->compilers()) { | ||
115 | if (!c->editable() && !c->path().isEmpty()) { | 115 | if (!c->editable() && !c->path().isEmpty()) { | ||
116 | QVERIFY(!c->defines({}).isEmpty()); | 116 | QVERIFY(!c->defines(Utils::Cpp, {}).isEmpty()); | ||
117 | QVERIFY(!c->includes({}).isEmpty()); | 117 | QVERIFY(!c->includes(Utils::Cpp, {}).isEmpty()); | ||
118 | } | 118 | } | ||
119 | } | 119 | } | ||
120 | 120 | | |||
121 | QVERIFY(!provider->defines(nullptr).isEmpty()); | 121 | QVERIFY(!provider->defines(nullptr).isEmpty()); | ||
122 | QVERIFY(!provider->includes(nullptr).isEmpty()); | 122 | QVERIFY(!provider->includes(nullptr).isEmpty()); | ||
123 | 123 | | |||
124 | auto compiler = provider->compilerForItem(nullptr); | 124 | auto compiler = provider->compilerForItem(nullptr); | ||
125 | QVERIFY(compiler); | 125 | QVERIFY(compiler); | ||
126 | QVERIFY(!compiler->defines(QStringLiteral("--std=c++11")).isEmpty()); | 126 | QVERIFY(!compiler->defines(Utils::Cpp, QStringLiteral("-std=c++11")).isEmpty()); | ||
127 | QVERIFY(!compiler->includes(QStringLiteral("--std=c++11")).isEmpty()); | 127 | QVERIFY(!compiler->includes(Utils::Cpp, QStringLiteral("-std=c++11")).isEmpty()); | ||
apol: why did you remove 1 of de dashes? | |||||
both man clang and man gcc use this form, and above we also use this form. So I think this change is fine, but should go to a separate patch (commit it directly) mwolff: both `man clang` and `man gcc` use this form, and above we also use this form. So I think this… | |||||
128 | } | 128 | } | ||
129 | 129 | | |||
130 | void TestCompilerProvider::testStorageBackwardsCompatible() | 130 | void TestCompilerProvider::testStorageBackwardsCompatible() | ||
131 | { | 131 | { | ||
132 | auto settings = SettingsManager::globalInstance(); | 132 | auto settings = SettingsManager::globalInstance(); | ||
133 | QTemporaryFile file; | 133 | QTemporaryFile file; | ||
134 | QVERIFY(file.open()); | 134 | QVERIFY(file.open()); | ||
135 | QTextStream stream(&file); | 135 | QTextStream stream(&file); | ||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |
why did you remove 1 of de dashes?