Changeset View
Changeset View
Standalone View
Standalone View
autotests/testhighlighter.cpp
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Line(s) | 92 | private Q_SLOTS: | |||
---|---|---|---|---|---|
100 | { | 100 | { | ||
101 | QFile coveredList(QLatin1String(TESTBUILDDIR "/covered-definitions.txt")); | 101 | QFile coveredList(QLatin1String(TESTBUILDDIR "/covered-definitions.txt")); | ||
102 | QFile uncoveredList(QLatin1String(TESTBUILDDIR "/uncovered-definition.txt")); | 102 | QFile uncoveredList(QLatin1String(TESTBUILDDIR "/uncovered-definition.txt")); | ||
103 | QVERIFY(coveredList.open(QFile::WriteOnly)); | 103 | QVERIFY(coveredList.open(QFile::WriteOnly)); | ||
104 | QVERIFY(uncoveredList.open(QFile::WriteOnly)); | 104 | QVERIFY(uncoveredList.open(QFile::WriteOnly)); | ||
105 | 105 | | |||
106 | int count = 0; | 106 | int count = 0; | ||
107 | foreach (const auto &def, m_repo->definitions()) { | 107 | foreach (const auto &def, m_repo->definitions()) { | ||
108 | if (def.isHidden()) | 108 | if (def.isHidden() || !def.isValid()) | ||
109 | continue; | 109 | continue; | ||
110 | ++count; | 110 | ++count; | ||
111 | if (m_coveredDefinitions.contains(def.name())) | 111 | if (m_coveredDefinitions.contains(def.name())) | ||
112 | coveredList.write(def.name().toUtf8() + '\n'); | 112 | coveredList.write(def.name().toUtf8() + '\n'); | ||
113 | else | 113 | else | ||
114 | uncoveredList.write(def.name().toUtf8() + '\n'); | 114 | uncoveredList.write(def.name().toUtf8() + '\n'); | ||
115 | } | 115 | } | ||
116 | 116 | | |||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |