- Tester body written
authorJan Hutter <jhutter@hsr.ch>
Thu, 3 Nov 2005 08:56:04 +0000 (08:56 -0000)
committerJan Hutter <jhutter@hsr.ch>
Thu, 3 Nov 2005 08:56:04 +0000 (08:56 -0000)
Source/charon/daemon.c
Source/charon/tester.c

index 24e0621..aaba851 100644 (file)
  * for more details.
  */
  
  * for more details.
  */
  
+#include <stdio.h>
  
  
+#include "types.h"
+#include "tester.h"
+
+/* output for test messages */
+extern FILE * stderr;
  
 int main()
 {
  
 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;
 }
  
 }
  
index 65e5c4c..a0fbc2d 100644 (file)
@@ -35,9 +35,13 @@ typedef struct {
 } private_tester_t;
  
  
 } 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;
 }
  
        return SUCCESS;
 }
  
@@ -57,5 +61,5 @@ tester_t *tester_create(FILE *output)
        
        this->output = output;
        
        
        this->output = output;
        
-       return SUCCESS;
+       return &(this->tester);
 }
 }