chore: ensure statics are only present once in the final app (#5588)

This commit is contained in:
nerix
2024-09-14 14:13:12 +02:00
committed by GitHub
parent 2d8937f43e
commit 3d06f8612f
14 changed files with 177 additions and 164 deletions
+5 -5
View File
@@ -24,8 +24,6 @@ using namespace chatterino;
using namespace chatterino::filters;
using chatterino::mock::MockChannel;
TypingContext typingContext = MESSAGE_TYPING_CONTEXT;
namespace {
class MockApplication : public mock::BaseApplication
@@ -188,7 +186,8 @@ TEST(Filters, TypeSynthesis)
T type = filter.returnType();
EXPECT_EQ(type, expected)
<< "Filter{ " << input << " } has type " << type << " instead of "
<< expected << ".\nDebug: " << filter.debugString(typingContext);
<< expected
<< ".\nDebug: " << filter.debugString(MESSAGE_TYPING_CONTEXT);
}
}
@@ -265,7 +264,7 @@ TEST(Filters, Evaluation)
EXPECT_EQ(result, expected)
<< "Filter{ " << input << " } evaluated to " << result.toString()
<< " instead of " << expected.toString()
<< ".\nDebug: " << filter.debugString(typingContext);
<< ".\nDebug: " << filter.debugString(MESSAGE_TYPING_CONTEXT);
}
}
@@ -368,7 +367,8 @@ TEST_F(FiltersF, ExpressionDebug)
EXPECT_NE(filter, nullptr) << "Filter::fromString(" << input
<< ") did not build a proper filter";
const auto actualDebugString = filter->debugString(typingContext);
const auto actualDebugString =
filter->debugString(MESSAGE_TYPING_CONTEXT);
EXPECT_EQ(actualDebugString, debugString)
<< "filter->debugString() on '" << input << "' should be '"
<< debugString << "', but got '" << actualDebugString << "'";