From 5d04dc4701de55e634898882ea5ca620fdeaaf96 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 15 Nov 2004 04:02:24 +0000 Subject: [PATCH] * libyasm/tests/Makefile.inc: Build bitvect_test and floatnum_test with standard CFLAGS and LDFLAGS, and as check_PROGRAMS, not noinst_PROGRAMS. * bitvect_test.c: Update with prototypes to avoid compiler warnings. * floatnum_test.c: Likewise. svn path=/trunk/yasm/; revision=1179 --- libyasm/tests/Makefile.inc | 8 ++------ libyasm/tests/bitvect_test.c | 12 ++++++------ libyasm/tests/floatnum_test.c | 22 +++++++++++----------- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/libyasm/tests/Makefile.inc b/libyasm/tests/Makefile.inc index b8a55284..83b79fd3 100644 --- a/libyasm/tests/Makefile.inc +++ b/libyasm/tests/Makefile.inc @@ -14,16 +14,12 @@ EXTRA_DIST += libyasm/tests/unary.asm EXTRA_DIST += libyasm/tests/unary.errwarn EXTRA_DIST += libyasm/tests/unary.hex -noinst_PROGRAMS += bitvect_test -noinst_PROGRAMS += floatnum_test +check_PROGRAMS += bitvect_test +check_PROGRAMS += floatnum_test -bitvect_test_CFLAGS = bitvect_test_SOURCES = libyasm/tests/bitvect_test.c -bitvect_test_LDFLAGS = bitvect_test_LDADD = libyasm.la @LIBLTDL@ $(INTLLIBS) @LIBADD_DL@ -floatnum_test_CFLAGS = floatnum_test_SOURCES = libyasm/tests/floatnum_test.c -floatnum_test_LDFLAGS = floatnum_test_LDADD = libyasm.la @LIBLTDL@ $(INTLLIBS) @LIBADD_DL@ diff --git a/libyasm/tests/bitvect_test.c b/libyasm/tests/bitvect_test.c index 703d0b47..19d11bad 100644 --- a/libyasm/tests/bitvect_test.c +++ b/libyasm/tests/bitvect_test.c @@ -24,7 +24,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H -# include "config.h" +# include #endif #ifdef STDC_HEADERS @@ -37,7 +37,7 @@ #include "libyasm/bitvect.h" static int -test_boot() +test_boot(void) { if (BitVector_Boot() != ErrCode_Ok) return 1; @@ -122,7 +122,7 @@ num_check(Val *val) } static int -test_oct_small_num() +test_oct_small_num(void) { Val *vals = oct_small_vals; int i, num = sizeof(oct_small_vals)/sizeof(Val); @@ -135,7 +135,7 @@ test_oct_small_num() } static int -test_oct_large_num() +test_oct_large_num(void) { Val *vals = oct_large_vals; int i, num = sizeof(oct_large_vals)/sizeof(Val); @@ -148,8 +148,8 @@ test_oct_large_num() } static int -runtest_(char *testname, int (*testfunc)(), void (*setup)(), - void (*teardown)()) +runtest_(const char *testname, int (*testfunc)(void), void (*setup)(void), + void (*teardown)(void)) { int nf; printf("bitvect_test: Testing libyasm bitvect for %s ... ", testname); diff --git a/libyasm/tests/floatnum_test.c b/libyasm/tests/floatnum_test.c index 4ce7df2d..421292b0 100644 --- a/libyasm/tests/floatnum_test.c +++ b/libyasm/tests/floatnum_test.c @@ -24,7 +24,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #ifdef HAVE_CONFIG_H -# include "config.h" +# include #endif #ifdef STDC_HEADERS @@ -193,7 +193,7 @@ new_check_flt(Init_Entry *val) } static int -test_new_normalized() +test_new_normalized(void) { Init_Entry *vals = normalized_vals; int i, num = sizeof(normalized_vals)/sizeof(Init_Entry); @@ -208,7 +208,7 @@ test_new_normalized() } static int -test_new_normalized_edgecase() +test_new_normalized_edgecase(void) { Init_Entry *vals = normalized_edgecase_vals; int i, num = sizeof(normalized_edgecase_vals)/sizeof(Init_Entry); @@ -287,7 +287,7 @@ get_common_check_result(int len, const unsigned char *val, */ static int -test_get_single_normalized() +test_get_single_normalized(void) { unsigned char outval[4]; Init_Entry *vals = normalized_vals; @@ -305,7 +305,7 @@ test_get_single_normalized() } static int -test_get_single_normalized_edgecase() +test_get_single_normalized_edgecase(void) { unsigned char outval[4]; Init_Entry *vals = normalized_edgecase_vals; @@ -327,7 +327,7 @@ test_get_single_normalized_edgecase() */ static int -test_get_double_normalized() +test_get_double_normalized(void) { unsigned char outval[8]; Init_Entry *vals = normalized_vals; @@ -345,7 +345,7 @@ test_get_double_normalized() } static int -test_get_double_normalized_edgecase() +test_get_double_normalized_edgecase(void) { unsigned char outval[8]; Init_Entry *vals = normalized_edgecase_vals; @@ -367,7 +367,7 @@ test_get_double_normalized_edgecase() */ static int -test_get_extended_normalized() +test_get_extended_normalized(void) { unsigned char outval[10]; Init_Entry *vals = normalized_vals; @@ -385,7 +385,7 @@ test_get_extended_normalized() } static int -test_get_extended_normalized_edgecase() +test_get_extended_normalized_edgecase(void) { unsigned char outval[10]; Init_Entry *vals = normalized_edgecase_vals; @@ -403,8 +403,8 @@ test_get_extended_normalized_edgecase() } static int -runtest_(char *testname, int (*testfunc)(), void (*setup)(), - void (*teardown)()) +runtest_(const char *testname, int (*testfunc)(void), void (*setup)(void), + void (*teardown)(void)) { int nf; printf("floatnum_test: Testing for %s ... ", testname); -- 2.40.0