diff options
Diffstat (limited to 'quotest/quotest.cpp')
-rw-r--r-- | quotest/quotest.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/quotest/quotest.cpp b/quotest/quotest.cpp index b6c855bb..624888be 100644 --- a/quotest/quotest.cpp +++ b/quotest/quotest.cpp @@ -128,7 +128,7 @@ private: [[nodiscard]] bool checkRedactionOutcome(const QByteArray& thisTest, const QString& evtIdToRedact); - template <class EventT> + template <EventClass<RoomEvent> EventT> [[nodiscard]] bool validatePendingEvent(const QString& txnId); [[nodiscard]] bool checkDirectChat() const; void finishTest(const TestToken& token, bool condition, const char* file, @@ -156,14 +156,14 @@ void TestSuite::doTest(const QByteArray& testName) Q_ARG(TestToken, testName)); } -template <class EventT> +template <EventClass<RoomEvent> EventT> bool TestSuite::validatePendingEvent(const QString& txnId) { auto it = targetRoom->findPendingEvent(txnId); return it != targetRoom->pendingEvents().end() && it->deliveryStatus() == EventStatus::Submitted && (*it)->transactionId() == txnId && is<EventT>(**it) - && (*it)->matrixType() == EventT::matrixTypeId(); + && (*it)->matrixType() == EventT::TypeId; } void TestSuite::finishTest(const TestToken& token, bool condition, @@ -524,7 +524,8 @@ bool TestSuite::checkFileSendingOutcome(const TestToken& thisTest, return true; } -DEFINE_SIMPLE_EVENT(CustomEvent, RoomEvent, "quotest.custom", int, testValue) +DEFINE_SIMPLE_EVENT(CustomEvent, RoomEvent, "quotest.custom", int, testValue, + "test_value") TEST_IMPL(sendCustomEvent) { |