X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftest%2Fi18n_atof.c;h=1e75bf78a24ea544d4a812ca68a9058a91adf16a;hb=9365e5b08acc788b1ddb55b9b62152572146f8f4;hp=b7307eeca5bf61b1148a3140bd5c6d208f155d9f;hpb=d6b95124a6a823cce9491d5218070336b08e71c2;p=vlc diff --git a/src/test/i18n_atof.c b/src/test/i18n_atof.c index b7307eeca5..1e75bf78a2 100644 --- a/src/test/i18n_atof.c +++ b/src/test/i18n_atof.c @@ -1,5 +1,5 @@ /***************************************************************************** - * i18n_atof.c: Test for i18n_atof + * i18n_atof.c: Test for us_atof ***************************************************************************** * Copyright (C) 2006 Rémi Denis-Courmont * $Id$ @@ -19,8 +19,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#include -#include "charset.h" +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include "vlc_charset.h" #undef NDEBUG #include @@ -32,16 +36,6 @@ int main (void) const char sharp9[] = "999999#999999"; char *end; - assert (i18n_atof("0") == 0.); - assert (i18n_atof("1") == 1.); - assert (i18n_atof("1.") == 1.); - assert (i18n_atof("1,") == 1.); - assert (i18n_atof("1#") == 1.); - assert (i18n_atof(dot9) == 999999.999999); - assert (i18n_atof(comma9) == 999999.999999); - assert (i18n_atof(sharp9) == 999999.); - assert (i18n_atof("invalid") == 0.); - assert (us_atof("0") == 0.); assert (us_atof("1") == 1.); assert (us_atof("1.") == 1.); @@ -52,13 +46,6 @@ int main (void) assert (us_atof(sharp9) == 999999.); assert (us_atof("invalid") == 0.); - assert ((i18n_strtod(dot9, &end ) == 999999.999999) - && (*end == '\0')); - assert ((i18n_strtod(comma9, &end ) == 999999.999999) - && (*end == '\0')); - assert ((i18n_strtod(sharp9, &end ) == 999999.) - && (*end == '#')); - assert ((us_strtod(dot9, &end ) == 999999.999999) && (*end == '\0')); assert ((us_strtod(comma9, &end ) == 999999.)