From: RĂ©mi Denis-Courmont Date: Sun, 27 Nov 2011 11:55:34 +0000 (+0200) Subject: Move MD5 test to src/ X-Git-Tag: 1.3.0-git~6 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=98aa3f7066d2b40d087414dd25c1a249c79a8e58;p=vlc Move MD5 test to src/ --- diff --git a/src/test/Makefile.am b/src/test/Makefile.am index 215029b6ba..71f67681dc 100644 --- a/src/test/Makefile.am +++ b/src/test/Makefile.am @@ -4,6 +4,7 @@ check_PROGRAMS = \ test_block \ test_dictionary \ test_i18n_atof \ + test_md5 \ test_timer \ test_url \ test_utf8 \ @@ -22,6 +23,7 @@ test_block_DEPENDENCIES = test_dictionary_SOURCES = dictionary.c test_i18n_atof_SOURCES = i18n_atof.c +test_md5_SOURCES = md5.c test_timer_SOURCES = timer.c test_url_SOURCES = url.c test_utf8_SOURCES = utf8.c diff --git a/test/src/misc/md5.c b/src/test/md5.c similarity index 90% rename from test/src/misc/md5.c rename to src/test/md5.c index 20141643ec..2f829068bb 100644 --- a/test/src/misc/md5.c +++ b/src/test/md5.c @@ -21,11 +21,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ +#ifdef HAVE_CONFIG_H +# include +#endif + #include #include -#include "../../libvlc/test.h" - #include #include @@ -60,15 +62,18 @@ static void test_config_StringEscape() EndMD5( &md5 ); char * psz_hash = psz_md5_hash( &md5 ); - printf( "Output: %s, Expected: %s\n", psz_hash, md5_samples[i].psz_md5 ); - assert( !strcmp( psz_hash, md5_samples[i].psz_md5 ) ); + if( strcmp( psz_hash, md5_samples[i].psz_md5 ) ) + { + printf( "Output: %s\nExpected: %s\n", psz_hash, + md5_samples[i].psz_md5 ); + abort(); + } free( psz_hash ); } } int main( void ) { - log( "Testing md5 calculation\n" ); test_config_StringEscape(); return 0; diff --git a/test/Makefile.am b/test/Makefile.am index 86e2b61553..338c0740a7 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -18,7 +18,6 @@ check_PROGRAMS = \ test_libvlc_media_list \ test_libvlc_media_player \ test_src_config_chain \ - test_src_misc_md5 \ test_src_misc_variables \ $(NULL) @@ -73,8 +72,6 @@ test_src_misc_variables_SOURCES = src/misc/variables.c test_src_misc_variables_LDADD = $(LIBVLCCORE) $(LIBVLC) test_src_config_chain_SOURCES = src/config/chain.c test_src_config_chain_LDADD = $(LIBVLCCORE) -test_src_misc_md5_SOURCES = src/misc/md5.c -test_src_misc_md5_LDADD = $(LIBVLCCORE) checkall: $(MAKE) check_PROGRAMS="$(check_PROGRAMS) $(EXTRA_PROGRAMS)" check