summaryrefslogtreecommitdiff
path: root/server/src/pracrodaopgsql.cc
diff options
context:
space:
mode:
authordeva <deva>2011-02-17 11:00:14 +0000
committerdeva <deva>2011-02-17 11:00:14 +0000
commitdb144840aba95affb3a6b5b2536059f49f0677ff (patch)
tree1c397a20aa5745c6bbb5dee6a4409f58c4542e87 /server/src/pracrodaopgsql.cc
parentc8651b8c89673300477ab86962640c93216ea306 (diff)
Rewrite of all old tests to new unittest framework. Also some work on testdb; more to come...
Diffstat (limited to 'server/src/pracrodaopgsql.cc')
-rw-r--r--server/src/pracrodaopgsql.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/server/src/pracrodaopgsql.cc b/server/src/pracrodaopgsql.cc
index b71f8e7..b8fb505 100644
--- a/server/src/pracrodaopgsql.cc
+++ b/server/src/pracrodaopgsql.cc
@@ -534,13 +534,21 @@ void PracroDAOPgsql::setActive(std::string sessionid, bool a)
#endif/*WITHOUT_DB*/
#ifdef TEST_PRACRODAOPGSQL
+//deps: debug.cc log.cc configuration.cc exception.cc pracrodao.cc
+//cflags: -I.. $(PQXX_CXXFLAGS)
+//libs: $(PQXX_LIBS)
+#include <test.h>
#include "configuration.h"
#include "exception.h"
-int main()
-{
+TEST_BEGIN;
+
+// TODO: Put some testcode here (see test.h for usable macros).
+TEST_TRUE(false, "No tests yet!");
+
#ifndef WITHOUT_DB
+/*
try {
PracroDAOPgsql db(Conf::database_addr, "", Conf::database_user,
Conf::database_passwd, "");
@@ -548,7 +556,9 @@ int main()
printf("ERROR: %s\n", e.what());
return 1;
}
+*/
#endif/*WITHOUT_DB*/
- return 0;
-}
+
+TEST_END;
+
#endif/*TEST_PRACRODAOPGSQL*/