aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-10-18 09:03:06 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-10-18 10:25:14 +0900
commitff78cd3370eccf593be789677dd8c4e2cdcea173 (patch)
tree39ef3b6b32cdab42ad4348628e63d14d0e07ec3d
parentd59ca7ac194e8d57177afb1ac89603e22b61b4ec (diff)
downloadlibquotient-ff78cd3370eccf593be789677dd8c4e2cdcea173.tar.gz
libquotient-ff78cd3370eccf593be789677dd8c4e2cdcea173.zip
TestManager::setTopic: add debug logging
-rw-r--r--tests/quotest.cpp16
1 files changed, 10 insertions, 6 deletions
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)