refactor: clean up toStdString usages in tests (#5346)
* tests: Add QString/QStringView << operators for std::ostream This makes it easier to print QString/QStringView's in ASSERT_EQ outputs * tests: clean up toStdString usages * fix: use QByteArray.toStdString instead
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "providers/emoji/Emojis.hpp"
|
||||
|
||||
#include "common/Literals.hpp"
|
||||
#include "TestHelpers.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <QDebug>
|
||||
@@ -53,7 +54,7 @@ TEST(Emojis, ShortcodeParsing)
|
||||
}
|
||||
|
||||
EXPECT_EQ(output, test.expectedOutput)
|
||||
<< "Input " << test.input.toStdString() << " failed";
|
||||
<< "Input " << test.input << " failed";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,8 +166,7 @@ TEST(Emojis, Parse)
|
||||
// can't use EXPECT_EQ because EmotePtr can't be printed
|
||||
if (output != test.expectedOutput)
|
||||
{
|
||||
EXPECT_TRUE(false)
|
||||
<< "Input " << test.input.toStdString() << " failed";
|
||||
EXPECT_TRUE(false) << "Input " << test.input << " failed";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user