Ver Fonte

Added unit tests for number in string to value conversions.

Evgeny Grin (Karlson2k) há 9 anos atrás
pai
commit
8433e1cbbf
4 ficheiros alterados com 2723 adições e 3 exclusões
  1. 1 1
      configure.ac
  2. 4 0
      src/microhttpd/Makefile.am
  3. 2713 2
      src/microhttpd/unit_str_test.c
  4. 5 0
      w32/common/MHD_config.h

+ 1 - 1
configure.ac

@@ -421,7 +421,7 @@ fi
 AC_CHECK_HEADERS([fcntl.h math.h errno.h limits.h stdio.h locale.h sys/stat.h sys/types.h pthread.h],,AC_MSG_ERROR([Compiling libmicrohttpd requires standard UNIX headers files]))
 
 # Check for optional headers
-AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h netdb.h netinet/in.h netinet/tcp.h time.h sys/socket.h sys/mman.h arpa/inet.h sys/select.h search.h endian.h machine/endian.h sys/endian.h sys/param.h sys/machine.h sys/byteorder.h machine/param.h sys/isa_defs.h])
+AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h netdb.h netinet/in.h netinet/tcp.h time.h sys/socket.h sys/mman.h arpa/inet.h sys/select.h search.h endian.h machine/endian.h sys/endian.h sys/param.h sys/machine.h sys/byteorder.h machine/param.h sys/isa_defs.h inttypes.h])
 AM_CONDITIONAL([HAVE_TSEARCH], [test "x$ac_cv_header_search_h" = "xyes"])
 
 AC_CHECK_MEMBER([struct sockaddr_in.sin_len],

+ 4 - 0
src/microhttpd/Makefile.am

@@ -142,6 +142,7 @@ endif
 
 check_PROGRAMS = \
   unit_str_compare \
+  unit_str_to_value \
   test_shutdown_select \
   test_shutdown_poll \
   test_daemon
@@ -209,3 +210,6 @@ endif
 
 unit_str_compare_SOURCES = \
   unit_str_test.c test_helpers.h mhd_str.c
+
+unit_str_to_value_SOURCES = \
+  unit_str_test.c test_helpers.h mhd_str.c

Diff do ficheiro suprimidas por serem muito extensas
+ 2713 - 2
src/microhttpd/unit_str_test.c


+ 5 - 0
w32/common/MHD_config.h

@@ -87,6 +87,11 @@
 #define HAVE_SNPRINTF 1
 #endif
 
+#if _MSC_VER >= 1800
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+#endif
+
 
 /* *** Headers information *** */
 /* Not really important as not used by code currently */

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff