mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor: removed TextFormatter instantiations from tests
This commit is contained in:
parent
1ac21c07db
commit
a9eca8e626
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user