From 01bedc62e1e115455cac65615cf66946c25f73a6 Mon Sep 17 00:00:00 2001 From: Laura Casswell Date: Mon, 9 Aug 2004 21:07:24 +0000 Subject: [PATCH] add use of test support functions and reporting This commit was SVN r1980. --- test/util/ompi_argv.c | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/test/util/ompi_argv.c b/test/util/ompi_argv.c index 273a72ed07..df63fa5018 100644 --- a/test/util/ompi_argv.c +++ b/test/util/ompi_argv.c @@ -6,6 +6,7 @@ #include #include +#include "support.h" #include "ompi_config.h" #include "include/constants.h" #include "util/argv.h" @@ -22,15 +23,37 @@ static bool test8(void); int main(int argc, char* argv[]) { + + test_init("ompi_argv_t"); + + if( test1() ) test_success(); + else test_failure("test1 argv test failed"); + + if( test2() ) test_success(); + else test_failure("test2 argv test failed"); + + if( test3() ) test_success(); + else test_failure("test3 argv test failed"); + + if( test4() ) test_success(); + else test_failure("test4 argv test failed"); + + if( test5() ) test_success(); + else test_failure("test5 argv test failed"); + + if( test6() ) test_success(); + else test_failure("test6 argv test failed"); + + if( test7() ) test_success(); + else test_failure("test7 argv test failed"); + + if( test8() ) test_success(); + else test_failure("test8 argv test failed"); + + /* All done */ + test_finalize(); - if (!test1() || !test2() || !test3() || !test4() || !test5() || !test6() || - !test7() || !test8()) { - printf("test failed\n"); - return -1; - } - - printf("test succeeded\n"); return 0; }