refactor: some Application & style things (#5561)
This commit is contained in:
@@ -4,9 +4,11 @@
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
using namespace chatterino;
|
||||
|
||||
TEST(ChatterSet, insert)
|
||||
{
|
||||
chatterino::ChatterSet set;
|
||||
ChatterSet set;
|
||||
|
||||
EXPECT_FALSE(set.contains("pajlada"));
|
||||
EXPECT_FALSE(set.contains("Pajlada"));
|
||||
@@ -26,7 +28,7 @@ TEST(ChatterSet, insert)
|
||||
|
||||
TEST(ChatterSet, MaxSize)
|
||||
{
|
||||
chatterino::ChatterSet set;
|
||||
ChatterSet set;
|
||||
|
||||
EXPECT_FALSE(set.contains("pajlada"));
|
||||
EXPECT_FALSE(set.contains("Pajlada"));
|
||||
@@ -36,7 +38,7 @@ TEST(ChatterSet, MaxSize)
|
||||
EXPECT_TRUE(set.contains("Pajlada"));
|
||||
|
||||
// After adding CHATTER_LIMIT-1 additional chatters, pajlada should still be in the set
|
||||
for (auto i = 0; i < chatterino::ChatterSet::chatterLimit - 1; ++i)
|
||||
for (auto i = 0; i < ChatterSet::CHATTER_LIMIT - 1; ++i)
|
||||
{
|
||||
set.addRecentChatter(QString("%1").arg(i));
|
||||
}
|
||||
@@ -53,7 +55,7 @@ TEST(ChatterSet, MaxSize)
|
||||
|
||||
TEST(ChatterSet, MaxSizeLastUsed)
|
||||
{
|
||||
chatterino::ChatterSet set;
|
||||
ChatterSet set;
|
||||
|
||||
EXPECT_FALSE(set.contains("pajlada"));
|
||||
EXPECT_FALSE(set.contains("Pajlada"));
|
||||
@@ -63,7 +65,7 @@ TEST(ChatterSet, MaxSizeLastUsed)
|
||||
EXPECT_TRUE(set.contains("Pajlada"));
|
||||
|
||||
// After adding CHATTER_LIMIT-1 additional chatters, pajlada should still be in the set
|
||||
for (auto i = 0; i < chatterino::ChatterSet::chatterLimit - 1; ++i)
|
||||
for (auto i = 0; i < ChatterSet::CHATTER_LIMIT - 1; ++i)
|
||||
{
|
||||
set.addRecentChatter(QString("%1").arg(i));
|
||||
}
|
||||
@@ -75,7 +77,7 @@ TEST(ChatterSet, MaxSizeLastUsed)
|
||||
set.addRecentChatter("pajlada");
|
||||
|
||||
// After another CHATTER_LIMIT-1 additional chatters, pajlada should still be there
|
||||
for (auto i = 0; i < chatterino::ChatterSet::chatterLimit - 1; ++i)
|
||||
for (auto i = 0; i < ChatterSet::CHATTER_LIMIT - 1; ++i)
|
||||
{
|
||||
set.addRecentChatter(QString("new-%1").arg(i));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user