Details
- Reviewers
elvisangelaccio bruns - Group Reviewers
Dolphin - Commits
- R318:0ba9e8bbc042: test(search): Add test case for baloo parsing model
bin/dolphinquerytest
Diff Detail
- Repository
- R318 Dolphin
- Branch
- test_search_model
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 18699 Build 18717: arc lint + arc unit
src/tests/dolphinsearchboxtest.cpp | ||
---|---|---|
57 | Please try to use QVERIFY(QTest::qWaitForWindowExposed(m_searchBox)); in the actual test instead. | |
132 | Coding style: we never use a leading underscore in function names. Missing pass-by-reference for searchString. | |
139–140 | One-liner: const QString queryString = QString::fromUtf8(doc.toJson(QJsonDocument::Compact)); | |
163 | const | |
192 | Coding style: missing space before/after = |
Please move everything added to a new file, this is independent from the searchbox itself.
src/tests/dolphinsearchboxtest.cpp | ||
---|---|---|
90 | The parsing is independent from the config. | |
170 | Just add a column "failureReason" to the data, and do if (!failureReason.empty()) { QEXPECT_FAIL("", qPrintable(failureReason), Continue); } Keeps test and result together. | |
193 | the second .trimmed() should better be not necessary. |
- Move to a different test unit
- Address comments
Most of the boilerplate went away after separating the test and not needing DolphinSearchBox anymore
I also removed the #ifdef HAVE_BALOO guards since the test is within if (KF5Baloo_FOUND) in cmake.