changing support_finalize to return status.
Start to put in a unit test for the list functionality. This commit was SVN r390.
Этот коммит содержится в:
родитель
b6457fdaa9
Коммит
99d52894f6
@ -536,6 +536,8 @@ AC_CONFIG_FILES([
|
||||
|
||||
test/Makefile
|
||||
test/support/Makefile
|
||||
test/lam/Makefile
|
||||
test/lam/lfc/Makefile
|
||||
test/unit/Makefile
|
||||
test/unit/lam/Makefile
|
||||
test/unit/lam/oob_cofs/Makefile
|
||||
|
@ -5,4 +5,4 @@
|
||||
|
||||
include $(top_srcdir)/config/Makefile.options
|
||||
|
||||
SUBDIRS = support
|
||||
SUBDIRS = support lam
|
||||
|
8
test/lam/Makefile.am
Обычный файл
8
test/lam/Makefile.am
Обычный файл
@ -0,0 +1,8 @@
|
||||
# -*- makefile -*-
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
include $(top_srcdir)/config/Makefile.options
|
||||
|
||||
SUBDIRS = lfc
|
15
test/lam/lfc/Makefile.am
Обычный файл
15
test/lam/lfc/Makefile.am
Обычный файл
@ -0,0 +1,15 @@
|
||||
# -*- makefile -*-
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
include $(top_srcdir)/config/Makefile.options
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/test/support
|
||||
|
||||
noinst_PROGRAMS = list_test
|
||||
|
||||
list_test_SOURCES = list_test.c
|
||||
list_test_LDADD = \
|
||||
$(top_builddir)/test/support/libsupport.la
|
||||
list_test_DEPENDENCIES = $(list_test_LDADD)
|
||||
|
12
test/lam/lfc/list_test.c
Обычный файл
12
test/lam/lfc/list_test.c
Обычный файл
@ -0,0 +1,12 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "support.h"
|
||||
#include "lam/lfc/list.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
test_init("List");
|
||||
test_finalize();
|
||||
}
|
@ -76,9 +76,13 @@ int test_verify(char *expected_result, char *test_result){
|
||||
return return_value;
|
||||
}
|
||||
|
||||
void test_finalize(void)
|
||||
int test_finalize(void)
|
||||
{
|
||||
|
||||
int return_value;
|
||||
|
||||
return_value=1;
|
||||
|
||||
if( lam_n_tests == lam_n_success) {
|
||||
fprintf(stderr," SUPPORT :: LAM Test Passed :: %s \n",lam_description);
|
||||
fflush(stderr);
|
||||
@ -86,6 +90,9 @@ void test_finalize(void)
|
||||
fprintf(stderr," SUPPORT :: LAM Test failed :: %s :: %d of %d failed\n"
|
||||
,lam_description,lam_n_failures,lam_n_tests);
|
||||
fflush(stderr);
|
||||
return_value=0;
|
||||
}
|
||||
|
||||
return return_value;
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ void test_init(char *a);
|
||||
void test_success(void);
|
||||
void test_failure(char *a);
|
||||
int test_verify(char *expected_result, char *test_result);
|
||||
void test_finalize(void);
|
||||
int test_finalize(void);
|
||||
|
||||
#endif /* LAM_SUPPORT_H */
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user