From a9eca8e62675cbddc37057c522007840b9c6c73a Mon Sep 17 00:00:00 2001 From: noavarice Date: Sat, 8 Jul 2017 14:29:33 +0300 Subject: [PATCH] refactor: removed TextFormatter instantiations from tests --- test/chatlog/textformatter_test.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/chatlog/textformatter_test.cpp b/test/chatlog/textformatter_test.cpp index 15ba11235..5a71e0a60 100644 --- a/test/chatlog/textformatter_test.cpp +++ b/test/chatlog/textformatter_test.cpp @@ -126,9 +126,8 @@ static void commonTest(bool showSymbols, const StringToString map, const QString { for (QString key : map.keys()) { QString source = key.arg(signs); - TextFormatter tf = TextFormatter(source); QString result = map[key].arg(showSymbols ? signs : "", signsToTags[signs]); - QVERIFY(tf.applyStyling(showSymbols) == result); + QVERIFY(applyMarkdown(source, showSymbols) == result); } } @@ -139,8 +138,8 @@ static void commonTest(bool showSymbols, const StringToString map, const QString static void commonExceptionsTest(const QString signs) { for (QString source : commonExceptions) { - TextFormatter tf = TextFormatter(source.arg(signs)); - QVERIFY(tf.applyStyling(false) == source.arg(signs)); + QString message = source.arg(signs); + QVERIFY(applyMarkdown(message, false) == message); } } @@ -151,8 +150,7 @@ static void commonExceptionsTest(const QString signs) static void specialTest(const StringToString map) { for (QString key : map.keys()) { - TextFormatter tf = TextFormatter(key); - QVERIFY(tf.applyStyling(false) == map[key]); + QVERIFY(applyMarkdown(key, false) == map[key]); } }