- Tester body written
This commit is contained in:
+17
-3
@@ -20,13 +20,27 @@
|
|||||||
* 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;
|
||||||
|
|
||||||
return 0;
|
tester_t *tester = tester_create(test_output);
|
||||||
|
|
||||||
|
tester->test_all(tester);
|
||||||
|
|
||||||
|
if (tester->destroy(tester) == SUCCESS)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user