1 #include "testProtocolCommon.h"
4 #include <jsonprotocol.h>
6 #include <QLocalSocket>
7 #include <QLocalServer>
8 #include <QCoreApplication>
13 void runTest(amb::AmbRemoteClient *c)
15 DebugOut(0) << "calling client->list()" << endl;
16 c->list([](std::vector<amb::Object> supported)
18 DebugOut(0) << "list call reply" << endl;
19 g_assert(supported.size() == 2);
22 DebugOut(0) << "calling client->get()" << endl;
23 c->get("interface1", [](amb::Object &obj)
25 DebugOut(0) << "get call reply" << endl;
26 g_assert(obj.size() == 2);
30 int main(int argc, char** argv)
32 DebugOut::setDebugThreshhold(7);
33 DebugOut::setThrowErr(true);
34 DebugOut::setThrowWarn(false);
36 DebugOut(0) << "Testing AMB json server/client" << endl;
38 QCoreApplication app(argc, argv);
44 socket.getSocket()->waitForConnected();
46 DebugOut(0) << "We are connected!" << endl;
48 amb::AmbRemoteClient client(&socket);