From a35a5d3bc885a507078ddbdfcf7c155e2e0c62ed Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Tue, 20 Oct 2015 08:02:46 +0100 Subject: [PATCH] Test: add typedef for a widely used type --- test/Integration.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/Integration.cpp b/test/Integration.cpp index f626bc41..7fef7644 100644 --- a/test/Integration.cpp +++ b/test/Integration.cpp @@ -92,6 +92,8 @@ IO WrapIO(Device* d) { return IO(d); } +using Socket = IO; + class Process : public IO { public: Process(QString cmd, QStringList args, bool interactive) : IO(&m_proc, true) { @@ -151,12 +153,12 @@ protected: ASSERT_TRUE(m_server.listen(QHostAddress::LocalHost, 6667)) << m_server.errorString().toStdString();Z; } - IO ConnectIRCd() { + Socket ConnectIRCd() { [this]{ ASSERT_TRUE(m_server.waitForNewConnection(30000 /* msec */)); }(); return WrapIO(m_server.nextPendingConnection()); } - IO ConnectClient() { + Socket ConnectClient() { m_clients.emplace_back(); QTcpSocket& sock = m_clients.back(); sock.connectToHost("127.0.0.1", 12345); @@ -168,7 +170,7 @@ protected: return std::unique_ptr(new Process("./znc", QStringList() << "--debug" << "--datadir" << m_dir.path(), false)); } - IO LoginClient() { + Socket LoginClient() { auto client = ConnectClient(); client.Write("PASS :hunter2"); client.Write("NICK nick");