Commit 81771f94 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

improve autotest

parent f5942640
Pipeline #145206 passed with stages
in 5 minutes and 2 seconds
......@@ -136,6 +136,7 @@ void PlainTextEditFindBarTest::shouldReplaceAllText()
QPlainTextEdit edit;
edit.setPlainText(text);
PlainTextEditFindBarExample w(&edit);
QCOMPARE(KPIMTextEdit::FindUtils::replaceAll(&edit, searchText, replaceText, flags), nbElement);
const int nbElementResult = KPIMTextEdit::FindUtils::replaceAll(&edit, searchText, replaceText, flags);
QCOMPARE(edit.toPlainText(), resultStr);
QCOMPARE(nbElementResult, nbElement);
}
......@@ -136,6 +136,7 @@ void RichTextEditFindBarTest::shouldReplaceAllText()
QTextEdit edit;
edit.setPlainText(text);
RichTextEditFindBarExample w(&edit);
QCOMPARE(KPIMTextEdit::FindUtils::replaceAll(&edit, searchText, replaceText, flags), nbElement);
const int nbElementResult = KPIMTextEdit::FindUtils::replaceAll(&edit, searchText, replaceText, flags);
QCOMPARE(edit.toPlainText(), resultStr);
QCOMPARE(nbElementResult, nbElement);
}
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