diff options
author | deva <deva> | 2011-02-17 11:00:14 +0000 |
---|---|---|
committer | deva <deva> | 2011-02-17 11:00:14 +0000 |
commit | db144840aba95affb3a6b5b2536059f49f0677ff (patch) | |
tree | 1c397a20aa5745c6bbb5dee6a4409f58c4542e87 /server/src/queryhandlerpracro.cc | |
parent | c8651b8c89673300477ab86962640c93216ea306 (diff) |
Rewrite of all old tests to new unittest framework. Also some work on testdb; more to come...
Diffstat (limited to 'server/src/queryhandlerpracro.cc')
-rw-r--r-- | server/src/queryhandlerpracro.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/server/src/queryhandlerpracro.cc b/server/src/queryhandlerpracro.cc index 85dcdf9..d617e69 100644 --- a/server/src/queryhandlerpracro.cc +++ b/server/src/queryhandlerpracro.cc @@ -74,13 +74,21 @@ QueryResult QueryHandlerPracro::exec(Query &query) } #ifdef TEST_QUERYHANDLERPRACRO +//deps: database.cc mutex.cc debug.cc log.cc pracrodao.cc pracrodaotest.cc pracrodaopgsql.cc configuration.cc +//cflags: -I.. $(PQXX_CXXFLAGS) +//libs: $(PQXX_LIBS) +#include <test.h> #include <time.h> #define PATIENTID "1234567890" -int main() -{ +TEST_BEGIN; + +// TODO: Put some testcode here (see test.h for usable macros). +TEST_TRUE(false, "No tests yet!"); + +/* time_t now = time(NULL); Database db("testdb", "", "", "", "", ""); Macro macro; @@ -122,8 +130,7 @@ int main() if(res.timestamp != now - 100) return 1; if(res.source != "pracrodb") return 1; if(res.values["myfield"] != "myval") return 1; - - return 0; -} +*/ +TEST_END; #endif/*TEST_QUERYHANDLERPRACRO*/ |