diff --git a/test/util/Makefile.am b/test/util/Makefile.am index b4ed813e5f..24400000bd 100644 --- a/test/util/Makefile.am +++ b/test/util/Makefile.am @@ -25,7 +25,8 @@ ompi_numtostr_LDADD = \ $(top_builddir)/src/threads/mutex_pthread.lo \ $(top_builddir)/src/threads/mutex_spinlock.lo \ $(top_builddir)/src/threads/mutex_spinwait.lo \ - $(top_builddir)/src/util/numtostr.lo + $(top_builddir)/src/util/numtostr.lo \ + $(top_builddir)/test/support/libsupport.la ompi_numtostr_DEPENDENCIES = $(ompi_numtostr_LDADD) ompi_argv_SOURCES = ompi_argv.c diff --git a/test/util/ompi_numtostr.c b/test/util/ompi_numtostr.c index b3f3921e51..73de00469c 100644 --- a/test/util/ompi_numtostr.c +++ b/test/util/ompi_numtostr.c @@ -4,19 +4,26 @@ #include #include +#include "support.h" + int main(int argc, char *argv[]) { char * tst; char * expected; + + test_init("ompi_numtostr_t"); tst = ltostr(10); expected = malloc(sizeof(long) * 8); snprintf(expected, sizeof(long) * 8, "%d", 10); if (strcmp(tst, expected) != 0) { - exit(1); + test_failure("ltostr test failed"); } - + else { + test_success(); + } + free(tst); free(expected); @@ -24,8 +31,13 @@ main(int argc, char *argv[]) expected = malloc(sizeof(long) * 8); snprintf(expected, sizeof(long) * 8, "%f", 5.32); if (strcmp(tst, expected) != 0) { - exit(1); + test_failure("dtostr test failed"); } + else { + test_success(); + } + + test_finalize(); return 0; -} \ No newline at end of file +}