summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2svn <no_author@cvs2svn>2001-09-27 13:49:26 (GMT)
committercvs2svn <no_author@cvs2svn>2001-09-27 13:49:26 (GMT)
commit48948d51b9f47affcebd409ab41c5e04cf75fb5a (patch)
tree3672c9319f4fcbb7c45f7718573f8f62008b3b2c
parent413ed626c5423feabfbf9f5f7d63e49a98eb2f2e (diff)
downloadhdf5-48948d51b9f47affcebd409ab41c5e04cf75fb5a.zip
hdf5-48948d51b9f47affcebd409ab41c5e04cf75fb5a.tar.gz
hdf5-48948d51b9f47affcebd409ab41c5e04cf75fb5a.tar.bz2
[svn-r4483] This commit was manufactured by cvs2svn to create branch 'hdf5_1_4'.
-rwxr-xr-xbin/mkdirs26
-rw-r--r--test/tconfig.c183
2 files changed, 209 insertions, 0 deletions
diff --git a/bin/mkdirs b/bin/mkdirs
new file mode 100755
index 0000000..5590718
--- /dev/null
+++ b/bin/mkdirs
@@ -0,0 +1,26 @@
+#! /bin/sh
+#
+# Copyright (C) 2001
+# National Center for Supercomputing Applications
+# All rights reserved.
+#
+# This is a small program which will create directories n-levels deep.
+# You just call it with something like:
+#
+# mkdirs /tmp/foo/bar/baz
+#
+# and it will create all the directories from /tmp down to baz which
+# don't exist.
+#
+chmodprog="${CHMODPROG-chmod}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+make_dir () {
+ if test ! -d $1; then
+ make_dir `echo $1 | sed -e 's#/[^/]*$##'`
+ $mkdirprog $1
+ $chmodprog 755 $1
+ fi
+}
+
+make_dir `echo $1 | sed -e 's#/$##'`
diff --git a/test/tconfig.c b/test/tconfig.c
new file mode 100644
index 0000000..256fed4
--- /dev/null
+++ b/test/tconfig.c
@@ -0,0 +1,183 @@
+/****************************************************************************
+ * NCSA HDF *
+ * Scientic Data Team *
+ * National Center for Supercomputing Applications *
+ * University of Illinois at Urbana-Champaign *
+ * 605 E. Springfield, Champaign IL 61820 *
+ * *
+ * For conditions of distribution and use, see the accompanying *
+ * COPYING file. *
+ * *
+ ****************************************************************************/
+
+/* $Id$ */
+
+/***********************************************************
+*
+* Test program: tconfig
+*
+* Test the definitions in the H5config.h as much as possible
+*
+*************************************************************/
+
+#include "hdf5.h"
+#include "H5private.h"
+#include "testhdf5.h"
+
+/* macros definitions */
+/* verify C type sizes */
+#define vrfy_ctype(ctype, ctype_macro) \
+ if (sizeof(ctype) != ctype_macro){ \
+ print_func("Error verfying %s expected: %d, got: %d\n", \
+ #ctype_macro, ctype_macro, sizeof(ctype)); \
+ num_errs++; \
+ }
+
+/* local routine prototypes */
+void test_config_ctypes(void);
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_configure
+ *
+ * Purpose: Main configure definitions testing routine
+ *
+ * Return: none (error is fed back via global variable num_errs)
+ *
+ * Programmer: Albert Cheng
+ * September 25, 2001
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+test_configure(void)
+{
+ /* Output message about test being performed */
+ MESSAGE(5, ("Testing configure definitions\n"));
+ test_config_ctypes();
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: cleanup_configure
+ *
+ * Purpose: Cleanup temporary test files
+ *
+ * Return: none
+ *
+ * Programmer: Albert Cheng
+ * September 25, 2001
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+cleanup_configure(void)
+{
+ /* no file to clean */
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_config_ctypes
+ *
+ * Purpose: test C language data type sizes
+ *
+ * Return: none (error is fed back via global variable num_errs)
+ *
+ * Programmer: Albert Cheng
+ * September 25, 2001
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+test_config_ctypes(void)
+{
+ /* standard basic types */
+ vrfy_ctype(char, SIZEOF_CHAR);
+ vrfy_ctype(int, SIZEOF_INT);
+ vrfy_ctype(short, SIZEOF_SHORT);
+ vrfy_ctype(long, SIZEOF_LONG);
+ vrfy_ctype(float, SIZEOF_FLOAT);
+ vrfy_ctype(double, SIZEOF_DOUBLE);
+
+ /* non-standard basic types */
+#if SIZEOF_LONG_LONG > 0
+ vrfy_ctype(long long, SIZEOF_LONG_LONG);
+#endif
+
+#if SIZEOF_LONG_DOUBLE > 0
+ vrfy_ctype(long double, SIZEOF_LONG_DOUBLE);
+#endif
+
+#if SIZEOF_UINT8_T > 0
+ vrfy_ctype(uint8_t, SIZEOF_UINT8_T);
+#endif
+
+#if SIZEOF_UINT16_T > 0
+ vrfy_ctype(uint16_t, SIZEOF_UINT16_T);
+#endif
+
+#if SIZEOF_UINT32_T > 0
+ vrfy_ctype(uint32_t, SIZEOF_UINT32_T);
+#endif
+
+#if SIZEOF_UINT64_T > 0
+ vrfy_ctype(uint64_t, SIZEOF_UINT64_T);
+#endif
+
+#if SIZEOF_UINT_FAST8_T > 0
+ vrfy_ctype(uint_fast8_t, SIZEOF_UINT_FAST8_T);
+#endif
+
+#if SIZEOF_UINT_FAST16_T > 0
+ vrfy_ctype(uint_fast16_t, SIZEOF_UINT_FAST16_T);
+#endif
+
+#if SIZEOF_UINT_FAST32_T > 0
+ vrfy_ctype(uint_fast32_t, SIZEOF_UINT_FAST32_T);
+#endif
+
+#if SIZEOF_UINT_FAST64_T > 0
+ vrfy_ctype(uint_fast64_t, SIZEOF_UINT_FAST64_T);
+#endif
+
+#if SIZEOF_UINT_LEAST8_T > 0
+ vrfy_ctype(uint_least8_t, SIZEOF_UINT_LEAST8_T);
+#endif
+
+#if SIZEOF_UINT_LEAST16_T > 0
+ vrfy_ctype(uint_least16_t, SIZEOF_UINT_LEAST16_T);
+#endif
+
+#if SIZEOF_UINT_LEAST32_T > 0
+ vrfy_ctype(uint_least32_t, SIZEOF_UINT_LEAST32_T);
+#endif
+
+#if SIZEOF_UINT_LEAST64_T > 0
+ vrfy_ctype(uint_least64_t, SIZEOF_UINT_LEAST64_T);
+#endif
+
+ /* pseudo standard basic types */
+#if SIZEOF___INT64 > 0
+ vrfy_ctype(__int64, SIZEOF___INT64);
+#endif
+
+#if SIZEOF_OFF_T > 0
+ vrfy_ctype(off_t, SIZEOF_OFF_T);
+#endif
+
+#if SIZEOF_SIZE_T > 0
+ vrfy_ctype(size_t, SIZEOF_SIZE_T);
+#endif
+
+#if SIZEOF_SSIZE_T > 0
+ vrfy_ctype(ssize_t, SIZEOF_SSIZE_T);
+#endif
+
+}