From 7e349e2789a633a6014baea63aeb7932e024c917 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 22 Jul 2009 15:00:29 +0000 Subject: Changed the way the macros are looked up in the filesystem (now they are parsed and indexed using version numbers). Updated all unit tests, to compile and run again. --- server/src/queryparser.cc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'server/src/queryparser.cc') diff --git a/server/src/queryparser.cc b/server/src/queryparser.cc index 76b24a6..2b0dbdc 100644 --- a/server/src/queryparser.cc +++ b/server/src/queryparser.cc @@ -80,7 +80,8 @@ void QueryParser::parseError(char *buf, size_t len, std::string error, int linen #ifdef TEST_QUERYPARSER -#include "queryhandler.h" +#include "queryhandlerpentominos.h" +#include "tcpsocket.h" static std::string loadresultstring(QueryResult &res, std::string group = "") { @@ -107,20 +108,15 @@ int main() TCPSocket s; s.connect("localhost", 11108); - QueryHandler qh(&s, "2003791613"); + QueryHandlerPentominos qh(&s, "2003791613"); Query q1; q1.attributes["device_id"] = "lensmeter"; q1.attributes["device_type"] = "lensmeter"; - std::string res = qh.exec(); + QueryResult res = qh.exec(q1); - printf("%s\n", res.c_str()); - - QueryParser e(res); - e.parse(); - - printf("%s\n", loadresultstring(e.result).c_str()); + printf("%s\n", loadresultstring(res).c_str()); return 0; } -- cgit v1.2.3