From ff78cd3370eccf593be789677dd8c4e2cdcea173 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 18 Oct 2019 09:03:06 +0900 Subject: TestManager::setTopic: add debug logging --- tests/quotest.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/quotest.cpp b/tests/quotest.cpp index 0a25dbc1..f3a09e41 100644 --- a/tests/quotest.cpp +++ b/tests/quotest.cpp @@ -384,12 +384,16 @@ TEST_IMPL(setTopic) const auto newTopic = c->generateTxnId(); // Just a way to get a unique id targetRoom->setTopic(newTopic); - connectUntil(targetRoom, &Room::topicChanged, this, - [this, newTopic] { - FINISH_TEST("State setting test", - targetRoom->topic() == newTopic); - return true; - }); + connectUntil(targetRoom, &Room::topicChanged, this, [this, newTopic] { + if (targetRoom->topic() == newTopic) + FINISH_TEST("State setting test", true); + else { + cout << "Requested topic was " << newTopic.toStdString() << ", " + << targetRoom->topic().toStdString() << " arrived instead" + << endl; + } + return true; + }); } TEST_IMPL(sendAndRedact) -- cgit v1.2.3