aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/charon/daemon.c20
-rw-r--r--Source/charon/tester.c10
2 files changed, 24 insertions, 6 deletions
diff --git a/Source/charon/daemon.c b/Source/charon/daemon.c
index 24e062134..aaba8518b 100644
--- a/Source/charon/daemon.c
+++ b/Source/charon/daemon.c
@@ -20,13 +20,27 @@
* for more details.
*/
+#include <stdio.h>
-
-
+#include "types.h"
+#include "tester.h"
+
+/* output for test messages */
+extern FILE * stderr;
int main()
{
+ FILE * test_output = stderr;
+
+ tester_t *tester = tester_create(test_output);
+
+ tester->test_all(tester);
- return 0;
+ if (tester->destroy(tester) == SUCCESS)
+ {
+ return -1;
+ }
+
+ return 0;
}
diff --git a/Source/charon/tester.c b/Source/charon/tester.c
index 65e5c4cb4..a0fbc2d42 100644
--- a/Source/charon/tester.c
+++ b/Source/charon/tester.c
@@ -35,9 +35,13 @@ typedef struct {
} private_tester_t;
-static status_t test_all(tester_t *this)
+static status_t test_all(tester_t *tester)
{
-
+ private_tester_t *this =(private_tester_t*) tester;
+
+ fprintf(this->output,"Start testing\n");
+
+ fprintf(this->output,"End testing\n");
return SUCCESS;
}
@@ -57,5 +61,5 @@ tester_t *tester_create(FILE *output)
this->output = output;
- return SUCCESS;
+ return &(this->tester);
}