diff -Nru cunit-2.1-0.dfsg/CUnit/Headers/Automated.h cunit-2.1-2.dfsg/CUnit/Headers/Automated.h
--- cunit-2.1-0.dfsg/CUnit/Headers/Automated.h 2006-01-30 03:48:26.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Headers/Automated.h 2006-04-28 23:21:43.000000000 +0000
@@ -1,7 +1,7 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -23,7 +23,7 @@
*
* Feb 2002 Initial implementation (AK)
*
- * 13/Feb/2002 Single interface to automated_run_tests. (AK)
+ * 13-Feb-2002 Single interface to automated_run_tests. (AK)
*
* 20-Jul-2004 New interface, doxygen comments. (JDS)
*/
@@ -45,9 +45,36 @@
extern "C" {
#endif
-CU_EXPORT void CU_automated_run_tests(void);
+CU_EXPORT void CU_automated_run_tests(void);
+/**<
+ * Runs CUnit tests using the automated interface.
+ * This function sets appropriate callback functions, initializes the
+ * test output files, and calls the appropriate functions to list the
+ * tests and run them. If an output file name root has not been
+ * specified using CU_set_output_filename(), a generic root will be
+ * applied. It is an error to call this function before the CUnit
+ * test registry has been initialized (check by assertion).
+ */
+
CU_EXPORT CU_ErrorCode CU_list_tests_to_file(void);
-CU_EXPORT void CU_set_output_filename(const char* szFilenameRoot);
+/**<
+ * Generates an xml file containing a list of all tests in all suites
+ * in the active registry. The output file will be named according to
+ * the most recent call to CU_set_output_filename(), or a default if
+ * not previously set.
+ *
+ * @return An error code indicating the error status.
+ */
+
+CU_EXPORT void CU_set_output_filename(const char* szFilenameRoot);
+/**<
+ * Sets the root file name for automated test output files.
+ * The strings "-Listing.xml" and "-Results.xml" are appended to the
+ * specified root to generate the filenames. If szFilenameRoot is
+ * empty, the default root ("CUnitAutomated") is used.
+ *
+ * @param szFilenameRoot String containing root to use for file names.
+ */
#ifdef USE_DEPRECATED_CUNIT_NAMES
/** Deprecated (version 1). @deprecated Use CU_automated_run_tests(). */
diff -Nru cunit-2.1-0.dfsg/CUnit/Headers/Basic.h cunit-2.1-2.dfsg/CUnit/Headers/Basic.h
--- cunit-2.1-0.dfsg/CUnit/Headers/Basic.h 2006-01-30 03:48:26.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Headers/Basic.h 2006-04-28 23:21:43.000000000 +0000
@@ -1,6 +1,6 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2004,2005,2006 Jerry St.Clair
+ * Copyright (C) 2004-2006 Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -47,12 +47,64 @@
CU_BRM_VERBOSE /**< Verbose mode - maximum output of run details. */
} CU_BasicRunMode;
-CU_EXPORT CU_ErrorCode CU_basic_run_tests(void);
-CU_EXPORT CU_ErrorCode CU_basic_run_suite(CU_pSuite pSuite);
-CU_EXPORT CU_ErrorCode CU_basic_run_test(CU_pSuite pSuite, CU_pTest pTest);
-CU_EXPORT void CU_basic_set_mode(CU_BasicRunMode mode);
+CU_EXPORT CU_ErrorCode CU_basic_run_tests(void);
+/**<
+ * Runs all registered CUnit tests using the basic interface.
+ * The default CU_BasicRunMode is used unless it has been
+ * previously changed using CU_basic_set_mode(). The CUnit test
+ * registry must have been initialized before calling this function.
+ *
+ * @return A CU_ErrorCode indicating the framework error condition, including
+ * CUE_NOREGISTRY - Registry has not been initialized.
+ */
+
+CU_EXPORT CU_ErrorCode CU_basic_run_suite(CU_pSuite pSuite);
+/**<
+ * Runs all tests for a specific suite in the basic interface.
+ * If pSuite is NULL, the function returns without taking any
+ * action. The default CU_BasicRunMode is used unless it has
+ * been changed using CU_basic_set_mode().
+ *
+ * @param pSuite The CU_Suite to run.
+ * @return A CU_ErrorCode indicating the framework error condition, including
+ * CUE_NOSUITE - pSuite was NULL.
+ */
+
+CU_EXPORT CU_ErrorCode CU_basic_run_test(CU_pSuite pSuite, CU_pTest pTest);
+/**<
+ * Runs a single test in a specific suite in the basic interface.
+ * If pSuite or pTest is NULL, the function returns without
+ * taking any action. The default CU_BasicRunMode is used unless
+ * it has been changed using CU_basic_set_mode.
+ *
+ * @param pSuite The CU_Suite holding the CU_Test to run.
+ * @param pTest The CU_Test to run.
+ * @return A CU_ErrorCode indicating the framework error condition, including
+ * CUE_NOSUITE - pSuite was NULL.
+ * CUE_NOTEST - pTest was NULL.
+ */
+
+CU_EXPORT void CU_basic_set_mode(CU_BasicRunMode mode);
+/**< Sets the run mode for the basic interface.
+ * @param mode The new CU_BasicRunMode for subsequent test
+ * runs using the basic interface.
+ */
+
CU_EXPORT CU_BasicRunMode CU_basic_get_mode(void);
-CU_EXPORT void CU_basic_show_failures(CU_pFailureRecord pFailure);
+/**< Retrieves the current run mode for the basic interface.
+ * @return The current CU_BasicRunMode setting for test
+ * runs using the basic interface.
+ */
+
+CU_EXPORT void CU_basic_show_failures(CU_pFailureRecord pFailure);
+/**<
+ * Prints a summary of run failures to stdout.
+ * This is provided for user convenience upon request, and does
+ * not take into account the current run mode. The failures are
+ * printed to stdout independent of the most recent run mode.
+ *
+ * @param pFailure List of CU_pFailureRecord's to output.
+ */
#ifdef __cplusplus
}
diff -Nru cunit-2.1-0.dfsg/CUnit/Headers/CUCurses.h cunit-2.1-2.dfsg/CUnit/Headers/CUCurses.h
--- cunit-2.1-0.dfsg/CUnit/Headers/CUCurses.h 2006-01-30 03:48:26.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Headers/CUCurses.h 2006-05-19 21:57:27.000000000 +0000
@@ -1,7 +1,7 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -19,7 +19,7 @@
*/
/*
- * Contains Interface for console Run tests.
+ * Contains Interface for curses Run tests.
*
* Aug 2001 Initial implementation. (AK)
*
@@ -48,6 +48,7 @@
#endif
CU_EXPORT void CU_curses_run_tests(void);
+/**< Run registered CUnit tests using the curses interface. */
#ifdef USE_DEPRECATED_CUNIT_NAMES
/** Deprecated (version 1). @deprecated Use CU_curses_run_tests(). */
diff -Nru cunit-2.1-0.dfsg/CUnit/Headers/CUError.h cunit-2.1-2.dfsg/CUnit/Headers/CUError.h
--- cunit-2.1-0.dfsg/CUnit/Headers/CUError.h 2006-01-30 03:48:26.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Headers/CUError.h 2006-04-20 02:15:46.000000000 +0000
@@ -1,7 +1,7 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -74,12 +74,14 @@
CUE_SINIT_FAILED = 22, /**< Suite initialization failed. */
CUE_SCLEAN_FAILED = 23, /**< Suite cleanup failed. */
CUE_DUP_SUITE = 24, /**< Duplicate suite name not allowed. */
+ CUE_SUITE_INACTIVE = 25, /**< Test run initiated for an inactive suite. */
/* Test Case Level Errors */
- CUE_NOTEST = 30, /**< A required CU_pTest pointer was NULL. */
+ CUE_NOTEST = 30, /**< A required CU_pTest or CU_TestFunc pointer was NULL. */
CUE_NO_TESTNAME = 31, /**< Required CU_Test name not provided. */
CUE_DUP_TEST = 32, /**< Duplicate test case name not allowed. */
CUE_TEST_NOT_IN_SUITE = 33, /**< Test not registered in specified suite. */
+ CUE_TEST_INACTIVE = 34, /**< Test run initiated for an inactive test. */
/* File handling errors */
CUE_FOPEN_FAILED = 40, /**< An error occurred opening a file. */
@@ -110,16 +112,79 @@
#endif
CU_EXPORT CU_ErrorCode CU_get_error(void);
+/**<
+ * Retrieves the current CUnit framework error code.
+ * CUnit implementation functions set the error code to indicate the
+ * status of the most recent operation. In general, the CUnit functions
+ * will clear the code to CUE_SUCCESS, then reset it to a specific error
+ * code if an exception condition is encountered. Some functions
+ * return the code, others leave it to the user to inspect if desired.
+ *
+ * @return The current error condition code.
+ * @see CU_get_error_msg()
+ * @see CU_ErrorCode
+ */
+
CU_EXPORT const char* CU_get_error_msg(void);
+/**<
+ * Retrieves a message corresponding to the current framework error code.
+ * CUnit implementation functions set the error code to indicate the
+ * of the most recent operation. In general, the CUnit functions will
+ * clear the code to CUE_SUCCESS, then reset it to a specific error
+ * code if an exception condition is encountered. This function allows
+ * the user to retrieve a descriptive error message corresponding to the
+ * error code set by the last operation.
+ *
+ * @return A message corresponding to the current error condition.
+ * @see CU_get_error()
+ * @see CU_ErrorCode
+ */
+
CU_EXPORT void CU_set_error_action(CU_ErrorAction action);
+/**<
+ * Sets the action to take when a framework error condition occurs.
+ * This function should be used to specify the action to take
+ * when an error condition is encountered. The default action is
+ * CUEA_IGNORE, which results in errors being ignored and test runs
+ * being continued (if possible). A value of CUEA_FAIL causes test
+ * runs to stop as soon as an error condition occurs, while
+ * CU_ABORT causes the application to exit on any error.
+ *
+ * @param action CU_ErrorAction indicating the new error action.
+ * @see CU_get_error_action()
+ * @see CU_set_error()
+ * @see CU_ErrorAction
+ */
+
CU_EXPORT CU_ErrorAction CU_get_error_action(void);
+/**<
+ * Retrieves the current framework error action code.
+ *
+ * @return The current error action code.
+ * @see CU_set_error_action()
+ * @see CU_set_error()
+ * @see CU_ErrorAction
+ */
#ifdef CUNIT_BUILD_TESTS
void test_cunit_CUError(void);
#endif
/* Internal function - users should not generally call this function */
-void CU_set_error(CU_ErrorCode error);
+CU_EXPORT void CU_set_error(CU_ErrorCode error);
+/**<
+ * Sets the CUnit framework error code.
+ * This function is used internally by CUnit implementation functions
+ * when an error condition occurs within the framework. It should
+ * not generally be called by user code. NOTE that if the current
+ * error action is CUEA_ABORT, then calling this function will
+ * result in exit() being called for the current application.
+ *
+ * @param error CU_ErrorCode indicating the current error condition.
+ * @see CU_get_error()
+ * @see CU_get_error_msg()
+ * @see CU_ErrorCode
+ */
#ifdef __cplusplus
}
diff -Nru cunit-2.1-0.dfsg/CUnit/Headers/CUnit.h cunit-2.1-2.dfsg/CUnit/Headers/CUnit.h
--- cunit-2.1-0.dfsg/CUnit/Headers/CUnit.h 1970-01-01 00:00:00.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Headers/CUnit.h 2010-10-15 15:11:52.000000000 +0000
@@ -0,0 +1,383 @@
+/*
+ * CUnit - A Unit testing framework library for C.
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/*
+ * ASSERT Macro definitions and general CUnit configuration definitions.
+ *
+ * 09/Aug/2001 ASSERT definitions. (AK)
+ *
+ * 12/Mar/2003 New Assert definitions. (AK)
+ *
+ * 27/Jul/2003 Modified ASSERT_XXX Macro definitions. (AK)
+ *
+ * 15-Jul-2004 New interface, changed action on assert failure to not
+ * return, provided _FATAL versions of assertions to return
+ * from test function on failure. (JDS)
+ *
+ * 01-Sep-2004 Modified assertions for setjmp/longjmp mechanism of
+ * aborting test runs, added CU_FAIL and CU_PASS macros. (JDS)
+ *
+ * 07-May-2005 Added CU_ prefix to remaining CUnit defines (BOOL, TRUE,
+ * FALSE, MAX_...). Added CU_UNREFERENCED_PARAMETER() define. (JDS)
+ */
+
+/** @file
+ * Basic CUnit include file for user and system code.
+ * Defines macros for assertions for use in user test cases.
+ * Basic system macro definitions also appear here.
+ */
+/** @addtogroup Framework
+ * @{
+ */
+
+#ifndef CUNIT_CUNIT_H_SEEN
+#define CUNIT_CUNIT_H_SEEN
+
+#include
+#include
+
+/** CUnit version number. */
+#define CU_VERSION "2.1-2"
+
+/* Max string lengths for names (includes terminating NULL. */
+/** Maximum length of a test name string. */
+#define CU_MAX_TEST_NAME_LENGTH 256
+/** Maximim length of a suite name string. */
+#define CU_MAX_SUITE_NAME_LENGTH 256
+
+/* Global type Definitions to be used for boolean operators. */
+#ifndef CU_BOOL
+ /** Boolean type for CUnit use. */
+ #define CU_BOOL int
+#endif
+
+#ifndef CU_TRUE
+ /** Boolean TRUE for CUnit use. */
+ #define CU_TRUE 1
+#endif
+
+#ifndef CU_FALSE
+ /** Boolean FALSE for CUnit use. */
+ #define CU_FALSE 0
+#endif
+
+#ifndef CU_UNREFERENCED_PARAMETER
+ /** Consistent approach to referencing unused parameters. */
+ #define CU_UNREFERENCED_PARAMETER(x) (void)x
+#endif
+
+#ifndef CU_MAX
+# define CU_MAX(a,b) (((a) >= (b)) ? (a) : (b))
+#endif
+
+#ifndef CU_MIN
+# define CU_MIN(a,b) (((a) >= (b)) ? (b) : (a))
+#endif
+
+#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) || defined(__WIN32__)
+# ifdef CU_DLL
+# ifdef CU_BUILD_DLL
+# define CU_EXPORT __declspec(dllexport)
+# else
+# define CU_EXPORT __declspec(dllimport)
+# endif
+# else
+# define CU_EXPORT
+# endif
+# ifdef _MSC_VER
+# define snprintf _snprintf
+# endif
+#else
+# define CU_EXPORT
+#endif /* WIN32 */
+
+#include "CUError.h"
+#include "TestDB.h" /* not needed here - included for user convenience */
+#include "TestRun.h" /* not needed here - include (after BOOL define) for user convenience */
+
+/** Record a pass condition without performing a logical test. */
+#define CU_PASS(msg) \
+ { CU_assertImplementation(CU_TRUE, __LINE__, ("CU_PASS(" #msg ")"), __FILE__, "", CU_FALSE); }
+
+/** Simple assertion.
+ * Reports failure with no other action.
+ */
+#define CU_ASSERT(value) \
+ { CU_assertImplementation((value), __LINE__, #value, __FILE__, "", CU_FALSE); }
+
+/** Simple assertion.
+ * Reports failure and causes test to abort.
+ */
+#define CU_ASSERT_FATAL(value) \
+ { CU_assertImplementation((value), __LINE__, #value, __FILE__, "", CU_TRUE); }
+
+/** Simple assertion.
+ * Reports failure with no other action.
+ */
+#define CU_TEST(value) \
+ { CU_assertImplementation((value), __LINE__, #value, __FILE__, "", CU_FALSE); }
+
+/** Simple assertion.
+ * Reports failure and causes test to abort.
+ */
+#define CU_TEST_FATAL(value) \
+ { CU_assertImplementation((value), __LINE__, #value, __FILE__, "", CU_TRUE); }
+
+/** Record a failure without performing a logical test. */
+#define CU_FAIL(msg) \
+ { CU_assertImplementation(CU_FALSE, __LINE__, ("CU_FAIL(" #msg ")"), __FILE__, "", CU_FALSE); }
+
+/** Record a failure without performing a logical test, and abort test. */
+#define CU_FAIL_FATAL(msg) \
+ { CU_assertImplementation(CU_FALSE, __LINE__, ("CU_FAIL_FATAL(" #msg ")"), __FILE__, "", CU_TRUE); }
+
+/** Asserts that value is CU_TRUE.
+ * Reports failure with no other action.
+ */
+#define CU_ASSERT_TRUE(value) \
+ { CU_assertImplementation((value), __LINE__, ("CU_ASSERT_TRUE(" #value ")"), __FILE__, "", CU_FALSE); }
+
+/** Asserts that value is CU_TRUE.
+ * Reports failure and causes test to abort.
+ */
+#define CU_ASSERT_TRUE_FATAL(value) \
+ { CU_assertImplementation((value), __LINE__, ("CU_ASSERT_TRUE_FATAL(" #value ")"), __FILE__, "", CU_TRUE); }
+
+/** Asserts that value is CU_FALSE.
+ * Reports failure with no other action.
+ */
+#define CU_ASSERT_FALSE(value) \
+ { CU_assertImplementation(!(value), __LINE__, ("CU_ASSERT_FALSE(" #value ")"), __FILE__, "", CU_FALSE); }
+
+/** Asserts that value is CU_FALSE.
+ * Reports failure and causes test to abort.
+ */
+#define CU_ASSERT_FALSE_FATAL(value) \
+ { CU_assertImplementation(!(value), __LINE__, ("CU_ASSERT_FALSE_FATAL(" #value ")"), __FILE__, "", CU_TRUE); }
+
+/** Asserts that actual == expected.
+ * Reports failure with no other action.
+ */
+#define CU_ASSERT_EQUAL(actual, expected) \
+ { CU_assertImplementation(((actual) == (expected)), __LINE__, ("CU_ASSERT_EQUAL(" #actual "," #expected ")"), __FILE__, "", CU_FALSE); }
+
+/** Asserts that actual == expected.
+ * Reports failure and causes test to abort.
+ */
+#define CU_ASSERT_EQUAL_FATAL(actual, expected) \
+ { CU_assertImplementation(((actual) == (expected)), __LINE__, ("CU_ASSERT_EQUAL_FATAL(" #actual "," #expected ")"), __FILE__, "", CU_TRUE); }
+
+/** Asserts that actual != expected.
+ * Reports failure with no other action.
+ */
+#define CU_ASSERT_NOT_EQUAL(actual, expected) \
+ { CU_assertImplementation(((actual) != (expected)), __LINE__, ("CU_ASSERT_NOT_EQUAL(" #actual "," #expected ")"), __FILE__, "", CU_FALSE); }
+
+/** Asserts that actual != expected.
+ * Reports failure and causes test to abort.
+ */
+#define CU_ASSERT_NOT_EQUAL_FATAL(actual, expected) \
+ { CU_assertImplementation(((actual) != (expected)), __LINE__, ("CU_ASSERT_NOT_EQUAL_FATAL(" #actual "," #expected ")"), __FILE__, "", CU_TRUE); }
+
+/** Asserts that pointers actual == expected.
+ * Reports failure with no other action.
+ */
+#define CU_ASSERT_PTR_EQUAL(actual, expected) \
+ { CU_assertImplementation(((void*)(actual) == (void*)(expected)), __LINE__, ("CU_ASSERT_PTR_EQUAL(" #actual "," #expected ")"), __FILE__, "", CU_FALSE); }
+
+/** Asserts that pointers actual == expected.
+ * Reports failure and causes test to abort.
+ */
+#define CU_ASSERT_PTR_EQUAL_FATAL(actual, expected) \
+ { CU_assertImplementation(((void*)(actual) == (void*)(expected)), __LINE__, ("CU_ASSERT_PTR_EQUAL_FATAL(" #actual "," #expected ")"), __FILE__, "", CU_TRUE); }
+
+/** Asserts that pointers actual != expected.
+ * Reports failure with no other action.
+ */
+#define CU_ASSERT_PTR_NOT_EQUAL(actual, expected) \
+ { CU_assertImplementation(((void*)(actual) != (void*)(expected)), __LINE__, ("CU_ASSERT_PTR_NOT_EQUAL(" #actual "," #expected ")"), __FILE__, "", CU_FALSE); }
+
+/** Asserts that pointers actual != expected.
+ * Reports failure and causes test to abort.
+ */
+#define CU_ASSERT_PTR_NOT_EQUAL_FATAL(actual, expected) \
+ { CU_assertImplementation(((void*)(actual) != (void*)(expected)), __LINE__, ("CU_ASSERT_PTR_NOT_EQUAL_FATAL(" #actual "," #expected ")"), __FILE__, "", CU_TRUE); }
+
+/** Asserts that pointer value is NULL.
+ * Reports failure with no other action.
+ */
+#define CU_ASSERT_PTR_NULL(value) \
+ { CU_assertImplementation((NULL == (void*)(value)), __LINE__, ("CU_ASSERT_PTR_NULL(" #value")"), __FILE__, "", CU_FALSE); }
+
+/** Asserts that pointer value is NULL.
+ * Reports failure and causes test to abort.
+ */
+#define CU_ASSERT_PTR_NULL_FATAL(value) \
+ { CU_assertImplementation((NULL == (void*)(value)), __LINE__, ("CU_ASSERT_PTR_NULL_FATAL(" #value")"), __FILE__, "", CU_TRUE); }
+
+/** Asserts that pointer value is not NULL.
+ * Reports failure with no other action.
+ */
+#define CU_ASSERT_PTR_NOT_NULL(value) \
+ { CU_assertImplementation((NULL != (void*)(value)), __LINE__, ("CU_ASSERT_PTR_NOT_NULL(" #value")"), __FILE__, "", CU_FALSE); }
+
+/** Asserts that pointer value is not NULL.
+ * Reports failure and causes test to abort.
+ */
+#define CU_ASSERT_PTR_NOT_NULL_FATAL(value) \
+ { CU_assertImplementation((NULL != (void*)(value)), __LINE__, ("CU_ASSERT_PTR_NOT_NULL_FATAL(" #value")"), __FILE__, "", CU_TRUE); }
+
+/** Asserts that string actual == expected.
+ * Reports failure with no other action.
+ */
+#define CU_ASSERT_STRING_EQUAL(actual, expected) \
+ { CU_assertImplementation(!(strcmp((const char*)(actual), (const char*)(expected))), __LINE__, ("CU_ASSERT_STRING_EQUAL(" #actual "," #expected ")"), __FILE__, "", CU_FALSE); }
+
+/** Asserts that string actual == expected.
+ * Reports failure and causes test to abort.
+ */
+#define CU_ASSERT_STRING_EQUAL_FATAL(actual, expected) \
+ { CU_assertImplementation(!(strcmp((const char*)(actual), (const char*)(expected))), __LINE__, ("CU_ASSERT_STRING_EQUAL_FATAL(" #actual "," #expected ")"), __FILE__, "", CU_TRUE); }
+
+/** Asserts that string actual != expected.
+ * Reports failure with no other action.
+ */
+#define CU_ASSERT_STRING_NOT_EQUAL(actual, expected) \
+ { CU_assertImplementation((strcmp((const char*)(actual), (const char*)(expected))), __LINE__, ("CU_ASSERT_STRING_NOT_EQUAL(" #actual "," #expected ")"), __FILE__, "", CU_FALSE); }
+
+/** Asserts that string actual != expected.
+ * Reports failure and causes test to abort.
+ */
+#define CU_ASSERT_STRING_NOT_EQUAL_FATAL(actual, expected) \
+ { CU_assertImplementation((strcmp((const char*)(actual), (const char*)(expected))), __LINE__, ("CU_ASSERT_STRING_NOT_EQUAL_FATAL(" #actual "," #expected ")"), __FILE__, "", CU_TRUE); }
+
+/** Asserts that string actual == expected with length specified.
+ * The comparison is limited to count characters.
+ * Reports failure with no other action.
+ */
+#define CU_ASSERT_NSTRING_EQUAL(actual, expected, count) \
+ { CU_assertImplementation(!(strncmp((const char*)(actual), (const char*)(expected), (size_t)(count))), __LINE__, ("CU_ASSERT_NSTRING_EQUAL(" #actual "," #expected "," #count ")"), __FILE__, "", CU_FALSE); }
+
+/** Asserts that string actual == expected with length specified.
+ * The comparison is limited to count characters.
+ * Reports failure and causes test to abort.
+ */
+#define CU_ASSERT_NSTRING_EQUAL_FATAL(actual, expected, count) \
+ { CU_assertImplementation(!(strncmp((const char*)(actual), (const char*)(expected), (size_t)(count))), __LINE__, ("CU_ASSERT_NSTRING_EQUAL_FATAL(" #actual "," #expected "," #count ")"), __FILE__, "", CU_TRUE); }
+
+/** Asserts that string actual != expected with length specified.
+ * The comparison is limited to count characters.
+ * Reports failure with no other action.
+ */
+#define CU_ASSERT_NSTRING_NOT_EQUAL(actual, expected, count) \
+ { CU_assertImplementation((strncmp((const char*)(actual), (const char*)(expected), (size_t)(count))), __LINE__, ("CU_ASSERT_NSTRING_NOT_EQUAL(" #actual "," #expected "," #count ")"), __FILE__, "", CU_FALSE); }
+
+/** Asserts that string actual != expected with length specified.
+ * The comparison is limited to count characters.
+ * Reports failure and causes test to abort.
+ */
+#define CU_ASSERT_NSTRING_NOT_EQUAL_FATAL(actual, expected, count) \
+ { CU_assertImplementation((strncmp((const char*)(actual), (const char*)(expected), (size_t)(count))), __LINE__, ("CU_ASSERT_NSTRING_NOT_EQUAL_FATAL(" #actual "," #expected "," #count ")"), __FILE__, "", CU_TRUE); }
+
+/** Asserts that double actual == expected within the specified tolerance.
+ * If actual is within granularity of expected, the assertion passes.
+ * Reports failure with no other action.
+ */
+#define CU_ASSERT_DOUBLE_EQUAL(actual, expected, granularity) \
+ { CU_assertImplementation(((fabs((double)(actual) - (expected)) <= fabs((double)(granularity)))), __LINE__, ("CU_ASSERT_DOUBLE_EQUAL(" #actual "," #expected "," #granularity ")"), __FILE__, "", CU_FALSE); }
+
+/** Asserts that double actual == expected within the specified tolerance.
+ * If actual is within granularity of expected, the assertion passes.
+ * Reports failure and causes test to abort.
+ */
+#define CU_ASSERT_DOUBLE_EQUAL_FATAL(actual, expected, granularity) \
+ { CU_assertImplementation(((fabs((double)(actual) - (expected)) <= fabs((double)(granularity)))), __LINE__, ("CU_ASSERT_DOUBLE_EQUAL_FATAL(" #actual "," #expected "," #granularity ")"), __FILE__, "", CU_TRUE); }
+
+/** Asserts that double actual != expected within the specified tolerance.
+ * If actual is within granularity of expected, the assertion fails.
+ * Reports failure with no other action.
+ */
+#define CU_ASSERT_DOUBLE_NOT_EQUAL(actual, expected, granularity) \
+ { CU_assertImplementation(((fabs((double)(actual) - (expected)) > fabs((double)(granularity)))), __LINE__, ("CU_ASSERT_DOUBLE_NOT_EQUAL(" #actual "," #expected "," #granularity ")"), __FILE__, "", CU_FALSE); }
+
+/** Asserts that double actual != expected within the specified tolerance.
+ * If actual is within granularity of expected, the assertion fails.
+ * Reports failure and causes test to abort.
+ */
+#define CU_ASSERT_DOUBLE_NOT_EQUAL_FATAL(actual, expected, granularity) \
+ { CU_assertImplementation(((fabs((double)(actual) - (expected)) > fabs((double)(granularity)))), __LINE__, ("CU_ASSERT_DOUBLE_NOT_EQUAL_FATAL(" #actual "," #expected "," #granularity ")"), __FILE__, "", CU_TRUE); }
+
+#ifdef USE_DEPRECATED_CUNIT_NAMES
+
+#ifndef BOOL
+ /** Deprecated (version 2.0-2). @deprecated Use CU_BOOL. */
+ #define BOOL int
+#endif
+
+#ifndef TRUE
+ /** Deprecated (version 2.0-2). @deprecated Use CU_TRUE. */
+ #define TRUE 1
+#endif
+
+#ifndef FALSE
+ /** Deprecated (version 2.0-2). @deprecated Use CU_FALSE. */
+ #define FALSE 0
+#endif
+
+/** Deprecated (version 2.0-2). @deprecated Use CU_MAX_TEST_NAME_LENGTH. */
+#define MAX_TEST_NAME_LENGTH 256
+/** Deprecated (version 2.0-2). @deprecated Use CU_MAX_SUITE_NAME_LENGTH. */
+#define MAX_SUITE_NAME_LENGTH 256
+
+/** Deprecated (version 1). @deprecated Use CU_ASSERT_FATAL. */
+#define ASSERT(value) { if (FALSE == (int)(value)) { CU_assertImplementation((BOOL)value, __LINE__, #value, __FILE__, "", FALSE); return; }}
+/** Deprecated (version 1). @deprecated Use CU_ASSERT_TRUE_FATAL. */
+#define ASSERT_TRUE(value) { if (FALSE == (value)) { CU_assertImplementation(FALSE, __LINE__, ("ASSERT_TRUE(" #value ")"), __FILE__, "", FALSE); return; }}
+/** Deprecated (version 1). @deprecated Use CU_ASSERT_FALSE_FATAL. */
+#define ASSERT_FALSE(value) { if (FALSE != (value)) { CU_assertImplementation(FALSE, __LINE__, ("ASSERT_FALSE(" #value ")"), __FILE__, "", FALSE); return; }}
+/** Deprecated (version 1). @deprecated Use CU_ASSERT_EQUAL_FATAL. */
+#define ASSERT_EQUAL(actual, expected) { if ((actual) != (expected)) { CU_assertImplementation(FALSE, __LINE__, ("ASSERT_EQUAL(" #actual "," #expected ")"), __FILE__, "", FALSE); return; }}
+/** Deprecated (version 1). @deprecated Use CU_ASSERT_NOT_EQUAL_FATAL. */
+#define ASSERT_NOT_EQUAL(actual, expected) { if ((void*)(actual) == (void*)(expected)) { CU_assertImplementation(FALSE, __LINE__, ("ASSERT_NOT_EQUAL(" #actual "," #expected ")"), __FILE__, "", FALSE); return; }}
+/** Deprecated (version 1). @deprecated Use CU_ASSERT_PTR_EQUAL_FATAL. */
+#define ASSERT_PTR_EQUAL(actual, expected) { if ((void*)(actual) != (void*)(expected)) { CU_assertImplementation(FALSE, __LINE__, ("ASSERT_PTR_EQUAL(" #actual "," #expected ")"), __FILE__, "", FALSE); return; }}
+/** Deprecated (version 1). @deprecated Use CU_ASSERT_PTR_NOT_EQUAL_FATAL. */
+#define ASSERT_PTR_NOT_EQUAL(actual, expected) { if ((void*)(actual) == (void*)(expected)) { CU_assertImplementation(FALSE, __LINE__, ("ASSERT_PTR_NOT_EQUAL(" #actual "," #expected ")"), __FILE__, "", FALSE); return; }}
+/** Deprecated (version 1). @deprecated Use CU_ASSERT_PTR_NULL_FATAL. */
+#define ASSERT_PTR_NULL(value) { if (NULL != (void*)(value)) { CU_assertImplementation(FALSE, __LINE__, ("ASSERT_PTR_NULL(" #value")"), __FILE__, "", FALSE); return; }}
+/** Deprecated (version 1). @deprecated Use CU_ASSERT_PTR_NOT_NULL_FATAL. */
+#define ASSERT_PTR_NOT_NULL(value) { if (NULL == (void*)(value)) { CU_assertImplementation(FALSE, __LINE__, ("ASSERT_PTR_NOT_NULL(" #value")"), __FILE__, "", FALSE); return; }}
+/** Deprecated (version 1). @deprecated Use CU_ASSERT_STRING_EQUAL_FATAL. */
+#define ASSERT_STRING_EQUAL(actual, expected) { if (strcmp((const char*)actual, (const char*)expected)) { CU_assertImplementation(FALSE, __LINE__, ("ASSERT_STRING_EQUAL(" #actual "," #expected ")"), __FILE__, "", FALSE); return; }}
+/** Deprecated (version 1). @deprecated Use CU_ASSERT_STRING_NOT_EQUAL_FATAL. */
+#define ASSERT_STRING_NOT_EQUAL(actual, expected) { if (!strcmp((const char*)actual, (const char*)expected)) { CU_assertImplementation(TRUE, __LINE__, ("ASSERT_STRING_NOT_EQUAL(" #actual "," #expected ")"), __FILE__, "", FALSE); return; }}
+/** Deprecated (version 1). @deprecated Use CU_ASSERT_NSTRING_EQUAL_FATAL. */
+#define ASSERT_NSTRING_EQUAL(actual, expected, count) { if (strncmp((const char*)actual, (const char*)expected, (size_t)count)) { CU_assertImplementation(FALSE, __LINE__, ("ASSERT_NSTRING_EQUAL(" #actual "," #expected "," #count ")"), __FILE__, "", FALSE); return; }}
+/** Deprecated (version 1). @deprecated Use CU_ASSERT_NSTRING_NOT_EQUAL_FATAL. */
+#define ASSERT_NSTRING_NOT_EQUAL(actual, expected, count) { if (!strncmp((const char*)actual, (const char*)expected, (size_t)count)) { CU_assertImplementation(TRUE, __LINE__, ("ASSERT_NSTRING_NOT_EQUAL(" #actual "," #expected "," #count ")"), __FILE__, "", FALSE); return; }}
+/** Deprecated (version 1). @deprecated Use CU_ASSERT_DOUBLE_EQUAL_FATAL. */
+#define ASSERT_DOUBLE_EQUAL(actual, expected, granularity) { if ((fabs((double)actual - expected) > fabs((double)granularity))) { CU_assertImplementation(FALSE, __LINE__, ("ASSERT_DOUBLE_EQUAL(" #actual "," #expected "," #granularity ")"), __FILE__, "", FALSE); return; }}
+/** Deprecated (version 1). @deprecated Use CU_ASSERT_DOUBLE_NOT_EQUAL_FATAL. */
+#define ASSERT_DOUBLE_NOT_EQUAL(actual, expected, granularity) { if ((fabs((double)actual - expected) <= fabs((double)granularity))) { CU_assertImplementation(TRUE, __LINE__, ("ASSERT_DOUBLE_NOT_EQUAL(" #actual "," #expected "," #granularity ")"), __FILE__, "", FALSE); return; }}
+#endif /* USE_DEPRECATED_CUNIT_NAMES */
+
+#endif /* CUNIT_CUNIT_H_SEEN */
+
+/** @} */
diff -Nru cunit-2.1-0.dfsg/CUnit/Headers/CUnit.h.in cunit-2.1-2.dfsg/CUnit/Headers/CUnit.h.in
--- cunit-2.1-0.dfsg/CUnit/Headers/CUnit.h.in 2006-01-30 03:48:26.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Headers/CUnit.h.in 2006-05-20 13:19:13.000000000 +0000
@@ -1,7 +1,7 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -19,7 +19,7 @@
*/
/*
- * Contains ASSERT Macro definitions.
+ * ASSERT Macro definitions and general CUnit configuration definitions.
*
* 09/Aug/2001 ASSERT definitions. (AK)
*
@@ -58,9 +58,9 @@
/* Max string lengths for names (includes terminating NULL. */
/** Maximum length of a test name string. */
-#define CU_MAX_TEST_NAME_LENGTH 256
+#define CU_MAX_TEST_NAME_LENGTH 256
/** Maximim length of a suite name string. */
-#define CU_MAX_SUITE_NAME_LENGTH 256
+#define CU_MAX_SUITE_NAME_LENGTH 256
/* Global type Definitions to be used for boolean operators. */
#ifndef CU_BOOL
@@ -75,7 +75,7 @@
#ifndef CU_FALSE
/** Boolean FALSE for CUnit use. */
- #define CU_FALSE 0
+ #define CU_FALSE 0
#endif
#ifndef CU_UNREFERENCED_PARAMETER
@@ -83,7 +83,15 @@
#define CU_UNREFERENCED_PARAMETER(x) (void)x
#endif
-#ifdef WIN32
+#ifndef CU_MAX
+# define CU_MAX(a,b) (((a) >= (b)) ? (a) : (b))
+#endif
+
+#ifndef CU_MIN
+# define CU_MIN(a,b) (((a) >= (b)) ? (b) : (a))
+#endif
+
+#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) || defined(__WIN32__)
# ifdef CU_DLL
# ifdef CU_BUILD_DLL
# define CU_EXPORT __declspec(dllexport)
@@ -93,9 +101,12 @@
# else
# define CU_EXPORT
# endif
+# ifdef _MSC_VER
+# define snprintf _snprintf
+# endif
#else
# define CU_EXPORT
-#endif
+#endif /* WIN32 */
#include "CUError.h"
#include "TestDB.h" /* not needed here - included for user convenience */
diff -Nru cunit-2.1-0.dfsg/CUnit/Headers/CUnit_intl.h cunit-2.1-2.dfsg/CUnit/Headers/CUnit_intl.h
--- cunit-2.1-0.dfsg/CUnit/Headers/CUnit_intl.h 1970-01-01 00:00:00.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Headers/CUnit_intl.h 2006-05-19 21:57:27.000000000 +0000
@@ -0,0 +1,62 @@
+/*
+ * CUnit - A Unit testing framework library for C.
+ * Copyright (C) 2006 Jerry St.Clair
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/*
+ * Internationalization support
+ *
+ * 05-May-2006 Initial implementation. (JDS)
+ */
+
+/** @file
+ * Internal CUnit header supporting internationalization of
+ * CUnit framework & interfaces.
+ */
+/** @addtogroup Framework
+ * @{
+ */
+
+#ifndef CUNIT_CUNIT_INTL_H_SEEN
+#define CUNIT_CUNIT_INTL_H_SEEN
+
+/* activate these when source preparation is complete
+#include
+#ifndef _
+# define _(String) gettext (String)
+#endif
+#ifndef gettext_noop
+# define gettext_noop(String) String
+#endif
+#ifndef N_
+# define N_(String) gettext_noop (String)
+#endif
+*/
+
+/* deactivate these when source preparation is complete */
+#undef _
+#define _(String) (String)
+#undef N_
+#define N_(String) String
+#undef textdomain
+#define textdomain(Domain)
+#undef bindtextdomain
+#define bindtextdomain(Package, Directory)
+
+#endif /* CUNIT_CUNIT_INTL_H_SEEN */
+
+/** @} */
diff -Nru cunit-2.1-0.dfsg/CUnit/Headers/Console.h cunit-2.1-2.dfsg/CUnit/Headers/Console.h
--- cunit-2.1-0.dfsg/CUnit/Headers/Console.h 2006-01-30 03:48:26.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Headers/Console.h 2006-04-28 23:21:43.000000000 +0000
@@ -1,7 +1,7 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -46,6 +46,7 @@
#endif
CU_EXPORT void CU_console_run_tests(void);
+/**< Run registered CUnit tests using the console interface. */
#ifdef USE_DEPRECATED_CUNIT_NAMES
/** Deprecated (version 1). @deprecated Use CU_console_run_tests(). */
diff -Nru cunit-2.1-0.dfsg/CUnit/Headers/Jamfile cunit-2.1-2.dfsg/CUnit/Headers/Jamfile
--- cunit-2.1-0.dfsg/CUnit/Headers/Jamfile 2006-03-21 01:30:46.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Headers/Jamfile 1970-01-01 00:00:00.000000000 +0000
@@ -1,42 +0,0 @@
-#
-# Jamfile to build CUnit - Source Headers Directory
-# (see http://www.freetype.org/jam/index.html)
-#
-# Copyright (C) 2004-2006 Jerry St.Clair
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#---------------------------------------------------------------------------
-
-SubDir TOP CUnit Headers ;
-
-CU_HEADERS =
- Automated.h
- Basic.h
- Console.h
- CUError.h
- CUnit.h
- CUCurses.h
- MyMem.h
- TestDB.h
- TestRun.h
- Util.h
- Win.h
- ;
-
-if $(INSTALL_DOC_DIR)
-{
- InstallCUnitFile $(INSTALL_INC_DIR) : $(CU_HEADERS) ;
-}
-
diff -Nru cunit-2.1-0.dfsg/CUnit/Headers/Makefile.am cunit-2.1-2.dfsg/CUnit/Headers/Makefile.am
--- cunit-2.1-0.dfsg/CUnit/Headers/Makefile.am 2006-03-21 01:30:46.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Headers/Makefile.am 2006-05-20 13:19:13.000000000 +0000
@@ -6,7 +6,7 @@
BASIC_INCLUDES = Basic.h
CONSOLE_INCLUDES = Console.h
CURSES_INCLUDES = CUCurses.h
-FRAMEWORK_INCLUDES = CUError.h CUnit.h MyMem.h TestDB.h TestRun.h Util.h
+FRAMEWORK_INCLUDES = CUError.h CUnit.h CUnit_intl.h MyMem.h TestDB.h TestRun.h Util.h
# Default configuration without enabling anything
INCLUDE_FILES = ${FRAMEWORK_INCLUDES}
diff -Nru cunit-2.1-0.dfsg/CUnit/Headers/Makefile.in cunit-2.1-2.dfsg/CUnit/Headers/Makefile.in
--- cunit-2.1-0.dfsg/CUnit/Headers/Makefile.in 2006-03-22 10:57:13.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Headers/Makefile.in 2010-10-15 15:11:41.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -46,25 +44,39 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CUnit.h
+CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
-am__CUnitInclude_HEADERS_DIST = CUError.h CUnit.h MyMem.h TestDB.h \
- TestRun.h Util.h Basic.h Console.h Automated.h CUCurses.h
+am__CUnitInclude_HEADERS_DIST = CUError.h CUnit.h CUnit_intl.h MyMem.h \
+ TestDB.h TestRun.h Util.h Basic.h Console.h Automated.h \
+ CUCurses.h
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(CUnitIncludedir)"
-CUnitIncludeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(CUnitInclude_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -83,40 +95,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -126,35 +125,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -166,34 +170,47 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
CUnitIncludedir = ${includedir}/CUnit
AUTOMATED_INCLUDES = Automated.h
BASIC_INCLUDES = Basic.h
CONSOLE_INCLUDES = Console.h
CURSES_INCLUDES = CUCurses.h
-FRAMEWORK_INCLUDES = CUError.h CUnit.h MyMem.h TestDB.h TestRun.h Util.h
+FRAMEWORK_INCLUDES = CUError.h CUnit.h CUnit_intl.h MyMem.h TestDB.h TestRun.h Util.h
# Default configuration without enabling anything
INCLUDE_FILES = ${FRAMEWORK_INCLUDES} $(BASIC_INCLUDE_FILES) \
@@ -211,14 +228,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Headers/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu CUnit/Headers/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Headers/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu CUnit/Headers/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -236,6 +253,7 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
CUnit.h: $(top_builddir)/config.status $(srcdir)/CUnit.h.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
@@ -244,100 +262,106 @@
clean-libtool:
-rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
install-CUnitIncludeHEADERS: $(CUnitInclude_HEADERS)
@$(NORMAL_INSTALL)
- test -z "$(CUnitIncludedir)" || $(mkdir_p) "$(DESTDIR)$(CUnitIncludedir)"
- @list='$(CUnitInclude_HEADERS)'; for p in $$list; do \
+ test -z "$(CUnitIncludedir)" || $(MKDIR_P) "$(DESTDIR)$(CUnitIncludedir)"
+ @list='$(CUnitInclude_HEADERS)'; test -n "$(CUnitIncludedir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(CUnitIncludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(CUnitIncludedir)/$$f'"; \
- $(CUnitIncludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(CUnitIncludedir)/$$f"; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(CUnitIncludedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(CUnitIncludedir)" || exit $$?; \
done
uninstall-CUnitIncludeHEADERS:
@$(NORMAL_UNINSTALL)
- @list='$(CUnitInclude_HEADERS)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(CUnitIncludedir)/$$f'"; \
- rm -f "$(DESTDIR)$(CUnitIncludedir)/$$f"; \
- done
+ @list='$(CUnitInclude_HEADERS)'; test -n "$(CUnitIncludedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(CUnitIncludedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(CUnitIncludedir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -346,7 +370,7 @@
all-am: Makefile $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(CUnitIncludedir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -368,6 +392,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -378,8 +403,7 @@
distclean: distclean-am
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-am
@@ -387,18 +411,38 @@
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am: install-CUnitIncludeHEADERS
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -417,19 +461,23 @@
ps-am:
-uninstall-am: uninstall-CUnitIncludeHEADERS uninstall-info-am
+uninstall-am: uninstall-CUnitIncludeHEADERS
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-CUnitIncludeHEADERS \
- install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
+ install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-CUnitIncludeHEADERS uninstall-am \
- uninstall-info-am
+ tags uninstall uninstall-CUnitIncludeHEADERS uninstall-am
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -Nru cunit-2.1-0.dfsg/CUnit/Headers/MyMem.h cunit-2.1-2.dfsg/CUnit/Headers/MyMem.h
--- cunit-2.1-0.dfsg/CUnit/Headers/MyMem.h 2006-01-30 03:48:26.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Headers/MyMem.h 2006-04-20 02:15:46.000000000 +0000
@@ -1,7 +1,7 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
diff -Nru cunit-2.1-0.dfsg/CUnit/Headers/TestDB.h cunit-2.1-2.dfsg/CUnit/Headers/TestDB.h
--- cunit-2.1-0.dfsg/CUnit/Headers/TestDB.h 2006-01-30 03:48:26.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Headers/TestDB.h 2006-05-19 21:57:27.000000000 +0000
@@ -1,7 +1,7 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -37,11 +37,15 @@
* 01-Sep-2004 Added jmp_buf to CU_Test. (JDS)
*
* 05-Sep-2004 Added internal test interface. (JDS)
+ *
+ * 15-Apr-2006 Removed constraint that suites/tests be uniquely named.
+ * Added ability to turn individual tests/suites on or off.
+ * Moved doxygen comments for public API here to header. (JDS)
*/
/** @file
- * Management functions for tests, suites, and the test registry (user interface).
- * Unit testing in CUnit follows the standard structure of unit
+ * Management functions for tests, suites, and the test registry.
+ * Unit testing in CUnit follows the common structure of unit
* tests aggregated in suites, which are themselves aggregated
* in a test registry. This module provides functions and
* typedef's to support the creation, registration, and manipulation
@@ -63,108 +67,122 @@
extern "C" {
#endif
-/* Type definition for Initialization/Cleaup/TestFunction */
+/*=================================================================
+ * Typedefs and Data Structures
+ *=================================================================*/
+
typedef int (*CU_InitializeFunc)(void); /**< Signature for suite initialization function. */
typedef int (*CU_CleanupFunc)(void); /**< Signature for suite cleanup function. */
typedef void (*CU_TestFunc)(void); /**< Signature for a testing function in a test case. */
+/*-----------------------------------------------------------------
+ * CU_Test, CU_pTest
+ *-----------------------------------------------------------------*/
/** CUnit test case data type.
- * CU_Test is a linked list of unit tests. Each test
- * has a name and a callable test function, as well as
- * links to the next and previous tests in the list. A
- * test also holds a jmp_buf reference for use in
- * implementing fatal assertions.
- *
- * Generally, the linked list includes tests which are
- * associated with each other in a CU_Suite. As a result,
- * tests are run in the order in which they are added to a
- * suite (see CU_add_test()).
- *
- * In the current implementation, the name of each CU_Test
- * in a suite must have a unique name. There is no
- * restriction on the test function. This means that the
- * same function could, in principle, be called more than
- * once as long as it is registered with different tests
- * having distinct names.
+ * CU_Test is a double linked list of unit tests. Each test has
+ * a name, a callable test function, and a flag for whether the
+ * test is active and thus executed during a test run. A test
+ * also holds links to the next and previous tests in the list,
+ * as well as a jmp_buf reference for use in implementing fatal
+ * assertions.
+ *
+ * Generally, the linked list includes tests which are associated
+ * with each other in a CU_Suite. As a result, tests are run in
+ * the order in which they are added to a suite (see CU_add_test()).
+ *
+ *
+ * It is recommended that the name of each CU_Test in a suite have
+ * a unique name. Otherwise, only the first-registered test having
+ * a given name will be accessible by that name. There are no
+ * restrictions on the test function. This means that the same
+ * function could, in principle, be called more than once from
+ * different tests.
+ *
* @see CU_Suite
* @see CU_TestRegistry
*/
typedef struct CU_Test
{
- char* pName; /**< Test name. */
- CU_TestFunc pTestFunc; /**< Pointer to the test function. */
- jmp_buf* pJumpBuf; /**< Jump buffer for setjmp/longjmp test abort mechanism. */
+ char* pName; /**< Test name. */
+ CU_BOOL fActive; /**< Flag for whether test is executed during a run. */
+ CU_TestFunc pTestFunc; /**< Pointer to the test function. */
+ jmp_buf* pJumpBuf; /**< Jump buffer for setjmp/longjmp test abort mechanism. */
- struct CU_Test* pNext; /**< Pointer to the next test in linked list. */
- struct CU_Test* pPrev; /**< Pointer to the previous test in linked list. */
+ struct CU_Test* pNext; /**< Pointer to the next test in linked list. */
+ struct CU_Test* pPrev; /**< Pointer to the previous test in linked list. */
} CU_Test;
-typedef CU_Test* CU_pTest; /**< Pointer to a CUnit test case. */
+typedef CU_Test* CU_pTest; /**< Pointer to a CUnit test case. */
+/*-----------------------------------------------------------------
+ * CU_Suite, CU_pSuite
+ *-----------------------------------------------------------------*/
/** CUnit suite data type.
- * CU_Suite is a linked list of CU_Test containers.
- * Each suite has a name and count of associated unit
- * tests. It also holds a pointer to optional
- * initialization and cleanup functions. If non-NULL,
- * these are called before and after running the suite's
- * tests, respectively. In addition, the suite holds a
- * pointer to the head of the linked list of associated
- * CU_Test objects. Finally, pointers to the next and
- * previous suites in the linked list are maintained.
- *
- * Generally, the linked list includes suites which are
- * associated with each other in a CU_TestRegistry. As a
- * result, suites are run in the order in which they are
- * registered (see CU_add_suite()).
- *
- * In the current implementation, the name of each CU_Suite
- * in a test registry must have a unique name. There is no
- * restriction on the contained tests. This means that the
- * same CU_Test could, in principle, be run more than
- * once as long as it is registered with different suites
- * having distinct names.
+ * CU_Suite is a linked list of CU_Test containers. Each suite has
+ * a name, a count of registered unit tests, and a flag for whether
+ * the suite is active during test runs. It also holds pointers to
+ * optional initialization and cleanup functions. If non-NULL, these
+ * are called before and after running the suite's tests, respectively.
+ * In addition, the suite holds a pointer to the head of the linked
+ * list of associated CU_Test objects. Finally, pointers to the next
+ * and previous suites in the linked list are maintained.
+ *
+ * Generally, the linked list includes suites which are associated with
+ * each other in a CU_TestRegistry. As a result, suites are run in the
+ * order in which they are registered (see CU_add_suite()).
+ *
+ * It is recommended that name of each CU_Suite in a test registry have
+ * a unique name. Otherwise, only the first-registered suite having a
+ * given name will be accessible by name. There are no restrictions on
+ * the contained tests. This means that the same CU_Test could, in
+ * principle, be run more than once fron different suites.
+ *
* @see CU_Test
- * @see CU_TestRegistry
+ * @see CU_TestRegistry
*/
typedef struct CU_Suite
{
- char* pName; /**< Suite name. */
- CU_pTest pTest; /**< Pointer to the 1st test in the suite. */
- CU_InitializeFunc pInitializeFunc; /**< Pointer to the suite initialization function. */
- CU_CleanupFunc pCleanupFunc; /**< Pointer to the suite cleanup function. */
-
- unsigned int uiNumberOfTests; /**< Number of tests in the suite. */
- struct CU_Suite* pNext; /**< Pointer to the next suite in linked list. */
- struct CU_Suite* pPrev; /**< Pointer to the previous suite in linked list. */
+ char* pName; /**< Suite name. */
+ CU_BOOL fActive; /**< Flag for whether suite is executed during a run. */
+ CU_pTest pTest; /**< Pointer to the 1st test in the suite. */
+ CU_InitializeFunc pInitializeFunc; /**< Pointer to the suite initialization function. */
+ CU_CleanupFunc pCleanupFunc; /**< Pointer to the suite cleanup function. */
+
+ unsigned int uiNumberOfTests; /**< Number of tests in the suite. */
+ struct CU_Suite* pNext; /**< Pointer to the next suite in linked list. */
+ struct CU_Suite* pPrev; /**< Pointer to the previous suite in linked list. */
} CU_Suite;
-typedef CU_Suite* CU_pSuite; /**< Pointer to a CUnit suite. */
+typedef CU_Suite* CU_pSuite; /**< Pointer to a CUnit suite. */
+/*-----------------------------------------------------------------
+ * CU_TestRegistry, CU_pTestRegistry
+ *-----------------------------------------------------------------*/
/** CUnit test registry data type.
- * CU_TestRegisty is the repository for suites containing
- * unit tests. The test registry maintains a count of the
- * number of CU_Suite objects contained in the registry, as
- * well as a count of the total number of CU_Test objects
- * associated with those suites. It also holds a pointer
- * to the head of the linked list of CU_Suite objects.
- *
- * With this structure, the user will normally add suites
- * implictly to the internal test registry using CU_add_suite(),
- * and then add tests to each suite using CU_add_test().
- * Test runs are then initiated using one of the appropriate
- * functions in TestRun.c via one of the interfaces.
- *
- * Automatic creation and destruction of the internal registry
- * and its objects is available using CU_initialize_registry()
- * and CU_cleanup_registry(), respectively. For internal and
- * testing purposes, the internal registry can be retrieved and
- * assigned. Functions are also provided for creating and
- * destroying independent registries.
- *
- * Note that earlier versions of CUnit also contained a
- * pointer to a linked list of CU_FailureRecord objects
- * (termed _TestResults). This has been removed from the
- * registry and relocated to TestRun.c.
+ * CU_TestRegisty is the repository for suites containing unit tests.
+ * The test registry maintains a count of the number of CU_Suite
+ * objects contained in the registry, as well as a count of the total
+ * number of CU_Test objects associated with those suites. It also
+ * holds a pointer to the head of the linked list of CU_Suite objects.
+ *
+ *
+ * With this structure, the user will normally add suites implictly to
+ * the internal test registry using CU_add_suite(), and then add tests
+ * to each suite using CU_add_test(). Test runs are then initiated
+ * using one of the appropriate functions in TestRun.c via one of the
+ * user interfaces.
+ *
+ * Automatic creation and destruction of the internal registry and its
+ * objects is available using CU_initialize_registry() and
+ * CU_cleanup_registry(), respectively. For internal and testing
+ * purposes, the internal registry can be retrieved and assigned.
+ * Functions are also provided for creating and destroying independent
+ * registries.
+ *
+ * Note that earlier versions of CUnit also contained a pointer to a
+ * linked list of CU_FailureRecord objects (termed _TestResults).
+ * This has been removed from theregistry and relocated to TestRun.c.
+ *
* @see CU_Test
* @see CU_Suite
* @see CU_initialize_registry()
@@ -179,33 +197,437 @@
#ifdef USE_DEPRECATED_CUNIT_NAMES
/** Union to support v1.1-1 member name. */
union {
- unsigned int uiNumberOfSuites; /**< Number of suites in the test registry. */
- unsigned int uiNumberOfGroups; /**< Deprecated (version 1). @deprecated Use uiNumberOfSuites. */
+ unsigned int uiNumberOfSuites; /**< Number of suites in the test registry. */
+ unsigned int uiNumberOfGroups; /**< Deprecated (version 1). @deprecated Use uiNumberOfSuites. */
};
- unsigned int uiNumberOfTests; /**< Number of tests in the test registry. */
+ unsigned int uiNumberOfTests; /**< Number of tests in the test registry. */
/** Union to support v1.1-1 member name. */
union {
- CU_pSuite pSuite; /**< Pointer to the 1st suite in the test registry. */
- CU_pSuite pGroup; /**< Deprecated (version 1). @deprecated Use pSuite. */
+ CU_pSuite pSuite; /**< Pointer to the 1st suite in the test registry. */
+ CU_pSuite pGroup; /**< Deprecated (version 1). @deprecated Use pSuite. */
};
#else
- unsigned int uiNumberOfSuites; /**< Number of suites in the test registry. */
- unsigned int uiNumberOfTests; /**< Number of tests in the test registry. */
- CU_pSuite pSuite; /**< Pointer to the 1st suite in the test registry. */
+ unsigned int uiNumberOfSuites; /**< Number of registered suites in the registry. */
+ unsigned int uiNumberOfTests; /**< Total number of registered tests in the registry. */
+ CU_pSuite pSuite; /**< Pointer to the 1st suite in the test registry. */
#endif
} CU_TestRegistry;
typedef CU_TestRegistry* CU_pTestRegistry; /**< Pointer to a CUnit test registry. */
-/* Public interface functions */
-CU_EXPORT CU_ErrorCode CU_initialize_registry(void);
-CU_EXPORT void CU_cleanup_registry(void);
-CU_EXPORT CU_BOOL CU_registry_initialized(void);
+/*=================================================================
+ * Public interface functions
+ *=================================================================*/
+
+CU_EXPORT
+CU_ErrorCode CU_initialize_registry(void);
+/**<
+ * Initializes the framework test registry.
+ * Any existing registry is freed, including all stored suites
+ * and associated tests. It is not necessary to explicitly call
+ * CU_cleanup_registry() before reinitializing the framework.
+ * The most recent stored test results are also cleared.
+ *
+ * This function must not be called during a test run (checked
+ * by assertion)
+ *
+ * @return CUE_NOMEMORY if memory for the new registry cannot
+ * be allocated, CUE_SUCCESS otherwise.
+ * @see CU_cleanup_registry
+ * @see CU_get_registry
+ * @see CU_set_registry
+ * @see CU_registry_initialized
+ */
+
+CU_EXPORT
+void CU_cleanup_registry(void);
+/**<
+ * Clears the test registry.
+ * The active test registry is freed, including all stored suites
+ * and associated tests. The most recent stored test results are
+ * also cleared. After calling this function, CUnit suites cannot
+ * be added until CU_initialize_registry() or CU_set_registry() is
+ * called. Further, any pointers to suites or test cases held by
+ * the user will be invalidated by calling this function.
+ *
+ * This function may be called multiple times without generating
+ * an error condition. However, this function must not be
+ * called during a test run (checked by assertion)
.
+ *
+ * @see CU_initialize_registry
+ * @see CU_get_registry
+ * @see CU_set_registry
+ */
+
+CU_EXPORT CU_BOOL CU_registry_initialized(void);
+/**<
+ * Checks whether the test registry has been initialized.
+ *
+ * @return CU_TRUE if the registry has been initialized,
+ * CU_FALSE otherwise.
+ * @see CU_initialize_registry
+ * @see CU_cleanup_registry
+ */
+
+CU_EXPORT
+CU_pSuite CU_add_suite(const char *strName,
+ CU_InitializeFunc pInit,
+ CU_CleanupFunc pClean);
+/**<
+ * Creates a new test suite and adds it to the test registry.
+ * This function creates a new test suite having the specified
+ * name and initialization/cleanup functions and adds it to the
+ * test registry. The new suite will be active and able to be
+ * executed during a test run. The test registry must be
+ * initialized before calling this function (checked by assertion).
+ * pInit and pClean may be NULL, in which case no corresponding
+ * initialization of cleanup function will be called when the suite
+ * is run. strName may be empty ("") but may not be NULL.
+ *
+ * The return value is a pointer to the newly-created suite, or
+ * NULL if there was a problem with the suite creation or addition.
+ * An error code is also set for the framework. Note that if the
+ * name specified for the new suite is a duplicate, the suite will
+ * be created and added but the error code will be set to CUE_DUP_SUITE.
+ * The duplicate suite will not be accessible by name.
+ *
+ * NOTE - the CU_pSuite pointer returned should NOT BE FREED BY
+ * THE USER. The suite is freed by the CUnit system when
+ * CU_cleanup_registry() is called. This function must not
+ * be called during a test run (checked by assertion).
+ *
+ * CU_add_suite() sets the following error codes:
+ * - CUE_SUCCESS if no errors occurred.
+ * - CUE_NOREGISTRY if the registry has not been initialized.
+ * - CUE_NO_SUITENAME if strName is NULL.
+ * - CUE_DUP_SUITE if a suite having strName is already registered.
+ * - CUE_NOMEMORY if a memory allocation failed.
+ *
+ * @param strName Name for the new test suite (non-NULL).
+ * @param pInit Initialization function to call before running suite.
+ * @param pClean Cleanup function to call after running suite.
+ * @return A pointer to the newly-created suite (NULL if creation failed)
+ */
+
+CU_EXPORT
+CU_ErrorCode CU_set_suite_active(CU_pSuite pSuite, CU_BOOL fNewActive);
+/**<
+ * Activates or deactivates a suite.
+ * Only activated suites can be executed during a test run.
+ * By default a suite is active upon creation, but can be deactivated
+ * by passing it along with CU_FALSE to this function. The suite
+ * can be reactivated by passing it along with CU_TRUE. The current
+ * value of the active flag is available as pSuite->fActive. If pSuite
+ * is NULL then error code CUE_NOSUITE is returned.
+ *
+ * @param pSuite Pointer to the suite to modify (non-NULL).
+ * @param fNewActive If CU_TRUE then the suite will be activated;
+ * if CU_FALSE it will be deactivated.
+ * @return Returns CUE_NOSUITE if pSuite is NULL, CUE_SUCCESS if all is well.
+ */
-CU_EXPORT CU_pSuite CU_add_suite(const char* strName, CU_InitializeFunc pInit, CU_CleanupFunc pClean);
-CU_EXPORT CU_pTest CU_add_test(CU_pSuite pSuite, const char* strName, CU_TestFunc pTestFunc);
+CU_EXPORT
+CU_ErrorCode CU_set_suite_name(CU_pSuite pSuite, const char *strNewName);
+/**<
+ * Modifies the name of a suite.
+ * This function allows the name associated with a suite to
+ * be changed. It is not recommended that a suite name be changed,
+ * nor should it be necessary under most circumstances. However,
+ * this function is provided for those clients who need to change
+ * a suite's name. The current value of the suite's name
+ * is available as pSuite->pName. CUE_SUCCESS is returned if the
+ * function succeeds in changing the name. CUE_NOSUITE is returned if
+ * pSuite is NULL, and CUE_NO_SUITENAME if strNewName is NULL.
+ *
+ * @param pSuite Pointer to the suite to modify (non-NULL).
+ * @param strNewName Pointer to string containing new suite name (non-NULL).
+ * @return Returns CUE_NOSUITE if pSuite is NULL, CUE_NO_SUITENAME if
+ * strNewName is NULL, and CUE_SUCCESS if all is well.
+ */
+
+CU_EXPORT
+CU_ErrorCode CU_set_suite_initfunc(CU_pSuite pSuite, CU_InitializeFunc pNewInit);
+/**<
+ * Modifies the initialization function of a suite.
+ * This function allows the initialization function associated with
+ * a suite to be changed. This is neither recommended nor should it
+ * be necessary under most circumstances. However, this function is
+ * provided for those clients who need to change the function. The
+ * current value of the function is available as pSuite->pInitializeFunc.
+ * CUE_SUCCESS is returned if the function succeeds, or CUE_NOSUITE if
+ * pSuite is NULL. pNewInit may be NULL, which indicates the suite has
+ * no initialization function.
+ *
+ * @param pSuite Pointer to the suite to modify (non-NULL).
+ * @param pNewInit Pointer to function to use to initialize suite.
+ * @return Returns CUE_NOSUITE if pSuite is NULL, and CUE_SUCCESS if
+ * all is well.
+ */
+
+CU_EXPORT
+CU_ErrorCode CU_set_suite_cleanupfunc(CU_pSuite pSuite, CU_CleanupFunc pNewClean);
+/**<
+ * Modifies the cleanup function of a suite.
+ * This function allows the cleanup function associated with a suite to
+ * be changed. This is neither recommended nor should it be necessary
+ * under most circumstances. However, this function is provided for those
+ * clients who need to change the function. The current value of the
+ * function is available as pSuite->pCleanupFunc. CUE_SUCCESS is returned
+ * if the function succeeds, or CUE_NOSUITE if pSuite is NULL. pNewClean
+ * may be NULL, which indicates the suite has no cleanup function.
+ *
+ * @param pSuite Pointer to the suite to modify (non-NULL).
+ * @param pNewClean Pointer to function to use to clean up suite.
+ * @return Returns CUE_NOSUITE if pSuite is NULL, and CUE_SUCCESS if
+ * all is well.
+ */
+
+CU_EXPORT
+CU_pSuite CU_get_suite(const char* strName);
+/**<
+ * Retrieves the suite having the specified name.
+ * Searches the active test registry and returns a pointer to the 1st
+ * suite found. NULL is returned if no suite having the specified name
+ * is found. In addition, the framework error state is set to CUE_NOREGISTRY
+ * if the registry is not initialized or to CUE_NO_SUITENAME if strName is NULL.
+ * If the return value is NULL and framework error state is CUE_SUCCESS, then
+ * the search simply failed to find the specified name.
+ * Use CU_get_suite_at_pos() to retrieve a suite by position rather than name.
+ *
+ * @param strName The name of the suite to search for (non-NULL).
+ * @return Returns a pointer to the suite, or NULL if not found or an error occurred.
+ * @see CU_get_suite_at_pos()
+ */
+
+CU_EXPORT
+CU_pSuite CU_get_suite_at_pos(unsigned int pos);
+/**<
+ * Retrieves the suite at the specified position.
+ * Iterates the active test registry and returns a pointer to the suite at
+ * position pos. pos is a 1-based index having valid values
+ * [1 .. CU_get_registry()->uiNumberOfSuites] and corresponds to the order in
+ * which suites were registered. If pos is invalid or an error occurs, 0 is
+ * returned. In addition, the framework error state is set to CUE_NOREGISTRY if
+ * the registry is not initialized, or CUE_SUCCESS if pos was invalid. Use
+ * CU_get_suite() to retrieve a suite by name rather than position.
+ *
+ * @param pos The 1-based position of the suite to fetch.
+ * @return Returns a pointer to the suite, or 0 if not found or an error occurred.
+ * @see CU_get_suite()
+ */
+
+CU_EXPORT
+unsigned int CU_get_suite_pos(CU_pSuite pSuite);
+/**<
+ * Looks up the position of the specified suite.
+ * The position is a 1-based index of suites in the active test registry which
+ * corresponds to the order in which suites were registered. If pSuite is not
+ * found or an error occurs, 0 is returned. In addition, the framework error
+ * state is set to CUE_NOREGISTRY if the registry is not initialized, or
+ * CUE_NOSUITE if pSuite is NULL. The returned position may be used to retrieve
+ * the suite using CU_get_suite_by_pos().
+ *
+ * @param pSuite Pointer to the suite to find (non-NULL).
+ * @return Returns the 1-based position of pSuite in the registry, or NULL if
+ * not found or an error occurred.
+ * @see CU_get_suite_by_pos()
+ * @see CU_get_suite_pos_by_name()
+ */
+
+CU_EXPORT
+unsigned int CU_get_suite_pos_by_name(const char* strName);
+/**<
+ * Looks up the position of the suite having the specified name.
+ * The position is a 1-based index of suites in the active test registry which
+ * corresponds to the order in which suites were registered. If no suite has the
+ * specified name or an error occurs, 0 is returned. In addition, the framework error
+ * state is set to CUE_NOREGISTRY if the registry is not initialized, or
+ * CUE_NO_SUITENAME if strName is NULL. The search ends at the 1st suite found having
+ * name strName. The returned position may be used to retrieve the suite using
+ * CU_get_suite_by_pos().
+ *
+ * @param strName Name of the suite to find (non-NULL).
+ * @return Returns the 1-based position of pSuite in the registry, or NULL if
+ * not found or an error occurred.
+ * @see CU_get_suite_by_pos()
+ * @see CU_get_suite_pos_by_name()
+ */
+
+CU_EXPORT
+CU_pTest CU_add_test(CU_pSuite pSuite, const char* strName, CU_TestFunc pTestFunc);
+/**<
+ * This function creates a new test having the specified name
+ * and function, and adds it to the specified suite. The new test
+ * is active and able to be executed during a test run. At present,
+ * there is no mechanism for creating a test case independent of a
+ * suite. Neither pSuite, strName, nor pTestFunc may be NULL.
+ *
+ * The return value is a pointer to the newly-created test, or
+ * NULL if there was a problem with the test creation or addition.
+ * An error code is also set for the framework. Note that if the
+ * name specified for the new test is a duplicate within pSuite,
+ * the test will be created and added but the error code will be
+ * set to CUE_DUP_TEST. The duplicate test will not be accessible
+ * by name.
+ *
+ * NOTE - the CU_pTest pointer returned should NOT BE FREED BY
+ * THE USER. The test is freed by the CUnit system when
+ * CU_cleanup_registry() is called. This function must not
+ * be called during a test run (checked by assertion).
+
+ * CU_add_test() sets the following error codes:
+ * - CUE_SUCCESS if no errors occurred.
+ * - CUE_NOREGISTRY if the registry has not been initialized.
+ * - CUE_NOSUITE if pSuite is NULL.
+ * - CUE_NO_TESTNAME if strName is NULL.
+ * - CUE_NOTEST if pTestFunc is NULL.
+ * - CUE_DUP_TEST if a test having strName is already registered to pSuite.
+ * - CUE_NOMEMORY if a memory allocation failed.
+ *
+ * @param pSuite Test suite to which to add new test (non-NULL).
+ * @param strName Name for the new test case (non-NULL).
+ * @param pTest Function to call when running the test (non-NULL).
+ * @return A pointer to the newly-created test (NULL if creation failed)
+ */
+
+CU_EXPORT
+CU_ErrorCode CU_set_test_active(CU_pTest pTest, CU_BOOL fNewActive);
+/**<
+ * Activates or deactivates a specific test.
+ * Only activated tests can be executed during a test run.
+ * By default a test is active upon creation, but can be deactvated
+ * by passing it along with CU_FALSE to this function. The test
+ * can be reactivated by passing it along with CU_TRUE.
+ * The current value of the active flag is available as pTest->fActive.
+ * If pTest is NULL then error code CUE_NOTEST is returned. Otherwise
+ * CUE_SUCCESS is returned.
+ *
+ * @param pTest Pointer to the test to modify (non-NULL).
+ * @param fNewActive If CU_TRUE then test will be activated;
+ * if CU_FALSE it will be deactivated.
+ * @return Returns CUE_NOTEST if pTest is NULL, CUE_SUCCESS if all is well.
+*/
+
+CU_EXPORT
+CU_ErrorCode CU_set_test_name(CU_pTest pTest, const char *strNewName);
+/**<
+ * Modifies the name of a test.
+ * This function allows the name associated with a test to
+ * be changed. It is not recommended that a test name be changed,
+ * nor should it be necessary under most circumstances. However,
+ * this function is provided for those clients who need to change
+ * a test's name. The current value of the test's name is
+ * available as pTest->pName. CUE_SUCCESS is returned if the
+ * function succeeds in changing the name. CUE_NOTEST is returned if
+ * pTest is NULL, and CUE_NO_TESTNAME if strNewName is NULL.
+ *
+ * @param pTest Pointer to the test to modify (non-NULL).
+ * @param strNewName Pointer to string containing new test name (non-NULL).
+ * @return Returns CUE_NOTEST if pTest is NULL, CUE_NO_TESTNAME if
+ * strNewName is NULL, and CUE_SUCCESS if all is well.
+ */
+
+CU_EXPORT
+CU_ErrorCode CU_set_test_func(CU_pTest pTest, CU_TestFunc pNewFunc);
+/**<
+ * Modifies the test function of a test.
+ * This function allows the test function associated with a test to be
+ * changed. This is neither recommended nor should it be necessary under
+ * most circumstances. However, this function is provided for those
+ * clients who need to change the test function. The current value of
+ * the test function is available as pTest->pTestFunc. CUE_SUCCESS is
+ * returned if the function succeeds, or CUE_NOTEST if either pTest or
+ * pNewFunc is NULL.
+ *
+ * @param pTest Pointer to the test to modify (non-NULL).
+ * @param pNewFunc Pointer to function to use for test function (non-NULL).
+ * @return Returns CUE_NOTEST if pTest or pNewFunc is NULL, and CUE_SUCCESS
+ * if all is well.
+ */
+
+CU_EXPORT
+CU_pTest CU_get_test(CU_pSuite pSuite, const char *strName);
+/**<
+ * Retrieves the test having the specified name.
+ * Searches pSuite and returns a pointer to the 1st test found named strName.
+ * NULL is returned if no test having the specified name is found in pSuite.
+ * In addition, the framework error state is set as follows:
+ * - CUE_NOREGISTRY if the registry is not initialized
+ * - CUE_NOSUITE if pSuite is NULL
+ * - CUE_NO_TESTNAME if strName is NULL.
+ *
+ * If the return value is NULL and framework error state is CUE_SUCCESS, then
+ * the search simply failed to find the specified name. Use CU_get_test_at_pos()
+ * to retrieve a test by position rather than name.
+ *
+ * @param pSuite Pointer to the suite to search (non-NULL).
+ * @param strName The name of the test to search for (non-NULL).
+ * @return Returns a pointer to the test, or NULL if not found or an error occurred.
+ * @see CU_get_test_at_pos()
+ */
+
+CU_EXPORT
+CU_pTest CU_get_test_at_pos(CU_pSuite pSuite, unsigned int pos);
+/**<
+ * Retrieves the test at the specified position in pSuite.
+ * Iterates the tests registered in pSuite and returns a pointer to the
+ * test at position pos. pos is a 1-based index having valid values
+ * [1 .. pSuite->uiNumberOfTests] and corresponds to the order in
+ * which tests were added to pSuite. If pos is invalid or an error occurs, 0 is
+ * returned. In addition, the framework error state is set as follows:
+ * - CUE_NOREGISTRY if the registry is not initialized
+ * - CUE_NOSUITE if pSuite is NULL
+ * Use CU_get_test() to retrieve a test by name rather than position.
+ *
+ * @param pSuite Pointer to the suite to search (non-NULL).
+ * @param pos The 1-based position of the test to fetch.
+ * @return Returns a pointer to the test, or 0 if not found or an error occurred.
+ * @see CU_get_test()
+ */
+
+CU_EXPORT
+unsigned int CU_get_test_pos(CU_pSuite pSuite, CU_pTest pTest);
+/**<
+ * Looks up the position of the specified test in pSuite.
+ * The position is a 1-based index of tests in pSuite which corresponds to the
+ * order in which tests were added. If pTest is not found or an error occurs,
+ * 0 is returned. In addition, the framework error state is set as follows:
+ * - CUE_NOREGISTRY if the registry is not initialized
+ * - CUE_NOSUITE if pSuite is NULL
+ * - CUE_NOTEST if pTest is NULL
+ *
+ * The returned position may be used to retrieve the test using CU_get_test_by_pos().
+ *
+ * @param pSuite Pointer to the suite to search (non-NULL).
+ * @param pTest Pointer to the test to find (non-NULL).
+ * @return Returns the 1-based position of pTest in pSuite, or NULL if
+ * not found or an error occurred.
+ * @see CU_get_test_by_pos()
+ * @see CU_get_test_pos_by_name()
+ */
+
+CU_EXPORT
+unsigned int CU_get_test_pos_by_name(CU_pSuite pSuite, const char *strName);
+/**<
+ * Looks up the position of the test having the specified name in pSuite.
+ * The position is a 1-based index of tests in pSuite which corresponds to the order
+ * in which tests were added. If no test has the specified name or an error occurs,
+ * 0 is returned. In addition, the framework error state is set as follows:
+ * - CUE_NOREGISTRY if the registry is not initialized
+ * - CUE_NOSUITE if pSuite is NULL
+ * - CUE_NO_TESTNAME if strName is NULL
+ * The search ends at the 1st test found having name strName. The returned position
+ * may be used to retrieve the suite using CU_get_test_by_pos().
+ *
+ * @param pSuite Pointer to the suite to search (non-NULL).
+ * @param strName Name of the test to find (non-NULL).
+ * @return Returns the 1-based position of pTest in pSuite, or NULL if
+ * not found or an error occurred.
+ * @see CU_get_test_by_pos()
+ * @see CU_get_test_pos_by_name()
+ */
-/** Shortcut macro for adding a test to a suite. */
#define CU_ADD_TEST(suite, test) (CU_add_test(suite, #test, (CU_TestFunc)test))
+/**< Shortcut macro for adding a test to a suite. */
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
/* This section is based conceptually on code
@@ -229,12 +651,11 @@
* test_case_t, test_group_t, test_suite_t
*/
-/** Test case parameters.
- * This data type is provided to assist CUnit users
- * manage collections of test and suites. It is
- * intended to be used to build arrays of test case
- * parameters that can be then be referred to in
- * a CU_suite_info_t variable.
+/**
+ * Test case parameters structure.
+ * This data type is provided to assist CUnit users manage collections of
+ * tests and suites. It is intended to be used to build arrays of test case
+ * parameters that can be then be referred to in a CU_suite_info_t variable.
*/
typedef struct CU_TestInfo {
char *pName; /**< Test name. */
@@ -242,13 +663,12 @@
} CU_TestInfo;
typedef CU_TestInfo* CU_pTestInfo; /**< Pointer to CU_TestInfo type. */
-/** Suite parameters.
- * This data type is provided to assist CUnit users
- * manage collections of test and suites. It is
- * intended to be used to build arrays of suite
- * parameters that can be passed to a bulk registration
- * function such as CU_register_suite() or
- * CU_register_suites().
+/**
+ * Suite parameters.
+ * This data type is provided to assist CUnit users manage collections of
+ * tests and suites. It is intended to be used to build arrays of suite
+ * parameters that can be passed to a bulk registration function such as
+ * CU_register_suite() or CU_register_suites().
*/
typedef struct CU_SuiteInfo {
char *pName; /**< Suite name. */
@@ -258,13 +678,34 @@
} CU_SuiteInfo;
typedef CU_SuiteInfo* CU_pSuiteInfo; /**< Pointer to CU_SuiteInfo type. */
-/** NULL CU_test_info_t to terminate arrays of tests. */
#define CU_TEST_INFO_NULL { NULL, NULL }
-/** NULL CU_suite_info_t to terminate arrays of suites. */
+/**< NULL CU_test_info_t to terminate arrays of tests. */
#define CU_SUITE_INFO_NULL { NULL, NULL, NULL, NULL }
+/**< NULL CU_suite_info_t to terminate arrays of suites. */
+
CU_EXPORT CU_ErrorCode CU_register_suites(CU_SuiteInfo suite_info[]);
+/**<
+ * Registers the suites in a single CU_SuiteInfo array.
+ * Multiple arrays can be registered using CU_register_nsuites().
+ *
+ * @param suite_info NULL-terminated array of CU_SuiteInfo items to register.
+ * @return A CU_ErrorCode indicating the error status.
+ * @see CU_register_suites()
+ */
CU_EXPORT CU_ErrorCode CU_register_nsuites(int suite_count, ...);
+/**<
+ * Registers multiple suite arrays in CU_SuiteInfo format.
+ * The function accepts a variable number of suite arrays to be registered.
+ * The number of arrays is indicated by the value of the 1st argument,
+ * suite_count. Each suite in each array is registered with the CUnit test
+ * registry, along with all of the associated tests.
+ *
+ * @param suite_count The number of CU_SuiteInfo* arguments to follow.
+ * @param ... suite_count number of CU_SuiteInfo* arguments. NULLs are ignored.
+ * @return A CU_ErrorCode indicating the error status.
+ * @see CU_register_suites()
+ */
#ifdef USE_DEPRECATED_CUNIT_NAMES
typedef CU_TestInfo test_case_t; /**< Deprecated (version 1). @deprecated Use CU_TestInfo. */
@@ -338,13 +779,129 @@
#define ADD_TEST_TO_GROUP(group, test) (CU_add_test(group, #test, (CU_TestFunc)test))
#endif /* USE_DEPRECATED_CUNIT_NAMES */
-/* Internal CUnit system functions. Should not be routinely called by users. */
+/*=================================================================
+ * Internal CUnit system functions.
+ * Should not be routinely called by users.
+ *=================================================================*/
+
CU_EXPORT CU_pTestRegistry CU_get_registry(void);
+/**<
+ * Retrieves a pointer to the current test registry.
+ * Returns NULL if the registry has not been initialized using
+ * CU_initialize_registry(). Directly accessing the registry
+ * should not be necessary for most users. This function is
+ * provided primarily for internal and testing purposes.
+ *
+ * @return A pointer to the current registry (NULL if uninitialized).
+ * @see CU_initialize_registry
+ * @see CU_set_registry
+ */
+
CU_EXPORT CU_pTestRegistry CU_set_registry(CU_pTestRegistry pTestRegistry);
+/**<
+ * Sets the registry to an existing CU_pTestRegistry instance.
+ * A pointer to the original registry is returned. Note that the
+ * original registry is not freed, and it becomes the caller's
+ * responsibility to do so. Directly accessing the registry
+ * should not be necessary for most users. This function is
+ * provided primarily for internal and testing purposes.
+ *
+ * This function must not be called during a test run (checked
+ * by assertion).
+ *
+ * @return A pointer to the original registry that was replaced.
+ * @see CU_initialize_registry
+ * @see CU_cleanup_registry
+ * @see CU_get_registry
+ */
+
CU_EXPORT CU_pTestRegistry CU_create_new_registry(void);
-CU_EXPORT void CU_destroy_existing_registry(CU_pTestRegistry* ppRegistry);
-CU_EXPORT CU_pSuite CU_get_suite_by_name(const char* szSuiteName, CU_pTestRegistry pRegistry);
-CU_EXPORT CU_pTest CU_get_test_by_name(const char* szTestName, CU_pSuite pSuite);
+/**<
+ * Creates and initializes a new test registry.
+ * Returns a pointer to a new, initialized registry (NULL if memory could
+ * not be allocated). It is the caller's responsibility to destroy and free
+ * the new registry (unless it is made the active test registry using
+ * CU_set_registry()).
+ */
+
+CU_EXPORT
+void CU_destroy_existing_registry(CU_pTestRegistry* ppRegistry);
+/**<
+ * Destroys and frees all memory for an existing test registry.
+ * The active test registry is destroyed by the CUnit system in
+ * CU_cleanup_registry(), so only call this function on registries created
+ * or held independently of the internal CUnit system.
+ *
+ * Once a registry is made the active test registry using CU_set_registry(),
+ * its destruction will be handled by the framework. ppRegistry may not be
+ * NULL (checked by assertion), but *ppRegistry can be NULL (in which case the
+ * function has no effect). Note that *ppRegistry will be set to NULL on return.
+ *
+ * @param ppRegistry Address of a pointer to the registry to destroy (non-NULL).
+ */
+
+CU_EXPORT
+CU_pSuite CU_get_suite_by_name(const char *szSuiteName, CU_pTestRegistry pRegistry);
+/**<
+ * Retrieves a pointer to the suite having the specified name.
+ * Scans the pRegistry and returns a pointer to the first suite located
+ * having the specified name. Neither szSuiteName nor pRegistry may be
+ * NULL (checked by assertion). Clients should normally use CU_get_suite()
+ * instead, which automatically searches the active test registry.
+ *
+ * @param szSuiteName The name of the suite to locate (non-NULL).
+ * @param pRegistry The registry to scan (non-NULL).
+ * @return Pointer to the first suite having the specified name,
+ * NULL if not found.
+ * @see CU_get_suite()
+ */
+
+CU_EXPORT
+CU_pSuite CU_get_suite_by_index(unsigned int index, CU_pTestRegistry pRegistry);
+/**<
+ * Retrieves a pointer to the suite at the specified (1-based) index.
+ * Iterates pRegistry and returns a pointer to the suite located at the
+ * specified index. pRegistry may not be NULL (checked by assertion).
+ * Clients should normally use CU_get_suite_at_pos() instead, which
+ * automatically searches the active test registry.
+ *
+ * @param index The 1-based index of the suite to find.
+ * @param pRegistry The registry to scan (non-NULL).
+ * @return Pointer to the suite at the specified index, or
+ * NULL if index is invalid.
+ * @see CU_get_suite_at_pos()
+ */
+
+CU_EXPORT
+CU_pTest CU_get_test_by_name(const char* szTestName, CU_pSuite pSuite);
+/**<
+ * Retrieves a pointer to the test case in pSuite having the specified name.
+ * The first test case in pSuite having the specified name is returned, or
+ * NULL if not found. Neither szSuiteName nor pSuite may be NULL (checked
+ * by assertion). Clients should normally use CU_get_test() instead.
+ *
+ * @param szTestName The name of the test case to locate (non-NULL).
+ * @param pSuite The suite to scan (non-NULL).
+ * @return Pointer to the first test case having the specified name,
+ * NULL if not found.
+ * @see CU_get_test()
+ */
+
+CU_EXPORT
+CU_pTest CU_get_test_by_index(unsigned int index, CU_pSuite pSuite);
+/**<
+ * Retrieves a pointer to the test at the specified (1-based) index.
+ * Iterates pSuite and returns a pointer to the test located at the
+ * specified index. pSuite may not be NULL (checked by assertion).
+ * Clients should normally use CU_get_test_at_pos() instead, which
+ * automatically searches the active test registry.
+ *
+ * @param index The 1-based index of the test to find.
+ * @param pRegistry The registry to scan (non-NULL).
+ * @return Pointer to the test at the specified index, or
+ * NULL if index is invalid.
+ * @see CU_get_test_at_pos()
+ */
#ifdef CUNIT_BUILD_TESTS
void test_cunit_TestDB(void);
diff -Nru cunit-2.1-0.dfsg/CUnit/Headers/TestRun.h cunit-2.1-2.dfsg/CUnit/Headers/TestRun.h
--- cunit-2.1-0.dfsg/CUnit/Headers/TestRun.h 2006-01-30 03:48:26.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Headers/TestRun.h 2010-10-13 12:59:17.000000000 +0000
@@ -1,7 +1,7 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -34,6 +34,16 @@
* moved (renamed) _TestResult here from TestDB.h. (JDS)
*
* 05-Sep-2004 Added internal test interface. (JDS)
+ *
+ * 23-Apr-2006 Moved doxygen comments into header.
+ * Added type marker to CU_FailureRecord.
+ * Added support for tracking inactive suites/tests. (JDS)
+ *
+ * 08-May-2006 Moved CU_print_run_results() functionality from
+ * console/basic test complete handler. (JDS)
+ *
+ * 24-May-2006 Added callbacks for suite start and complete events.
+ * Added tracking/reported of elapsed time. (JDS)
*/
/** @file
@@ -41,14 +51,14 @@
* The TestRun module implements functions supporting the running
* of tests elements (suites and tests). This includes functions for
* running suites and tests, retrieving the number of tests/suites run,
- * and managing callbacks during the run process.
+ * and managing callbacks during the run process.
*
- * The callback mechanism works as follows. The CUnit runtime system
+ * The callback mechanism works as follows. The CUnit runtime system
* supports the registering and calling of functions at the start and end
* of each test, when all tests are complete, and when a suite
* initialialization function returns an error. This allows clients to
* perform actions associated with these events such as output formatting
- * and reporting.
+ * and reporting.
*/
/** @addtogroup Framework
* @{
@@ -60,20 +70,32 @@
#include "CUnit.h"
#include "CUError.h"
#include "TestDB.h"
+#include
#ifdef __cplusplus
extern "C" {
#endif
+/** Types of failures occurring during test runs. */
+typedef enum CU_FailureTypes
+{
+ CUF_SuiteInactive = 1, /**< Inactive suite was run. */
+ CUF_SuiteInitFailed, /**< Suite initialization function failed. */
+ CUF_SuiteCleanupFailed, /**< Suite cleanup function failed. */
+ CUF_TestInactive, /**< Inactive test was run. */
+ CUF_AssertFailed /**< CUnit assertion failed during test run. */
+} CU_FailureType; /**< Failure type. */
+
/* CU_FailureRecord type definition. */
/** Data type for holding assertion failure information (linked list). */
typedef struct CU_FailureRecord
{
- unsigned int uiLineNumber; /**< Line number of failure. */
- char* strFileName; /**< Name of file where failure occurred. */
- char* strCondition; /**< Test condition which failed. */
- CU_pTest pTest; /**< Test containing failure. */
- CU_pSuite pSuite; /**< Suite containing test having failure. */
+ CU_FailureType type; /**< Failure type. */
+ unsigned int uiLineNumber; /**< Line number of failure. */
+ char* strFileName; /**< Name of file where failure occurred. */
+ char* strCondition; /**< Test condition which failed. */
+ CU_pTest pTest; /**< Test containing failure. */
+ CU_pSuite pSuite; /**< Suite containing test having failure. */
struct CU_FailureRecord* pNext; /**< Pointer to next record in linked list. */
struct CU_FailureRecord* pPrev; /**< Pointer to previous record in linked list. */
@@ -87,95 +109,324 @@
{
unsigned int nSuitesRun; /**< Number of suites completed during run. */
unsigned int nSuitesFailed; /**< Number of suites for which initialization failed. */
+ unsigned int nSuitesInactive; /**< Number of suites which were inactive. */
unsigned int nTestsRun; /**< Number of tests completed during run. */
unsigned int nTestsFailed; /**< Number of tests containing failed assertions. */
+ unsigned int nTestsInactive; /**< Number of tests which were inactive (in active suites). */
unsigned int nAsserts; /**< Number of assertions tested during run. */
unsigned int nAssertsFailed; /**< Number of failed assertions. */
unsigned int nFailureRecords; /**< Number of failure records generated. */
+ double ElapsedTime; /**< Elapsed time for run in seconds. */
} CU_RunSummary;
typedef CU_RunSummary* CU_pRunSummary; /**< Pointer to CU_RunSummary. */
-/* Type Definitions for Message Handlers. */
-/** Message handler called at the start of a test.
- * The parameters are the test and suite being run.
- * The test run is considered in progress when the
- * message handler is called. Neither pTest nor
- * pSuite may be null.
- */
+/*--------------------------------------------------------------------
+ * Type Definitions for Message Handlers.
+ *--------------------------------------------------------------------*/
+typedef void (*CU_SuiteStartMessageHandler)(const CU_pSuite pSuite);
+/**< Message handler called at the start of a suite. pSuite will not be null. */
+
typedef void (*CU_TestStartMessageHandler)(const CU_pTest pTest, const CU_pSuite pSuite);
-/** Message handler called at the completion of a test.
- * The parameters are the test and suite being run, plus
- * a pointer to the first failure record applicable to
- * this test. If the test did not have any assertion
- * failures, pFailure will be NULL.
- * The test run is considered in progress when the
- * message handler is called.
+/**< Message handler called at the start of a test.
+ * The parameters are the test and suite being run. The test run is
+ * considered in progress when the message handler is called.
+ * Neither pTest nor pSuite may be null.
*/
+
typedef void (*CU_TestCompleteMessageHandler)(const CU_pTest pTest, const CU_pSuite pSuite,
const CU_pFailureRecord pFailure);
-/** Message handler called at the completion of a test run.
- * The parameter is a pointer to the linked list holding
- * the failure records for the test run.
- * The test run is considered completed when the
- * message handler is called.
+/**< Message handler called at the completion of a test.
+ * The parameters are the test and suite being run, plus a pointer to
+ * the first failure record applicable to this test. If the test did
+ * not have any assertion failures, pFailure will be NULL. The test run
+ * is considered in progress when the message handler is called.
*/
-typedef void (*CU_AllTestsCompleteMessageHandler)(const CU_pFailureRecord pFailure);
-/** Message handler called when a suite initializer fails.
- * The test run is considered in progress when the
- * message handler is called.
+typedef void (*CU_SuiteCompleteMessageHandler)(const CU_pSuite pSuite,
+ const CU_pFailureRecord pFailure);
+/**< Message handler called at the completion of a suite.
+ * The parameters are suite being run, plus a pointer to the first failure
+ * record applicable to this suite. If the suite and it's tests did not
+ * have any failures, pFailure will be NULL. The test run is considered
+ * in progress when the message handler is called.
+ */
+
+typedef void (*CU_AllTestsCompleteMessageHandler)(const CU_pFailureRecord pFailure);
+/**< Message handler called at the completion of a test run.
+ * The parameter is a pointer to the linked list holding the failure
+ * records for the test run. The test run is considered completed
+ * when the message handler is called.
*/
-typedef void (*CU_SuiteInitFailureMessageHandler)(const CU_pSuite pSuite);
-/** Message handler called when a suite cleanup function fails.
- * The test run is considered in progress when the
- * message handler is called.
+typedef void (*CU_SuiteInitFailureMessageHandler)(const CU_pSuite pSuite);
+/**< Message handler called when a suite initializer fails.
+ * The test run is considered in progress when the message handler is called.
*/
+
typedef void (*CU_SuiteCleanupFailureMessageHandler)(const CU_pSuite pSuite);
+/**< Message handler called when a suite cleanup function fails.
+ * The test run is considered in progress when the message handler is called.
+ */
-/* Get/Set functions for Message Handlers. */
+/*--------------------------------------------------------------------
+ * Get/Set functions for Message Handlers
+ *--------------------------------------------------------------------*/
+CU_EXPORT void CU_set_suite_start_handler(CU_SuiteStartMessageHandler pSuiteStartMessage);
+/**< Sets the message handler to call before each suite is run. */
CU_EXPORT void CU_set_test_start_handler(CU_TestStartMessageHandler pTestStartMessage);
+/**< Sets the message handler to call before each test is run. */
CU_EXPORT void CU_set_test_complete_handler(CU_TestCompleteMessageHandler pTestCompleteMessage);
+/**< Sets the message handler to call after each test is run. */
+CU_EXPORT void CU_set_suite_complete_handler(CU_SuiteCompleteMessageHandler pSuiteCompleteMessage);
+/**< Sets the message handler to call after each suite is run. */
CU_EXPORT void CU_set_all_test_complete_handler(CU_AllTestsCompleteMessageHandler pAllTestsCompleteMessage);
+/**< Sets the message handler to call after all tests have been run. */
CU_EXPORT void CU_set_suite_init_failure_handler(CU_SuiteInitFailureMessageHandler pSuiteInitFailureMessage);
+/**< Sets the message handler to call when a suite initialization function returns an error. */
CU_EXPORT void CU_set_suite_cleanup_failure_handler(CU_SuiteCleanupFailureMessageHandler pSuiteCleanupFailureMessage);
+/**< Sets the message handler to call when a suite cleanup function returns an error. */
+CU_EXPORT CU_SuiteStartMessageHandler CU_get_suite_start_handler(void);
+/**< Retrieves the message handler called before each suite is run. */
CU_EXPORT CU_TestStartMessageHandler CU_get_test_start_handler(void);
+/**< Retrieves the message handler called before each test is run. */
CU_EXPORT CU_TestCompleteMessageHandler CU_get_test_complete_handler(void);
+/**< Retrieves the message handler called after each test is run. */
+CU_EXPORT CU_SuiteCompleteMessageHandler CU_get_suite_complete_handler(void);
+/**< Retrieves the message handler called after each suite is run. */
CU_EXPORT CU_AllTestsCompleteMessageHandler CU_get_all_test_complete_handler(void);
+/**< Retrieves the message handler called after all tests are run. */
CU_EXPORT CU_SuiteInitFailureMessageHandler CU_get_suite_init_failure_handler(void);
+/**< Retrieves the message handler called when a suite initialization error occurs. */
CU_EXPORT CU_SuiteCleanupFailureMessageHandler CU_get_suite_cleanup_failure_handler(void);
+/**< Retrieves the message handler called when a suite cleanup error occurs. */
-/* Functions for running registered tests and suites. */
+/*--------------------------------------------------------------------
+ * Functions for running registered tests and suites.
+ *--------------------------------------------------------------------*/
CU_EXPORT CU_ErrorCode CU_run_all_tests(void);
+/**<
+ * Runs all tests in all suites registered in the test registry.
+ * The suites are run in the order registered in the test registry.
+ * For each suite, it is first checked to make sure it is active.
+ * Any initialization function is then called, the suite is run
+ * using run_single_suite(), and finally any suite cleanup function
+ * is called. If an error condition (other than CUE_NOREGISTRY)
+ * occurs during the run, the action depends on the current error
+ * action (see CU_set_error_action()). An inactive suite is not
+ * considered an error for this function. Note that the run
+ * statistics (counts of tests, successes, failures) are cleared
+ * each time this function is run, even if it is unsuccessful.
+ *
+ * @return A CU_ErrorCode indicating the first error condition
+ * encountered while running the tests.
+ * @see CU_run_suite() to run the tests in a specific suite.
+ * @see CU_run_test() for run a specific test only.
+ */
+
CU_EXPORT CU_ErrorCode CU_run_suite(CU_pSuite pSuite);
+/**<
+ * Runs all tests in a specified suite.
+ * The suite need not be registered in the test registry to be
+ * run. It does, however, need to have its fActive flag set to
+ * CU_TRUE.
+ *
+ * Any initialization function for the suite is first called,
+ * then the suite is run using run_single_suite(), and any suite
+ * cleanup function is called. Note that the run statistics
+ * (counts of tests, successes, failures) are initialized each
+ * time this function is called even if it is unsuccessful. If
+ * an error condition occurs during the run, the action depends
+ * on the current error action (see CU_set_error_action()).
+ *
+ * @param pSuite The suite containing the test (non-NULL)
+ * @return A CU_ErrorCode indicating the first error condition
+ * encountered while running the suite. CU_run_suite()
+ * sets and returns CUE_NOSUITE if pSuite is NULL, or
+ * CUE_SUITE_INACTIVE if the requested suite is not
+ * activated. Other error codes can be set during suite
+ * initialization or cleanup or during test runs.
+ * @see CU_run_all_tests() to run all suites.
+ * @see CU_run_test() to run a single test in a specific suite.
+ */
+
CU_EXPORT CU_ErrorCode CU_run_test(CU_pSuite pSuite, CU_pTest pTest);
+/**<
+ * Runs a specific test in a specified suite.
+ * The suite need not be registered in the test registry to be run,
+ * although the test must be registered in the specified suite.
+ * Any initialization function for the suite is first
+ * called, then the test is run using run_single_test(), and
+ * any suite cleanup function is called. Note that the
+ * run statistics (counts of tests, successes, failures)
+ * will be initialized each time this function is called even
+ * if it is not successful. Both the suite and test specified
+ * must be active for the test to be run. The suite is not
+ * considered to be run, although it may be counted as a failed
+ * suite if the intialization or cleanup functions fail.
+ *
+ * @param pSuite The suite containing the test (non-NULL)
+ * @param pTest The test to run (non-NULL)
+ * @return A CU_ErrorCode indicating the first error condition
+ * encountered while running the suite. CU_run_test()
+ * sets and returns CUE_NOSUITE if pSuite is NULL,
+ * CUE_NOTEST if pTest is NULL, CUE_SUITE_INACTIVE if
+ * pSuite is not active, CUE_TEST_NOT_IN_SUITE
+ * if pTest is not registered in pSuite, and CU_TEST_INACTIVE
+ * if pTest is not active. Other error codes can be set during
+ * suite initialization or cleanup or during the test run.
+ * @see CU_run_all_tests() to run all tests/suites.
+ * @see CU_run_suite() to run all tests in a specific suite.
+ */
-/* Functions for getting information about the previous test run. */
+/*--------------------------------------------------------------------
+ * Functions for setting runtime behavior.
+ *--------------------------------------------------------------------*/
+CU_EXPORT void CU_set_fail_on_inactive(CU_BOOL new_inactive);
+/**<
+ * Sets whether an inactive suite or test is treated as a failure.
+ * If CU_TRUE, then failure records will be generated for inactive
+ * suites or tests encountered during a test run. The default is
+ * CU_TRUE so that the client is reminded that the framewrork
+ * contains inactive suites/tests. Set to CU_FALSE to turn off
+ * this behavior.
+ *
+ * @param new_inactive New setting for whether to treat inactive
+ * suites and tests as failures during a test
+ * run (CU_TRUE) or not (CU_FALSE).
+ * @see CU_get_fail_on_failure()
+ */
+
+CU_EXPORT CU_BOOL CU_get_fail_on_inactive(void);
+/**<
+ * Retrieves the current setting for whether inactive suites/tests
+ * are treated as failures. If CU_TRUE then failure records will
+ * be generated for inactive suites encountered during a test run.
+ *
+ * @return CU_TRUE if inactive suites/tests are failures, CU_FALSE if not.
+ * @see CU_set_fail_on_inactive()
+ */
+
+/*--------------------------------------------------------------------
+ * Functions for getting information about the previous test run.
+ *--------------------------------------------------------------------*/
CU_EXPORT unsigned int CU_get_number_of_suites_run(void);
+/**< Retrieves the number of suites completed during the previous run (reset each run). */
CU_EXPORT unsigned int CU_get_number_of_suites_failed(void);
+/**< Retrieves the number of suites which failed to initialize during the previous run (reset each run). */
+CU_EXPORT unsigned int CU_get_number_of_suites_inactive(void);
+/**< Retrieves the number of inactive suites found during the previous run (reset each run). */
CU_EXPORT unsigned int CU_get_number_of_tests_run(void);
+/**< Retrieves the number of tests completed during the previous run (reset each run). */
CU_EXPORT unsigned int CU_get_number_of_tests_failed(void);
+/**< Retrieves the number of tests containing failed assertions during the previous run (reset each run). */
+CU_EXPORT unsigned int CU_get_number_of_tests_inactive(void);
+/**< Retrieves the number of inactive tests found during the previous run (reset each run). */
CU_EXPORT unsigned int CU_get_number_of_asserts(void);
+/**< Retrieves the number of assertions processed during the last run (reset each run). */
CU_EXPORT unsigned int CU_get_number_of_successes(void);
+/**< Retrieves the number of successful assertions during the last run (reset each run). */
CU_EXPORT unsigned int CU_get_number_of_failures(void);
+/**< Retrieves the number of failed assertions during the last run (reset each run). */
CU_EXPORT unsigned int CU_get_number_of_failure_records(void);
+/**<
+ * Retrieves the number failure records created during the previous run (reset each run).
+ * Note that this may be more than the number of failed assertions, since failure
+ * records may also be created for failed suite initialization and cleanup.
+ */
+CU_EXPORT double CU_get_elapsed_time(void);
+/**<
+ * Retrieves the elapsed time for the last run in seconds (reset each run).
+ * This function will calculate the current elapsed time if the test run has not
+ * yet completed. This is in contrast to the run summary returned by
+ * CU_get_run_summary(), for which the elapsed time is not updated until the
+ * end of the run.
+ */
CU_EXPORT CU_pFailureRecord CU_get_failure_list(void);
+/**<
+ * Retrieves the head of the linked list of failures which occurred during the
+ * last run (reset each run). Note that the pointer returned is invalidated
+ * when the client initiates a run using CU_run_all_tests(), CU_run_suite(),
+ * or CU_run_test().
+ */
CU_EXPORT CU_pRunSummary CU_get_run_summary(void);
+/**<
+ * Retrieves the entire run summary for the last test run (reset each run).
+ * The run counts and stats contained in the run summary are updated
+ * throughout a test run. Note, however, that the elapsed time is not
+ * updated until after all suites/tests are run but before the "all tests
+ * complete" message handler is called (if any). To get the elapsed
+ * time during a test run, use CU_get_elapsed_time() instead.
+ */
+
+CU_EXPORT char * CU_get_run_results_string(void);
+/**<
+ * Creates a string and fills it with a summary of the current run results.
+ * The run summary presents data for the suites, tests, and assertions
+ * encountered during the run, as well as the elapsed time. The data
+ * presented include the number of registered, run, passed, failed, and
+ * inactive entities for each, as well as the elapsed time. This function
+ * can be called at any time, although the test registry must have been
+ * initialized (checked by assertion). The returned string is owned by
+ * the caller and should be deallocated using CU_FREE(). NULL is returned
+ * if there is an error allocating the new string.
+ *
+ * @return A new string containing the run summary (owned by caller).
+ */
+
+CU_EXPORT void CU_print_run_results(FILE *file);
+/**<
+ * Prints a summary of the current run results to file.
+ * The run summary is the same as returned by CU_get_run_results_string().
+ * Note that no newlines are printed before or after the report, so any
+ * positioning must be performed before/after calling this function. The
+ * report itself extends over several lines broken by '\n' characters.
+ * file may not be NULL (checked by assertion).
+ *
+ * @param file Pointer to stream to receive the printed summary (non-NULL).
+ */
-/* Functions for internal & testing use. */
+/*--------------------------------------------------------------------
+ * Functions for internal & testing use.
+ *--------------------------------------------------------------------*/
CU_EXPORT CU_pSuite CU_get_current_suite(void);
+/**< Retrieves a pointer to the currently-running suite (NULL if none). */
CU_EXPORT CU_pTest CU_get_current_test(void);
+/**< Retrievea a pointer to the currently-running test (NULL if none). */
CU_EXPORT CU_BOOL CU_is_test_running(void);
+/**< Returns CU_TRUE
if a test run is in progress,
+ * CU_TRUE
otherwise.
+ */
+
CU_EXPORT void CU_clear_previous_results(void);
+/**<
+ * Initializes the run summary information stored from the previous test run.
+ * Resets the run counts to zero, and frees any memory associated with
+ * failure records. Calling this function multiple times, while inefficient,
+ * will not cause an error condition.
+ * @see clear_previous_results()
+ */
-/* Assertion implementation function. */
CU_EXPORT CU_BOOL CU_assertImplementation(CU_BOOL bValue,
unsigned int uiLine,
- char strCondition[],
- char strFile[],
- char strFunction[],
+ const char *strCondition,
+ const char *strFile,
+ const char *strFunction,
CU_BOOL bFatal);
+/**<
+ * Assertion implementation function.
+ * All CUnit assertions reduce to a call to this function. It should only be
+ * called during an active test run (checked by assertion). This means that CUnit
+ * assertions should only be used in registered test functions during a test run.
+ *
+ * @param bValue Value of the assertion (CU_TRUE or CU_FALSE).
+ * @param uiLine Line number of failed test statement.
+ * @param strCondition String containing logical test that failed.
+ * @param strFile Source file where test statement failed.
+ * @param strFunction Function where test statement failed.
+ * @param bFatal CU_TRUE to abort test (via longjmp()), CU_FALSE to continue test.
+ * @return As a convenience, returns the value of the assertion (i.e. bValue).
+ */
#ifdef USE_DEPRECATED_CUNIT_NAMES
typedef CU_FailureRecord _TestResult; /**< @deprecated Use CU_FailureRecord. */
diff -Nru cunit-2.1-0.dfsg/CUnit/Headers/Util.h cunit-2.1-2.dfsg/CUnit/Headers/Util.h
--- cunit-2.1-0.dfsg/CUnit/Headers/Util.h 2006-01-30 03:48:26.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Headers/Util.h 2006-05-19 21:57:27.000000000 +0000
@@ -1,7 +1,7 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -30,6 +30,12 @@
* 20-Jul-2004 New interface, support for deprecated version 1 names. (JDS)
*
* 5-Sep-2004 Added internal test interface. (JDS)
+ *
+ * 17-Apr-2006 Added CU_translated_strlen() and CU_number_width().
+ * Removed CUNIT_MAX_STRING_LENGTH - dangerous since not enforced.
+ * Fixed off-by-1 error in CU_translate_special_characters(),
+ * modifying implementation & results in some cases. User can
+ * now tell if conversion failed. (JDS)
*/
/** @file
@@ -48,17 +54,80 @@
extern "C" {
#endif
-/** Maximum string length. */
-#define CUNIT_MAX_STRING_LENGTH 1024
-/** maximum number of characters in a translated xml entity. */
#define CUNIT_MAX_ENTITY_LEN 5
+/**< Maximum number of characters in a translated xml entity. */
+
+CU_EXPORT size_t CU_translate_special_characters(const char *szSrc, char *szDest, size_t maxlen);
+/**<
+ * Converts special characters in szSrc to xml entity codes and stores
+ * result in szDest. Currently conversion of '&', '<', and '>' is supported.
+ * Note that conversion to entities increases the length of the converted
+ * string. The greatest conversion size increase would be a string
+ * consisting entirely of entity characters of converted length
+ * CUNIT_MAX_ENTITY_LEN. Neither szSrc nor szDest may be NULL
+ * (checked by assertion).
+ *
+ * maxlen gives the maximum number of characters in the translated string.
+ * If szDest does not have enough room to hold the converted string, the
+ * return value will be zero and szDest will contain an empty string.
+ * If this occurs, the remaining characters in szDest may be overwritten
+ * in an unspecified manner. It is the caller's responsibility to make
+ * sure there is sufficient room in szDest to hold the converted string.
+ * CU_translated_strlen() may be used to calculate the length of buffer
+ * required (remember to add 1 for the terminating \0).
+ *
+ * @param szSrc Source string to convert (non-NULL).
+ * @param szDest Location to hold the converted string (non-NULL).
+ * @param maxlen Maximum number of characters szDest can hold.
+ * @return The number of special characters converted (always 0 if
+ * szDest did not have enough room to hold converted string).
+ */
+
+CU_EXPORT size_t CU_translated_strlen(const char *szSrc);
+/**<
+ * Calculates the length of a translated string.
+ * This function calculates the buffer length required to hold a string
+ * after processing with CU_translate_special_characters(). The returned
+ * length does not include space for the terminating '\0' character.
+ * szSrc may not be NULL (checked by assertion).
+ *
+ * @param szSrc Source string to analyze (non-NULL).
+ * @return The number of characters szSrc will expand to when converted.
+ */
+
+CU_EXPORT int CU_compare_strings(const char *szSrc, const char *szDest);
+/**<
+ * Case-insensitive string comparison. Neither string pointer
+ * can be NULL (checked by assertion).
+ *
+ * @param szSrc 1st string to compare (non-NULL).
+ * @param szDest 2nd string to compare (non-NULL).
+ * @return 0 if the strings are equal, non-zero otherwise.
+ */
+
+CU_EXPORT void CU_trim_left(char *szString);
+/**<
+ * Trims leading whitespace from the specified string.
+ * @param szString The string to trim.
+ */
+
+CU_EXPORT void CU_trim_right(char *szString);
+/**<
+ * Trims trailing whitespace from the specified string.
+ * @param szString The string to trim.
+ */
-CU_EXPORT int CU_translate_special_characters(const char* szSrc, char* szDest, size_t maxlen);
-CU_EXPORT int CU_compare_strings(const char* szSrc, const char* szDest);
+CU_EXPORT void CU_trim(char *szString);
+/**<
+ * Trims leading and trailing whitespace from the specified string.
+ * @param szString The string to trim.
+ */
-CU_EXPORT void CU_trim_left(char* szString);
-CU_EXPORT void CU_trim_right(char* szString);
-CU_EXPORT void CU_trim(char* szString);
+CU_EXPORT size_t CU_number_width(int number);
+/**<
+ * Calulates the number of places required to display
+ * number in decimal.
+ */
#ifdef CUNIT_BUILD_TESTS
void test_cunit_Util(void);
@@ -69,17 +138,19 @@
#endif
#ifdef USE_DEPRECATED_CUNIT_NAMES
-/** Deprecated (version 1). @deprecated Use CU_translate_special_characters(). */
+#define CUNIT_MAX_STRING_LENGTH 1024
+/**< Maximum string length. */
#define translate_special_characters(src, dest, len) CU_translate_special_characters(src, dest, len)
-/** Deprecated (version 1). @deprecated Use CU_compare_strings(). */
+/**< Deprecated (version 1). @deprecated Use CU_translate_special_characters(). */
#define compare_strings(src, dest) CU_compare_strings(src, dest)
+/**< Deprecated (version 1). @deprecated Use CU_compare_strings(). */
-/** Deprecated (version 1). @deprecated Use CU_trim_left(). */
#define trim_left(str) CU_trim_left(str)
-/** Deprecated (version 1). @deprecated Use CU_trim_right(). */
+/**< Deprecated (version 1). @deprecated Use CU_trim_left(). */
#define trim_right(str) CU_trim_right(str)
-/** Deprecated (version 1). @deprecated Use CU_trim(). */
+/**< Deprecated (version 1). @deprecated Use CU_trim_right(). */
#define trim(str) CU_trim(str)
+/**< Deprecated (version 1). @deprecated Use CU_trim(). */
#endif /* USE_DEPRECATED_CUNIT_NAMES */
diff -Nru cunit-2.1-0.dfsg/CUnit/Jamfile cunit-2.1-2.dfsg/CUnit/Jamfile
--- cunit-2.1-0.dfsg/CUnit/Jamfile 2006-03-21 01:30:48.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Jamfile 1970-01-01 00:00:00.000000000 +0000
@@ -1,157 +0,0 @@
-#
-# Jamfile to build CUnit - Source root Directory
-# (see http://www.freetype.org/jam/index.html)
-#
-# Copyright (C) 2004-2006 Jerry St.Clair
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#---------------------------------------------------------------------------
-
-SubDir TOP CUnit ;
-
-SubDirHdrs $(CUNIT_HDR_DIR) $(CUNIT_WIN_DIR) ;
-
-# set location for target, source, and temporary files
-LOCATE_TARGET = $(BUILD_DIR)$(SLASH)CUnit ;
-
-SEARCH_SOURCE +=
- $(TOP)$(SLASH)CUnit
- $(TOP)$(SLASH)CUnit$(SLASH)Headers
- $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Framework
- ;
-
-SOURCES =
- CUError.c
- MyMem.c
- TestDB.c
- TestRun.c
- Util.c
- ;
-
-if $(BUILD_AUTOMATED)
-{
- SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Automated ;
- SOURCES += Automated.c ;
-}
-if $(BUILD_BASIC)
-{
- SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Basic ;
- SOURCES += Basic.c ;
-}
-if $(BUILD_CONSOLE)
-{
- SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Console ;
- SOURCES += Console.c ;
-}
-if $(BUILD_CURSES)
-{
- SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Curses ;
- SOURCES += Curses.c ;
-}
-if $(BUILD_WINDOWS)
-{
- SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Win ;
- SOURCES += Win.c ;
-}
-
-if $(BUILD_SHARED_LIB)
-{
- if $(NT)
- {
- # extra symbolic targets for building CUnit library
- DEPENDS cunit CUnit libcunit : $(CUNIT_LIB_NAME)$(SUFSHR) ;
-
- SubDirCcFlags -DCU_DLL -DCU_BUILD_DLL ;
-
- Main $(CUNIT_LIB_NAME)$(SUFSHR) : $(SOURCES) ;
- MakeLocate $(CUNIT_LIB_NAME)$(SUFSHR) : $(BUILD_DIR) ;
-
- if $(BCCROOT) || ( $(TOOLSET) = BORLANDC )
- {
- LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR) += -WD -lGi ;
- }
- else if $(MSVCNT) || ( $(TOOLSET) = VISUALC )
- {
- LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR) = $(LINKFLAGS) /DLL /IMPLIB:$(BUILD_DIR)$(SLASH)$(CUNIT_LIB_NAME)_dll$(SUFLIB) ;
- }
- else if $(MINGW) || ( $(TOOLSET) = MINGW )
- {
- SubDirCcFlags -fPIC ;
- LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR) +=
- -shared
- libcunit_dll.def
- -Wl,--out-implib,$(BUILD_DIR)$(SLASH)$(CUNIT_LIB_NAME)_dll$(SUFLIB)
- ;
- }
- else
- {
- EXIT Building of CUnit shared library is not supported for this compiler on Windows. ;
- }
-
- MakeImportLibrary $(CUNIT_LIB_NAME)$(SUFSHR) : $(CUNIT_LIB_NAME)_dll$(SUFLIB) ;
-
- # install import library
- if $(INSTALL_LIB_DIR)
- {
- InstallLib $(INSTALL_LIB_DIR) : $(CUNIT_LIB_NAME)_dll$(SUFLIB) ;
- }
-
- # install shared library
- if $(INSTALL_BIN_DIR)
- {
- InstallBin $(INSTALL_BIN_DIR) : $(CUNIT_LIB_NAME)$(SUFSHR) ;
- }
-
- }
-
- else if $(UNIX) || ( $(OS) = LINUX )
- {
- # extra symbolic targets for building CUnit library
- DEPENDS cunit CUnit libcunit : $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) ;
-
- Main $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) : $(SOURCES) ;
- MakeLocate $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) : $(BUILD_DIR) ;
-
- CCFLAGS on $(SOURCES) += -fPIC ;
- LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) +=
- -shared
- -Wl,-soname,$(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION_MAJOR)
- ;
-
- # install shared library
- if $(INSTALL_LIB_DIR)
- {
- InstallLib $(INSTALL_BIN_DIR) : $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) ;
- }
- }
-}
-
-if $(BUILD_STATIC_LIB)
-{
- Library $(CUNIT_LIB_NAME) : $(SOURCES) ;
- MakeLocate $(CUNIT_LIB_NAME)$(SUFLIB) : $(BUILD_DIR) ;
-
- # install static library
- if $(INSTALL_LIB_DIR)
- {
- InstallLib $(INSTALL_LIB_DIR) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
- }
-
-}
-
-SubInclude TOP CUnit Headers ;
-SubInclude TOP CUnit Sources Test ;
-
-
diff -Nru cunit-2.1-0.dfsg/CUnit/Makefile.in cunit-2.1-2.dfsg/CUnit/Makefile.in
--- cunit-2.1-0.dfsg/CUnit/Makefile.in 2006-03-22 10:57:13.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Makefile.in 2010-10-15 15:11:41.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -13,15 +14,12 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -44,21 +42,51 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -77,40 +105,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -120,35 +135,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -160,28 +180,41 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
SUBDIRS = Sources Headers
all: all-recursive
@@ -190,14 +223,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu CUnit/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu CUnit/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -215,6 +248,7 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
@@ -222,10 +256,6 @@
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
@@ -233,7 +263,7 @@
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -250,16 +280,15 @@
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -285,16 +314,16 @@
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -302,14 +331,14 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
@@ -321,81 +350,101 @@
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
@@ -425,6 +474,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -435,8 +485,7 @@
distclean: distclean-recursive
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
@@ -444,18 +493,38 @@
html: html-recursive
+html-am:
+
info: info-recursive
info-am:
install-data-am:
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-recursive
+
+install-html-am:
+
install-info: install-info-recursive
+install-info-am:
+
install-man:
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -474,22 +543,25 @@
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-libtool \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-info-am
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Automated/Automated.c cunit-2.1-2.dfsg/CUnit/Sources/Automated/Automated.c
--- cunit-2.1-0.dfsg/CUnit/Sources/Automated/Automated.c 2006-01-30 03:48:26.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Automated/Automated.c 2007-03-14 02:45:57.000000000 +0000
@@ -1,7 +1,7 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -35,6 +35,8 @@
* none has been supplied. (JDS)
*
* 30-Apr-2005 Added notification of failed suite cleanup function. (JDS)
+ *
+ * 02-May-2006 Added internationalization hooks. (JDS)
*/
/** @file
@@ -54,18 +56,28 @@
#include "CUnit.h"
#include "TestDB.h"
+#include "MyMem.h"
#include "Util.h"
#include "TestRun.h"
#include "Automated.h"
+#include "CUnit_intl.h"
+
+#define MAX_FILENAME_LENGTH 1025
+/*=================================================================
+ * Global / Static data definitions
+ *=================================================================*/
static CU_pSuite f_pRunningSuite = NULL; /**< The running test suite. */
static char f_szDefaultFileRoot[] = "CUnitAutomated"; /**< Default filename root for automated output files. */
-static char f_szTestListFileName[FILENAME_MAX] = ""; /**< Current output file name for the test listing file. */
-static char f_szTestResultFileName[FILENAME_MAX] = ""; /**< Current output file name for the test results file. */
+static char f_szTestListFileName[MAX_FILENAME_LENGTH] = ""; /**< Current output file name for the test listing file. */
+static char f_szTestResultFileName[MAX_FILENAME_LENGTH] = ""; /**< Current output file name for the test results file. */
static FILE* f_pTestResultFile = NULL; /**< FILE pointer the test results file. */
static CU_BOOL f_bWriting_CUNIT_RUN_SUITE = CU_FALSE; /**< Flag for keeping track of when a closing xml tag is required. */
+/*=================================================================
+ * Static function forward declarations
+ *=================================================================*/
static CU_ErrorCode automated_list_all_tests(CU_pTestRegistry pRegistry, const char* szFilename);
static CU_ErrorCode initialize_result_file(const char* szFilename);
@@ -79,16 +91,9 @@
static void automated_suite_init_failure_message_handler(const CU_pSuite pSuite);
static void automated_suite_cleanup_failure_message_handler(const CU_pSuite pSuite);
-/*------------------------------------------------------------------------*/
-/** Run CUnit tests using the automated interface.
- * This function sets appropriate callback functions,
- * initializes the test output files, and calls the
- * appropriate functions to list the tests and run them.
- * If an output file name root has not been specified using
- * CU_set_output_filename(), a generic root will be applied.
- * It is an error to call this function before the CUnit
- * test registry has been initialized (check by assertion).
- */
+/*=================================================================
+ * Public Interface functions
+ *=================================================================*/
void CU_automated_run_tests(void)
{
assert(NULL != CU_get_registry());
@@ -103,7 +108,7 @@
}
if (CUE_SUCCESS != initialize_result_file(f_szTestResultFileName)) {
- fprintf(stderr, "\nERROR - Failed to create/initialize the result file.");
+ fprintf(stderr, "\n%s", _("ERROR - Failed to create/initialize the result file."));
}
else {
/* set up the message handlers for writing xml output */
@@ -111,25 +116,19 @@
CU_set_test_complete_handler(automated_test_complete_message_handler);
CU_set_all_test_complete_handler(automated_all_tests_complete_message_handler);
CU_set_suite_init_failure_handler(automated_suite_init_failure_message_handler);
- CU_set_suite_cleanup_failure_handler(automated_suite_cleanup_failure_message_handler);
+ CU_set_suite_cleanup_failure_handler(automated_suite_cleanup_failure_message_handler);
f_bWriting_CUNIT_RUN_SUITE = CU_FALSE;
automated_run_all_tests(NULL);
-
+
if (CUE_SUCCESS != uninitialize_result_file()) {
- fprintf(stderr, "\nERROR - Failed to close/uninitialize the result files.");
+ fprintf(stderr, "\n%s", _("ERROR - Failed to close/uninitialize the result files."));
}
}
}
/*------------------------------------------------------------------------*/
-/** Set the root file name for automated test output files.
- * The strings "-Listing.xml" and "-Results.xml" are appended to
- * the specified root to generate the filenames. If szFilenameRoot
- * is empty, the default root ("CUnitAutomated") is used.
- * @param szFilenameRoot String containing root to use for file names.
- */
void CU_set_output_filename(const char* szFilenameRoot)
{
const char* szListEnding = "-Listing.xml";
@@ -137,35 +136,28 @@
/* Construct the name for the listing file */
if (NULL != szFilenameRoot) {
- strncpy(f_szTestListFileName, szFilenameRoot, FILENAME_MAX - strlen(szListEnding) - 1);
+ strncpy(f_szTestListFileName, szFilenameRoot, MAX_FILENAME_LENGTH - strlen(szListEnding) - 1);
}
else {
- strncpy(f_szTestListFileName, f_szDefaultFileRoot, FILENAME_MAX - strlen(szListEnding) - 1);
+ strncpy(f_szTestListFileName, f_szDefaultFileRoot, MAX_FILENAME_LENGTH - strlen(szListEnding) - 1);
}
- f_szTestListFileName[FILENAME_MAX - strlen(szListEnding) - 1] = '\0';
+ f_szTestListFileName[MAX_FILENAME_LENGTH - strlen(szListEnding) - 1] = '\0';
strcat(f_szTestListFileName, szListEnding);
/* Construct the name for the result file */
if (NULL != szFilenameRoot) {
- strncpy(f_szTestResultFileName, szFilenameRoot, FILENAME_MAX - strlen(szResultEnding) - 1);
+ strncpy(f_szTestResultFileName, szFilenameRoot, MAX_FILENAME_LENGTH - strlen(szResultEnding) - 1);
}
else {
- strncpy(f_szTestResultFileName, f_szDefaultFileRoot, FILENAME_MAX - strlen(szResultEnding) - 1);
+ strncpy(f_szTestResultFileName, f_szDefaultFileRoot, MAX_FILENAME_LENGTH - strlen(szResultEnding) - 1);
}
- f_szTestResultFileName[FILENAME_MAX - strlen(szResultEnding) - 1] = '\0';
+ f_szTestResultFileName[MAX_FILENAME_LENGTH - strlen(szResultEnding) - 1] = '\0';
strcat(f_szTestResultFileName, szResultEnding);
}
/*------------------------------------------------------------------------*/
-/** Generate an xml file containing a list of all tests in all
- * suites in the active registry.
- * The output file will be named according to the most recent
- * call to CU_set_output_filename(), or a default if not
- * previously set.
- * @return An error code indicating the error status.
- */
CU_ErrorCode CU_list_tests_to_file()
{
/* if a filename root hasn't been set, use the default one */
@@ -176,8 +168,10 @@
return automated_list_all_tests(CU_get_registry(), f_szTestListFileName);
}
-/*------------------------------------------------------------------------*/
-/** Run the registered tests using the automated interface.
+/*=================================================================
+ * Static function implementation
+ *=================================================================*/
+/** Runs the registered tests using the automated interface.
* If non-NULL. the specified registry is set as the active
* registry for running the tests. If NULL, then the default
* CUnit test registry is used. The actual test running is
@@ -203,7 +197,7 @@
}
/*------------------------------------------------------------------------*/
-/** Initialize the test results file generated by the automated interface.
+/** Initializes the test results file generated by the automated interface.
* A file stream is opened and header information is written.
*/
static CU_ErrorCode initialize_result_file(const char* szFilename)
@@ -244,6 +238,7 @@
assert(NULL != pTest);
assert(NULL != pSuite);
+ assert(NULL != pSuite->pName);
assert(NULL != f_pTestResultFile);
/* write suite close/open tags if this is the 1st test for this szSuite */
@@ -258,7 +253,7 @@
" \n"
" \n"
" %s \n",
- (NULL != pSuite->pName) ? pSuite->pName : "");
+ pSuite->pName);
f_bWriting_CUNIT_RUN_SUITE = CU_TRUE;
f_pRunningSuite = pSuite;
@@ -275,26 +270,44 @@
const CU_pSuite pSuite,
const CU_pFailureRecord pFailure)
{
+ char *szTemp = NULL;
+ size_t szTemp_len = 0;
+ size_t cur_len = 0;
CU_pFailureRecord pTempFailure = pFailure;
CU_UNREFERENCED_PARAMETER(pSuite); /* pSuite is not used except in assertion */
assert(NULL != pTest);
+ assert(NULL != pTest->pName);
assert(NULL != pSuite);
+ assert(NULL != pSuite->pName);
assert(NULL != f_pTestResultFile);
if (NULL != pTempFailure) {
- /* worst cast is a string of special chars */
- char szTemp[CUNIT_MAX_ENTITY_LEN * CUNIT_MAX_STRING_LENGTH];
-
while (NULL != pTempFailure) {
assert((NULL != pTempFailure->pSuite) && (pTempFailure->pSuite == pSuite));
assert((NULL != pTempFailure->pTest) && (pTempFailure->pTest == pTest));
+ /* expand temporary char buffer if need more room */
if (NULL != pTempFailure->strCondition) {
- CU_translate_special_characters(pTempFailure->strCondition, szTemp, sizeof(szTemp));
+ cur_len = CU_translated_strlen(pTempFailure->strCondition) + 1;
+ }
+ else {
+ cur_len = 1;
+ }
+ if (cur_len > szTemp_len) {
+ szTemp_len = cur_len;
+ if (NULL != szTemp) {
+ CU_FREE(szTemp);
+ }
+ szTemp = (char *)CU_MALLOC(szTemp_len);
+ }
+
+ /* convert xml entities in strCondition (if present) */
+ if (NULL != pTempFailure->strCondition) {
+ CU_translate_special_characters(pTempFailure->strCondition, szTemp, szTemp_len);
}
else {
szTemp[0] = '\0';
@@ -309,7 +322,7 @@
" %s \n"
" \n"
" \n",
- (NULL != pTest->pName) ? pTest->pName : "",
+ pTest->pName,
(NULL != pTempFailure->strFileName) ? pTempFailure->strFileName : "",
pTempFailure->uiLineNumber,
szTemp);
@@ -323,7 +336,11 @@
" %s \n"
" \n"
" \n",
- (NULL != pTest->pName) ? pTest->pName : "");
+ pTest->pName);
+ }
+
+ if (NULL != szTemp) {
+ CU_FREE(szTemp);
}
}
@@ -354,44 +371,53 @@
fprintf(f_pTestResultFile,
" \n"
- " Suites \n"
+ " %s \n"
" %u \n"
" %u \n"
" - NA - \n"
" %u \n"
+ " %u \n"
" \n",
+ _("Suites"),
pRegistry->uiNumberOfSuites,
pRunSummary->nSuitesRun,
- pRunSummary->nSuitesFailed
+ pRunSummary->nSuitesFailed,
+ pRunSummary->nSuitesInactive
);
fprintf(f_pTestResultFile,
" \n"
- " Test Cases \n"
+ " %s \n"
" %u \n"
" %u \n"
" %u \n"
" %u \n"
+ " %u \n"
" \n",
+ _("Test Cases"),
pRegistry->uiNumberOfTests,
pRunSummary->nTestsRun,
pRunSummary->nTestsRun - pRunSummary->nTestsFailed,
- pRunSummary->nTestsFailed
+ pRunSummary->nTestsFailed,
+ pRunSummary->nTestsInactive
);
fprintf(f_pTestResultFile,
" \n"
- " Assertions \n"
+ " %s \n"
" %u \n"
" %u \n"
" %u \n"
" %u \n"
+ " %s \n"
" \n"
" \n",
+ _("Assertions"),
pRunSummary->nAsserts,
pRunSummary->nAsserts,
pRunSummary->nAsserts - pRunSummary->nAssertsFailed,
- pRunSummary->nAssertsFailed
+ pRunSummary->nAssertsFailed,
+ _("n/a")
);
}
@@ -402,6 +428,7 @@
static void automated_suite_init_failure_message_handler(const CU_pSuite pSuite)
{
assert(NULL != pSuite);
+ assert(NULL != pSuite->pName);
assert(NULL != f_pTestResultFile);
if (CU_TRUE == f_bWriting_CUNIT_RUN_SUITE) {
@@ -418,8 +445,8 @@
" %s \n"
" \n"
" \n",
- (NULL != pSuite->pName) ? pSuite->pName : "",
- "Suite Initialization Failed");
+ pSuite->pName,
+ _("Suite Initialization Failed"));
}
/*------------------------------------------------------------------------*/
@@ -429,6 +456,7 @@
static void automated_suite_cleanup_failure_message_handler(const CU_pSuite pSuite)
{
assert(NULL != pSuite);
+ assert(NULL != pSuite->pName);
assert(NULL != f_pTestResultFile);
if (CU_TRUE == f_bWriting_CUNIT_RUN_SUITE) {
@@ -445,12 +473,12 @@
" %s \n"
" \n"
" \n",
- (NULL != pSuite->pName) ? pSuite->pName : "",
- "Suite Cleanup Failed");
+ pSuite->pName,
+ _("Suite Cleanup Failed"));
}
/*------------------------------------------------------------------------*/
-/** Finalize and close the results output file generated
+/** Finalizes and closes the results output file generated
* by the automated interface.
*/
static CU_ErrorCode uninitialize_result_file(void)
@@ -465,8 +493,9 @@
time(&tTime);
szTime = ctime(&tTime);
fprintf(f_pTestResultFile,
- " File Generated By CUnit v" CU_VERSION " at %s \n"
+ " %s" CU_VERSION " - %s \n"
"",
+ _("File Generated By CUnit v"),
(NULL != szTime) ? szTime : "");
if (0 != fclose(f_pTestResultFile)) {
@@ -477,7 +506,7 @@
}
/*------------------------------------------------------------------------*/
-/** Generate an xml listing of all tests in all suites for the
+/** Generates an xml listing of all tests in all suites for the
* specified test registry. The output is directed to a file
* having the specified name.
* @param pRegistry Test registry for which to generate list (non-NULL).
@@ -517,17 +546,19 @@
fprintf(pTestListFile,
" \n"
- " Total Number of Suites \n"
+ " %s \n"
" %u \n"
" \n",
+ _("Total Number of Suites"),
pRegistry->uiNumberOfSuites);
fprintf(pTestListFile,
" \n"
- " Total Number of Test Cases \n"
+ " %s \n"
" %u \n"
" \n"
" \n",
+ _("Total Number of Test Cases"),
pRegistry->uiNumberOfTests);
fprintf(pTestListFile,
@@ -535,6 +566,7 @@
pSuite = pRegistry->pSuite;
while (NULL != pSuite) {
+ assert(NULL != pSuite->pName);
pTest = pSuite->pTest;
fprintf(pTestListFile,
@@ -542,20 +574,27 @@
" \n"
" %s \n"
" %s \n"
- " %s \n"
+ " %s \n"
+ " %s \n"
" %u \n"
" \n",
- (NULL != pSuite->pName) ? pSuite->pName : "",
- (NULL != pSuite->pInitializeFunc) ? "Yes" : "No",
- (NULL != pSuite->pCleanupFunc) ? "Yes" : "No",
+ pSuite->pName,
+ (NULL != pSuite->pInitializeFunc) ? _("Yes") : _("No"),
+ (NULL != pSuite->pCleanupFunc) ? _("Yes") : _("No"),
+ (CU_FALSE != pSuite->fActive) ? _("Yes") : _("No"),
pSuite->uiNumberOfTests);
fprintf(pTestListFile,
" \n");
while (NULL != pTest) {
+ assert(NULL != pTest->pName);
fprintf(pTestListFile,
- " %s \n",
- (NULL != pTest->pName) ? pTest->pName : "");
+ " \n"
+ " %s \n"
+ " %s \n"
+ " \n",
+ pTest->pName,
+ (CU_FALSE != pSuite->fActive) ? _("Yes") : _("No"));
pTest = pTest->pNext;
}
@@ -571,8 +610,9 @@
time(&tTime);
szTime = ctime(&tTime);
fprintf(pTestListFile,
- " File Generated By CUnit v" CU_VERSION " at %s \n"
+ " %s" CU_VERSION " - %s \n"
"",
+ _("File Generated By CUnit v"),
(NULL != szTime) ? szTime : "");
if (0 != fclose(pTestListFile)) {
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Automated/Makefile.in cunit-2.1-2.dfsg/CUnit/Sources/Automated/Makefile.in
--- cunit-2.1-0.dfsg/CUnit/Sources/Automated/Makefile.in 2006-03-22 10:57:13.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Automated/Makefile.in 2010-10-15 15:11:41.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -45,29 +43,30 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libcunitautomated_la_LIBADD =
am_libcunitautomated_la_OBJECTS = Automated.lo
libcunitautomated_la_OBJECTS = $(am_libcunitautomated_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(libcunitautomated_la_SOURCES)
DIST_SOURCES = $(libcunitautomated_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -86,40 +85,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -129,35 +115,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -169,28 +160,41 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
noinst_LTLIBRARIES = libcunitautomated.la
libcunitautomated_la_SOURCES = \
Automated.c
@@ -203,14 +207,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Sources/Automated/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu CUnit/Sources/Automated/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Sources/Automated/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu CUnit/Sources/Automated/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -228,6 +232,7 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@@ -238,7 +243,7 @@
rm -f "$${dir}/so_locations"; \
done
libcunitautomated.la: $(libcunitautomated_la_OBJECTS) $(libcunitautomated_la_DEPENDENCIES)
- $(LINK) $(libcunitautomated_la_LDFLAGS) $(libcunitautomated_la_OBJECTS) $(libcunitautomated_la_LIBADD) $(LIBS)
+ $(LINK) $(libcunitautomated_la_OBJECTS) $(libcunitautomated_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -249,22 +254,22 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Automated.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -275,82 +280,85 @@
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -378,6 +386,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -391,7 +400,7 @@
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -399,18 +408,38 @@
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am:
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -431,19 +460,23 @@
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-info-am
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Basic/Basic.c cunit-2.1-2.dfsg/CUnit/Sources/Basic/Basic.c
--- cunit-2.1-0.dfsg/CUnit/Sources/Basic/Basic.c 2006-01-30 03:48:26.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Basic/Basic.c 2007-03-14 01:35:45.000000000 +0000
@@ -1,6 +1,6 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2004, 2005 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2004-2006 Jerry St.Clair, Anil Kumar
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -20,17 +20,13 @@
/*
* Implementation for basic test runner interface.
*
- * Created By : Jerry St.Clair (11-Aug-2004)
- * Comment : Initial implementation of basic test runner interface
- * EMail : jds2@users.sourceforge.net
+ * 11-Aug-2004 Initial implementation of basic test runner interface. (JDS)
*
- * Modified : 8-Jan-2005 (JDS)
- * Comment : Fixed reporting bug (bug report cunit-Bugs-1093861).
- * Email : jds2@users.sourceforge.net
+ * 8-Jan-2005 Fixed reporting bug (bug report cunit-Bugs-1093861). (JDS)
*
- * Modified : 30-Apr-2005 (JDS)
- * Comment : Added notification of suite cleanup failure.
- * Email : jds2@users.sourceforge.net
+ * 30-Apr-2005 Added notification of suite cleanup failure. (JDS)
+ *
+ * 02-May-2006 Added internationalization hooks. (JDS)
*/
/** @file
@@ -51,13 +47,19 @@
#include "Util.h"
#include "TestRun.h"
#include "Basic.h"
+#include "CUnit_intl.h"
+/*=================================================================
+ * Global/Static Definitions
+ *=================================================================*/
/** Pointer to the currently running suite. */
static CU_pSuite f_pRunningSuite = NULL;
/** Current run mode. */
static CU_BasicRunMode f_run_mode = CU_BRM_NORMAL;
-/* Forward declaration of module functions */
+/*=================================================================
+ * Forward declaration of module functions *
+ *=================================================================*/
static CU_ErrorCode basic_initialize(void);
static CU_ErrorCode basic_run_all_tests(CU_pTestRegistry pRegistry);
static CU_ErrorCode basic_run_suite(CU_pSuite pSuite);
@@ -69,21 +71,16 @@
static void basic_suite_init_failure_message_handler(const CU_pSuite pSuite);
static void basic_suite_cleanup_failure_message_handler(const CU_pSuite pSuite);
-/*------------------------------------------------------------------------*/
-/** Run all registered CUnit tests using the basic interface.
- * The default CU_BasicRunMode is used unless it has been
- * previously changed using CU_basic_set_mode(). The CUnit test
- * registry must have been initialized before calling this function.
- * @return A CU_ErrorCode indicating the framework error condition, including
- * CUE_NOREGISTRY - Registry has not been initialized.
- */
+/*=================================================================
+ * Public Interface functions
+ *=================================================================*/
CU_ErrorCode CU_basic_run_tests(void)
{
CU_ErrorCode error;
if (NULL == CU_get_registry()) {
if (CU_BRM_SILENT != f_run_mode)
- fprintf(stderr, "\n\nFATAL ERROR - Test registry is not initialized.\n");
+ fprintf(stderr, "\n\n%s\n", _("FATAL ERROR - Test registry is not initialized."));
error = CUE_NOREGISTRY;
}
else if (CUE_SUCCESS == (error = basic_initialize()))
@@ -93,19 +90,11 @@
}
/*------------------------------------------------------------------------*/
-/** Run all tests for a specific suite in the basic interface.
- * If pSuite is NULL, the function returns without taking any
- * action. The default CU_BasicRunMode is used unless it has
- * been changed using CU_basic_set_mode().
- * @param pSuite The CU_Suite to run.
- * @return A CU_ErrorCode indicating the framework error condition, including
- * CUE_NOSUITE - pSuite was NULL.
- */
CU_ErrorCode CU_basic_run_suite(CU_pSuite pSuite)
{
CU_ErrorCode error;
- if (NULL != pSuite)
+ if (NULL == pSuite)
error = CUE_NOSUITE;
else if (CUE_SUCCESS == (error = basic_initialize()))
error = basic_run_suite(pSuite);
@@ -114,23 +103,13 @@
}
/*------------------------------------------------------------------------*/
-/** Run a single test in a specific suite in the basic interface.
- * If pSuite or pTest is NULL, the function returns without
- * taking any action. The default CU_BasicRunMode is used unless
- * it has been changed using CU_basic_set_mode.
- * @param pSuite The CU_Suite holding the CU_Test to run.
- * @param pTest The CU_Test to run.
- * @return A CU_ErrorCode indicating the framework error condition, including
- * CUE_NOSUITE - pSuite was NULL.
- * CUE_NOTEST - pTest was NULL.
- */
CU_ErrorCode CU_basic_run_test(CU_pSuite pSuite, CU_pTest pTest)
{
CU_ErrorCode error;
- if (NULL != pSuite)
+ if (NULL == pSuite)
error = CUE_NOSUITE;
- else if (NULL != pTest)
+ else if (NULL == pTest)
error = CUE_NOTEST;
else if (CUE_SUCCESS == (error = basic_initialize()))
error = basic_run_single_test(pSuite, pTest);
@@ -139,33 +118,18 @@
}
/*------------------------------------------------------------------------*/
-/** Set the run mode for the basic interface.
- * @param mode The new CU_BasicRunMode for subsequent test
- * runs using the basic interface.
- */
void CU_basic_set_mode(CU_BasicRunMode mode)
{
f_run_mode = mode;
}
/*------------------------------------------------------------------------*/
-/** Retrieve the current run mode for the basic interface.
- * @return The current CU_BasicRunMode setting for test
- * runs using the basic interface.
- */
CU_BasicRunMode CU_basic_get_mode(void)
{
return f_run_mode;
}
/*------------------------------------------------------------------------*/
-/** Print a summary of run failures to stdout.
- * This is provided for user convenience upon request, and
- * does not take into account the current run mode. The
- * failures are printed to stdout independent of the most
- * recent run mode.
- * @param pFailure List of CU_pFailureRecord's to output.
- */
void CU_basic_show_failures(CU_pFailureRecord pFailure)
{
int i;
@@ -178,8 +142,10 @@
}
}
-/*------------------------------------------------------------------------*/
-/** Perform inialization actions for the basic interface.
+/*=================================================================
+ * Static module functions
+ *=================================================================*/
+/** Performs inialization actions for the basic interface.
* This includes setting output to unbuffered, printing a
* welcome message, and setting the test run handlers.
* @return An error code indicating the framework error condition.
@@ -193,8 +159,10 @@
CU_set_error(CUE_SUCCESS);
if (CU_BRM_SILENT != f_run_mode)
- fprintf(stdout, "\n\n CUnit - A Unit testing framework for C - Version " CU_VERSION
- "\n http://cunit.sourceforge.net/\n\n");
+ fprintf(stdout, "\n\n %s" CU_VERSION
+ "\n %s\n\n",
+ _("CUnit - A unit testing framework for C - Version "),
+ _("http://cunit.sourceforge.net/"));
CU_set_test_start_handler(basic_test_start_message_handler);
CU_set_test_complete_handler(basic_test_complete_message_handler);
@@ -206,11 +174,10 @@
}
/*------------------------------------------------------------------------*/
-/** Run all tests within the basic interface.
- * If non-NULL, the test registry is changed to the specified
- * registry before running the tests, and reset to the original
- * registry when done. If NULL, the default CUnit test registry
- * will be used.
+/** Runs all tests within the basic interface.
+ * If non-NULL, the test registry is changed to the specified registry
+ * before running the tests, and reset to the original registry when
+ * done. If NULL, the default CUnit test registry will be used.
* @param pRegistry The CU_pTestRegistry containing the tests
* to be run. If NULL, use the default registry.
* @return An error code indicating the error status
@@ -232,7 +199,7 @@
}
/*------------------------------------------------------------------------*/
-/** Run a specified suite within the basic interface.
+/** Runs a specified suite within the basic interface.
* @param pSuite The suite to be run (non-NULL).
* @return An error code indicating the error status
* during the test run.
@@ -244,7 +211,7 @@
}
/*------------------------------------------------------------------------*/
-/** Run a single test for the specified suite within
+/** Runs a single test for the specified suite within
* the console interface.
* @param pSuite The suite containing the test to be run (non-NULL).
* @param pTest The test to be run (non-NULL).
@@ -268,13 +235,15 @@
assert(NULL != pTest);
if (CU_BRM_VERBOSE == f_run_mode) {
+ assert(NULL != pTest->pName);
if ((NULL == f_pRunningSuite) || (f_pRunningSuite != pSuite)) {
- fprintf(stdout, "\nSuite: %s", (NULL != pSuite->pName) ? pSuite->pName : "");
- fprintf(stdout, "\n Test: %s ... ", (NULL != pTest->pName) ? pTest->pName : "");
+ assert(NULL != pSuite->pName);
+ fprintf(stdout, "\n%s: %s", _("Suite"), pSuite->pName);
+ fprintf(stdout, "\n %s: %s ...", _("Test"), pTest->pName);
f_pRunningSuite = pSuite;
}
else {
- fprintf(stdout, "\n Test: %s ... ", (NULL != pTest->pName) ? pTest->pName : "");
+ fprintf(stdout, "\n %s: %s ...", _("Test"), pTest->pName);
}
}
}
@@ -297,18 +266,18 @@
if (NULL == pFailure) {
if (CU_BRM_VERBOSE == f_run_mode) {
- fprintf(stdout, "passed");
+ fprintf(stdout, _("passed"));
}
}
else {
switch (f_run_mode) {
case CU_BRM_VERBOSE:
- fprintf(stdout, "FAILED");
+ fprintf(stdout, _("FAILED"));
break;
case CU_BRM_NORMAL:
- fprintf(stdout, "\nSuite %s, Test %s had failures:",
- (NULL != pSuite->pName) ? pSuite->pName : "",
- (NULL != pTest->pName) ? pTest->pName : "");
+ assert(NULL != pSuite->pName);
+ assert(NULL != pTest->pName);
+ fprintf(stdout, _("\nSuite %s, Test %s had failures:"), pSuite->pName, pTest->pName);
break;
default: /* gcc wants all enums covered. ok. */
break;
@@ -330,30 +299,10 @@
*/
static void basic_all_tests_complete_message_handler(const CU_pFailureRecord pFailure)
{
- CU_pRunSummary pRunSummary = CU_get_run_summary();
- CU_pTestRegistry pRegistry = CU_get_registry();
-
CU_UNREFERENCED_PARAMETER(pFailure); /* not used in basic interface */
-
- assert(NULL != pRunSummary);
- assert(NULL != pRegistry);
-
- if (CU_BRM_SILENT != f_run_mode)
- fprintf(stdout,"\n\n--Run Summary: Type Total Ran Passed Failed"
- "\n suites %8u%8u n/a%8u"
- "\n tests %8u%8u%8u%8u"
- "\n asserts%8u%8u%8u%8u\n",
- pRegistry->uiNumberOfSuites,
- pRunSummary->nSuitesRun,
- pRunSummary->nSuitesFailed,
- pRegistry->uiNumberOfTests,
- pRunSummary->nTestsRun,
- pRunSummary->nTestsRun - pRunSummary->nTestsFailed,
- pRunSummary->nTestsFailed,
- pRunSummary->nAsserts,
- pRunSummary->nAsserts,
- pRunSummary->nAsserts - pRunSummary->nAssertsFailed,
- pRunSummary->nAssertsFailed);
+ printf("\n\n");
+ CU_print_run_results(stdout);
+ printf("\n");
}
/*------------------------------------------------------------------------*/
@@ -363,11 +312,10 @@
static void basic_suite_init_failure_message_handler(const CU_pSuite pSuite)
{
assert(NULL != pSuite);
+ assert(NULL != pSuite->pName);
if (CU_BRM_SILENT != f_run_mode)
- fprintf(stdout,
- "\nWARNING - Suite initialization failed for %s.",
- (NULL != pSuite->pName) ? pSuite->pName : "");
+ fprintf(stdout, _("\nWARNING - Suite initialization failed for '%s'."), pSuite->pName);
}
/*------------------------------------------------------------------------*/
@@ -377,11 +325,10 @@
static void basic_suite_cleanup_failure_message_handler(const CU_pSuite pSuite)
{
assert(NULL != pSuite);
+ assert(NULL != pSuite->pName);
if (CU_BRM_SILENT != f_run_mode)
- fprintf(stdout,
- "\nWARNING - Suite cleanup failed for %s.",
- (NULL != pSuite->pName) ? pSuite->pName : "");
+ fprintf(stdout, _("\nWARNING - Suite cleanup failed for '%s'."), pSuite->pName);
}
/** @} */
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Basic/Makefile.in cunit-2.1-2.dfsg/CUnit/Sources/Basic/Makefile.in
--- cunit-2.1-0.dfsg/CUnit/Sources/Basic/Makefile.in 2006-03-22 10:57:13.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Basic/Makefile.in 2010-10-15 15:11:41.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -45,29 +43,30 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libcunitbasic_la_LIBADD =
am_libcunitbasic_la_OBJECTS = Basic.lo
libcunitbasic_la_OBJECTS = $(am_libcunitbasic_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(libcunitbasic_la_SOURCES)
DIST_SOURCES = $(libcunitbasic_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -86,40 +85,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -129,35 +115,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -169,28 +160,41 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
noinst_LTLIBRARIES = libcunitbasic.la
libcunitbasic_la_SOURCES = \
Basic.c
@@ -203,14 +207,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Sources/Basic/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu CUnit/Sources/Basic/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Sources/Basic/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu CUnit/Sources/Basic/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -228,6 +232,7 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@@ -238,7 +243,7 @@
rm -f "$${dir}/so_locations"; \
done
libcunitbasic.la: $(libcunitbasic_la_OBJECTS) $(libcunitbasic_la_DEPENDENCIES)
- $(LINK) $(libcunitbasic_la_LDFLAGS) $(libcunitbasic_la_OBJECTS) $(libcunitbasic_la_LIBADD) $(LIBS)
+ $(LINK) $(libcunitbasic_la_OBJECTS) $(libcunitbasic_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -249,22 +254,22 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Basic.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -275,82 +280,85 @@
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -378,6 +386,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -391,7 +400,7 @@
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -399,18 +408,38 @@
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am:
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -431,19 +460,23 @@
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-info-am
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Console/Console.c cunit-2.1-2.dfsg/CUnit/Sources/Console/Console.c
--- cunit-2.1-0.dfsg/CUnit/Sources/Console/Console.c 2006-03-21 01:30:54.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Console/Console.c 2007-03-14 02:25:32.000000000 +0000
@@ -1,7 +1,7 @@
-/*
+ /*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -32,6 +32,15 @@
* 17-Jul-2004 New interface, doxygen comments, reformat console output. (JDS)
*
* 30-Apr-2005 Added notification of suite cleanup failure. (JDS)
+ *
+ * 24-Apr-2006 Suite/test selection is now by number rather than name.
+ * Inactive suites/tests now reported.
+ * Interface supports (de)activation of tests/suites.
+ * Help function added for both menu levels.
+ * Option menu added. Immediate action on hotkeys
+ * without needing to , like curses. (JDS)
+ *
+ * 02-May-2006 Added internationalization hooks. (JDS)
*/
/** @file
@@ -52,21 +61,32 @@
#include "Util.h"
#include "TestRun.h"
#include "Console.h"
+#include "CUnit_intl.h"
/** Console interface status flag. */
typedef enum
{
- CONTINUE = 1, /**< Continue processing commands in current menu. */
- MOVE_UP, /**< Move up to the previous menu. */
- STOP /**< Stop processing (user selected 'Quit'). */
-} STATUS;
-
+ CU_STATUS_CONTINUE = 1, /**< Continue processing commands in current menu. */
+ CU_STATUS_MOVE_UP, /**< Move up to the previous menu. */
+ CU_STATUS_STOP /**< Stop processing (user selected 'Quit'). */
+} CU_STATUS;
+
+/*=================================================================
+ * Global / Static data definitions
+ *=================================================================*/
/** Pointer to the currently running suite. */
static CU_pSuite f_pRunningSuite = NULL;
-/* Forward declaration of module functions */
+/** Common width measurements for output formatting. */
+static size_t f_yes_width = 0;
+static size_t f_no_width = 0;
+
+/*=================================================================
+ * Static function forward declarations
+ *=================================================================*/
static void console_registry_level_run(CU_pTestRegistry pRegistry);
-static STATUS console_suite_level_run(CU_pSuite pSuite);
+static CU_STATUS console_suite_level_run(CU_pSuite pSuite);
+static CU_STATUS console_set_options_run(void);
static CU_ErrorCode console_run_all_tests(CU_pTestRegistry pRegistry);
static CU_ErrorCode console_run_suite(CU_pSuite pSuite);
@@ -85,8 +105,9 @@
static void list_tests(CU_pSuite pSuite);
static void show_failures(void);
-/*------------------------------------------------------------------------*/
-/** Run registered CUnit tests using the console interface. */
+/*=================================================================
+ * Public Interface functions
+ *=================================================================*/
void CU_console_run_tests(void)
{
/*
@@ -96,14 +117,19 @@
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);
- fprintf(stdout, "\n\n CUnit - A Unit testing framework for C - Version " CU_VERSION
- "\n http://cunit.sourceforge.net/\n\n");
+ fprintf(stdout, "\n\n %s" CU_VERSION
+ "\n %s\n",
+ _("CUnit - A Unit testing framework for C - Version "),
+ _("http://cunit.sourceforge.net/"));
if (NULL == CU_get_registry()) {
- fprintf(stderr, "\n\nFATAL ERROR - Test registry is not initialized.\n");
+ fprintf(stderr, "\n\n%s\n", _("FATAL ERROR - Test registry is not initialized."));
CU_set_error(CUE_NOREGISTRY);
}
else {
+ f_yes_width = strlen(_("Yes"));
+ f_no_width = strlen(_("No"));
+
CU_set_test_start_handler(console_test_start_message_handler);
CU_set_test_complete_handler(console_test_complete_message_handler);
CU_set_all_test_complete_handler(console_all_tests_complete_message_handler);
@@ -114,114 +140,197 @@
}
}
-/*------------------------------------------------------------------------*/
-/** Main loop for console interface.
- * Displays actions and responds based on user imput.
- * If pRegistry is NULL, will use the default internal CUnit
- * test registry.
+/*=================================================================
+ * Static function implementation
+ *=================================================================*/
+/**
+ * Main loop for console interface.
+ * Displays actions and responds based on user imput. If pRegistry
+ * is NULL, will use the default internal CUnit test registry.
+ *
* @param pRegistry The CU_pTestRegistry to use for testing.
*/
static void console_registry_level_run(CU_pTestRegistry pRegistry)
{
int chChoice;
- char szTemp[256];
CU_pSuite pSuite = NULL;
- STATUS eStatus = CONTINUE;
+ CU_STATUS eStatus = CU_STATUS_CONTINUE;
+ char szTemp[256];
- while (CONTINUE == eStatus)
+ while (CU_STATUS_CONTINUE == eStatus)
{
- fprintf(stdout, "\n*************** CUNIT CONSOLE - MAIN MENU ***********************"
- "\n(R)un all, (S)elect suite, (L)ist suites, Show (F)ailures, (Q)uit"
- "\nEnter Command : ");
- chChoice = getchar();
- fgets(szTemp, sizeof(szTemp), stdin);
+ fprintf(stdout, "\n\n%s\n%s\n%s",
+ _("***************** CUNIT CONSOLE - MAIN MENU ******************************"),
+ _("(R)un (S)elect (L)ist (A)ctivate (F)ailures (O)ptions (H)elp (Q)uit"),
+ _("Enter command: "));
+ chChoice = toupper(getchar());
+ fgets(szTemp, 256, stdin); /* flush any chars out of the read buffer */
- switch (tolower(chChoice)) {
- case 'r':
- console_run_all_tests(pRegistry);
- break;
+ if (chChoice == _("R")[0]) {
+ console_run_all_tests(pRegistry);
+ }
- case 's':
- if (CUE_SUCCESS == select_suite(pRegistry, &pSuite)) {
- if (STOP == console_suite_level_run(pSuite)) {
- eStatus = STOP;
- }
- }
- else {
- fprintf(stdout, "\nSuite not found.\n");
+ else if (chChoice == _("S")[0]) {
+ if (CUE_SUCCESS == select_suite(pRegistry, &pSuite)) {
+ assert(NULL != pSuite->pName);
+ fprintf(stdout, _("Suite '%s' selected."), pSuite->pName);
+ fprintf(stdout, "\n");
+ if (CU_STATUS_STOP == console_suite_level_run(pSuite)) {
+ eStatus = CU_STATUS_STOP;
}
- break;
+ }
+ else {
+ fprintf(stdout, "\n%s\n", _("Suite not found."));
+ }
+ }
- case 'l':
- list_suites(pRegistry);
- break;
+ else if (chChoice == _("L")[0]) {
+ list_suites(pRegistry);
+ }
- case 'f':
- show_failures();
- break;
+ else if (chChoice == _("A")[0]) {
+ while (CUE_SUCCESS == select_suite(pRegistry, &pSuite)) {
+ CU_set_suite_active(pSuite, (CU_FALSE == pSuite->fActive) ? CU_TRUE : CU_FALSE);
+ }
+ }
- case 'q':
- eStatus = STOP;
- break;
+ else if (chChoice == _("F")[0]) {
+ show_failures();
+ }
- /* To stop gcc from cribbing */
- default:
- break;
+ else if (chChoice == _("O")[0]) {
+ console_set_options_run();
+ }
+
+ else if (chChoice == _("Q")[0]) {
+ eStatus = CU_STATUS_STOP;
+ }
+
+ else if ((chChoice == _("H")[0]) || (chChoice == _("?")[0])) {
+ fprintf(stdout, "\n%s\n", _("Commands: R - run all tests in all suites"));
+ fprintf(stdout, "%s\n", _(" S - Select a suite to run or modify"));
+ fprintf(stdout, "%s\n", _(" L - List all registered suites"));
+ fprintf(stdout, "%s\n", _(" A - Activate or deactivate a suite (toggle)"));
+ fprintf(stdout, "%s\n", _(" F - Show failures from last test run"));
+ fprintf(stdout, "%s\n", _(" O - Set CUnit options"));
+ fprintf(stdout, "%s\n", _(" H - Show this help message"));
+ fprintf(stdout, "%s\n", _(" Q - Quit the application"));
}
}
}
/*------------------------------------------------------------------------*/
-/** Run a selected suite within the console interface.
+/**
+ * Runs a selected suite within the console interface.
* Displays actions and responds based on user imput.
+ *
* @param pSuite The suite to use for testing (non-NULL).
*/
-static STATUS console_suite_level_run(CU_pSuite pSuite)
+static CU_STATUS console_suite_level_run(CU_pSuite pSuite)
{
int chChoice;
- char szTemp[256];
CU_pTest pTest = NULL;
- STATUS eStatus = CONTINUE;
+ CU_STATUS eStatus = CU_STATUS_CONTINUE;
+ char szTemp[256];
assert(NULL != pSuite);
+ assert(NULL != pSuite->pName);
- while (CONTINUE == eStatus) {
+ while (CU_STATUS_CONTINUE == eStatus) {
- fprintf(stdout, "\n*************** CUNIT CONSOLE - SUITE MENU *******************************"
- "\n(R)un All, (S)elect test, (L)ist tests, Show (F)ailures, (M)ove up, (Q)uit"
- "\nEnter Command : ");
- chChoice = getchar();
- fgets(szTemp, sizeof(szTemp), stdin);
+ fprintf(stdout, "\n%s\n%s\n%s",
+ _("***************** CUNIT CONSOLE - SUITE MENU ***************************"),
+ _("(R)un (S)elect (L)ist (A)ctivate (F)ailures (U)p (O)ptions (H)elp (Q)uit"),
+ _("Enter command: "));
+ chChoice = toupper(getchar());
+ fgets(szTemp, 256, stdin); /* flush any chars out of the read buffer */
- switch (tolower(chChoice)) {
- case 'r':
- console_run_suite(pSuite);
- break;
+ if (chChoice == _("R")[0]) {
+ console_run_suite(pSuite);
+ }
- case 's':
- if (CUE_SUCCESS == select_test(pSuite, &pTest)) {
- console_run_single_test(pSuite, pTest);
- }
- break;
+ else if (chChoice == _("S")[0]) {
+ if (CUE_SUCCESS == select_test(pSuite, &pTest)) {
+ console_run_single_test(pSuite, pTest);
+ }
+ else {
+ fprintf(stdout, "\n%s\n", _("Test not found."));
+ }
+ }
- case 'l':
- list_tests(pSuite);
- break;
+ else if (chChoice == _("L")[0]) {
+ list_tests(pSuite);
+ }
- case 'f':
- show_failures();
- break;
+ else if (chChoice == _("A")[0]) {
+ while (CUE_SUCCESS == select_test(pSuite, &pTest)) {
+ CU_set_test_active(pTest, (CU_FALSE == pTest->fActive) ? CU_TRUE : CU_FALSE);
+ }
+ }
- case 'm':
- eStatus = MOVE_UP;
- break;
+ else if (chChoice == _("F")[0]) {
+ show_failures();
+ }
- case 'q':
- eStatus = STOP;
+ else if ((chChoice == _("M")[0]) || (chChoice == _("U")[0])) {
+ eStatus = CU_STATUS_MOVE_UP;
+ }
+
+ else if (chChoice == _("O")[0]) {
+ console_set_options_run();
+ }
+
+ else if (chChoice == _("Q")[0]) {
+ eStatus = CU_STATUS_STOP;
+ }
+
+ else if ((chChoice == _("H")[0]) || (chChoice == _("?")[0])) {
+ fprintf(stdout, "\n");
+ fprintf(stdout, _("Commands: R - run all tests in suite %s"), pSuite->pName);
+ fprintf(stdout, "\n");
+ fprintf(stdout, "%s\n", _(" S - Select and run a test"));
+ fprintf(stdout, _(" L - List all tests registered in suite %s"), pSuite->pName);
+ fprintf(stdout, "\n");
+ fprintf(stdout, "%s\n", _(" A - Activate or deactivate a test (toggle)"));
+ fprintf(stdout, "%s\n", _(" F - Show failures from last test run"));
+ fprintf(stdout, "%s\n", _(" M - Move up to main menu"));
+ fprintf(stdout, "%s\n", _(" O - Set CUnit options"));
+ fprintf(stdout, "%s\n", _(" H - Show this help message"));
+ fprintf(stdout, "%s\n", _(" Q - Quit the application"));
+ }
+ }
+ return eStatus;
+}
+
+/*------------------------------------------------------------------------*/
+/**
+ * Sets CUnit options interactively using console interface.
+ * Displays actions and responds based on user imput.
+ */
+static CU_STATUS console_set_options_run(void)
+{
+ int chChoice;
+ CU_STATUS eStatus = CU_STATUS_CONTINUE;
+ char szTemp[256];
+
+ while (CU_STATUS_CONTINUE == eStatus) {
+ fprintf(stdout, "\n%s\n",
+ _("***************** CUNIT CONSOLE - OPTIONS **************************"));
+ fprintf(stdout, _(" 1 - Inactive suites/tests treated as runtime failures %s"),
+ (CU_FALSE != CU_get_fail_on_inactive()) ? _("Yes") : _("No"));
+ fprintf(stdout, "\n********************************************************************\n");
+ fprintf(stdout, "%s",
+ _("Enter number of option to change : "));
+ chChoice = getchar();
+ fgets(szTemp, 256, stdin); /* flush any chars out of the read buffer */
+
+ switch (tolower(chChoice)) {
+ case '1':
+ CU_set_fail_on_inactive((CU_FALSE == CU_get_fail_on_inactive()) ? CU_TRUE : CU_FALSE);
break;
- /* To stop gcc from cribbing */
default:
+ eStatus = CU_STATUS_MOVE_UP;
break;
}
}
@@ -229,15 +338,14 @@
}
/*------------------------------------------------------------------------*/
-/** Run all tests within the console interface.
- * The test registry is changed to the specified registry
- * before running the tests, and reset to the original
- * registry when done. If pRegistry is NULL, the default
- * internal CUnit test registry is used.
- * @param pRegistry The CU_pTestRegistry containing the tests
- * to be run.
- * @return An error code indicating the error status
- * during the test run.
+/**
+ * Runs all tests within the console interface.
+ * The test registry is changed to the specified registry before running
+ * the tests, and reset to the original registry when done. If pRegistry
+ * is NULL, the default internal CUnit test registry is used.
+ *
+ * @param pRegistry The CU_pTestRegistry containing the tests to be run.
+ * @return An error code indicating the error status during the test run.
*/
static CU_ErrorCode console_run_all_tests(CU_pTestRegistry pRegistry)
{
@@ -257,10 +365,11 @@
}
/*------------------------------------------------------------------------*/
-/** Run a specified suite within the console interface.
+/**
+ * Runs a specified suite within the console interface.
+ *
* @param pSuite The suite to be run (non-NULL).
- * @return An error code indicating the error status
- * during the test run.
+ * @return An error code indicating the error status during the test run.
*/
static CU_ErrorCode console_run_suite(CU_pSuite pSuite)
{
@@ -269,12 +378,12 @@
}
/*------------------------------------------------------------------------*/
-/** Run a specific test for the specified suite within
- * the console interface.
+/**
+ ( Runs a specific test for the specified suite within the console interface.
+ *
* @param pSuite The suite containing the test to be run (non-NULL).
* @param pTest The test to be run (non-NULL).
- * @return An error code indicating the error status
- * during the test run.
+ * @return An error code indicating the error status during the test run.
*/
static CU_ErrorCode console_run_single_test(CU_pSuite pSuite, CU_pTest pTest)
{
@@ -283,148 +392,223 @@
}
/*------------------------------------------------------------------------*/
-/** Read the name of a test from standard input and
- * locate the test having the specified name.
- * A pointer to the located test is stored in pTest
- * upon return.
+/**
+ * Reads the number of a test from standard input and locates the test
+ * at that position. A pointer to the located test is stored
+ * in ppTest upon return.
+ *
* @param pSuite The suite to be queried.
* @param ppTest Pointer to location to store the selected test.
- * @return CUE_SUCCESS if a test was successfully selected,
- * CUE_NOTEST otherwise. On return, ppTest points
- * to the test selected.
+ * @return CUE_SUCCESS if a test was successfully selected, CUE_NOTEST
+ * otherwise. On return, ppTest points to the test selected,
+ * or NULL if none.
*/
static CU_ErrorCode select_test(CU_pSuite pSuite, CU_pTest* ppTest)
{
- char szTestName[CU_MAX_TEST_NAME_LENGTH];
+ char buffer[100];
+
+ assert(NULL != pSuite);
+ assert(NULL != pSuite->pName);
+ *ppTest = NULL;
- fprintf(stdout,"\nEnter Test Name : ");
- fgets(szTestName, CU_MAX_TEST_NAME_LENGTH, stdin);
- sscanf(szTestName, "%[^\n]s", szTestName);
+ if (0 == pSuite->uiNumberOfTests) {
+ fprintf(stdout, "\n");
+ fprintf(stdout, _("Suite %s contains no tests."), pSuite->pName);
+ }
+ else {
+ list_tests(pSuite);
+ fprintf(stdout, "\n");
+ fprintf(stdout, _("Enter number of test to select (1-%u) : "),
+ pSuite->uiNumberOfTests);
+ fgets(buffer, 100, stdin);
- *ppTest = CU_get_test_by_name(szTestName, pSuite);
+ *ppTest = CU_get_test_by_index(atol(buffer), pSuite);
+ }
return (NULL != *ppTest) ? CUE_SUCCESS : CUE_NOTEST;
}
/*------------------------------------------------------------------------*/
-/** Read the name of a suite from standard input and
- * locate the suite having the specified name.
- * The input string is used to locate the suite having the
- * indicated name in the specified test registry. If pRegistry
- * is NULL, the default CUnit registry will be used. The located
- * pSuite is returned in ppSuite. ppSuite will be NULL if there is
- * no suite in the registry having the input name. Returns NULL if
- * the suite is successfully located, non-NULL otherwise.
+/**
+ * Reads the number of a suite from standard input and locates the suite
+ * at that position. If pRegistry is NULL, the default CUnit registry
+ * will be used. The located pSuite is returned in ppSuite. ppSuite
+ * will be NULL if there is no suite in the registry having the input name.
+ * Returns NULL if the suite is successfully located, non-NULL otherwise.
+ *
* @param pRegistry The CU_pTestRegistry to query. If NULL, use the
* default internal CUnit test registry.
* @param ppSuite Pointer to location to store the selected suite.
- * @return CUE_SUCCESS if a suite was successfully selected,
- * CUE_NOSUITE otherwise. On return, ppSuite points
- * to the suite selected.
+ * @return CUE_SUCCESS if a suite was successfully selected, CUE_NOSUITE
+ * otherwise. On return, ppSuite points to the suite selected.
*/
static CU_ErrorCode select_suite(CU_pTestRegistry pRegistry, CU_pSuite* ppSuite)
{
- char szSuiteName[CU_MAX_SUITE_NAME_LENGTH];
+ char buffer[100];
+
+ if (NULL == pRegistry) {
+ pRegistry = CU_get_registry();
+ }
- fprintf(stdout,"\n\nEnter Suite Name : ");
- fgets(szSuiteName, CU_MAX_SUITE_NAME_LENGTH, stdin);
- sscanf(szSuiteName, "%[^\n]s", szSuiteName);
+ if (0 == pRegistry->uiNumberOfSuites) {
+ fprintf(stdout, "\n%s", _("No suites are registered."));
+ *ppSuite = NULL;
+ }
+ else {
+ list_suites(pRegistry);
+ fprintf(stdout, "\n");
+ fprintf(stdout, _("Enter number of suite to select (1-%u) : "),
+ pRegistry->uiNumberOfSuites);
+ fgets(buffer, 100, stdin);
- *ppSuite = CU_get_suite_by_name(szSuiteName, (NULL != pRegistry) ? pRegistry : CU_get_registry());
+ *ppSuite = CU_get_suite_by_index(atol(buffer), pRegistry);
+ }
return (NULL != *ppSuite) ? CUE_SUCCESS : CUE_NOSUITE;
}
/*------------------------------------------------------------------------*/
-/** List the suites in a registry to standard output.
+/**
+ * Lists the suites in a registry to standard output.
* @param pRegistry The CU_pTestRegistry to query (non-NULL).
*/
static void list_suites(CU_pTestRegistry pRegistry)
{
CU_pSuite pCurSuite = NULL;
int i;
+ static size_t width[6];
if (NULL == pRegistry) {
pRegistry = CU_get_registry();
}
-
+
assert(NULL != pRegistry);
if (0 == pRegistry->uiNumberOfSuites) {
- fprintf(stdout, "\nNo suites registered.\n");
+ fprintf(stdout, "\n%s\n", _("No suites are registered."));
return;
}
assert(NULL != pRegistry->pSuite);
- fprintf(stdout, "\n--------------------- Registered Suites --------------------------");
- fprintf(stdout, "\n Suite Name Init? Cleanup? # Tests\n");
+ /* only need to calculate formatting widths once */
+ if (0 == width[0]) {
+ width[0] = CU_number_width(pRegistry->uiNumberOfSuites) + 1;
+ width[1] = 34;
+ width[2] = CU_MAX(strlen(_("Init?")), CU_MAX(f_yes_width, f_no_width)) + 1;
+ width[3] = CU_MAX(strlen(_("Cleanup?")), CU_MAX(f_yes_width, f_no_width)) + 1;
+ width[4] = CU_MAX(strlen(_("#Tests")), CU_number_width(pRegistry->uiNumberOfTests) + 1) + 1;
+ width[5] = CU_MAX(strlen(_("Active?")), CU_MAX(f_yes_width, f_no_width)) + 1;
+ }
+
+ fprintf(stdout, "\n%s", _("--------------------- Registered Suites -----------------------------"));
+ fprintf(stdout, "\n%*s %-*s%*s%*s%*s%*s\n",
+ width[0], _("#"),
+ width[1], _("Suite Name"),
+ width[2], _("Init?"),
+ width[3], _("Cleanup?"),
+ width[4], _("#Tests"),
+ width[5], _("Active?"));
for (i = 1, pCurSuite = pRegistry->pSuite; (NULL != pCurSuite); pCurSuite = pCurSuite->pNext, ++i) {
- fprintf(stdout, "\n%3d. %-34.33s %3s %3s %3u",
- i,
- (NULL != pCurSuite->pName) ? pCurSuite->pName : "",
- (NULL != pCurSuite->pInitializeFunc) ? "YES" : "NO",
- (NULL != pCurSuite->pCleanupFunc) ? "YES" : "NO",
- pCurSuite->uiNumberOfTests);
- }
- fprintf(stdout, "\n------------------------------------------------------------------"
- "\nTotal Number of Suites : %-u\n", pRegistry->uiNumberOfSuites);
+ assert(NULL != pCurSuite->pName);
+ fprintf(stdout, "\n%*d. %-*.*s%*s%*s%*u%*s",
+ width[0], i,
+ width[1], width[1] - 1, pCurSuite->pName,
+ width[2]-1, (NULL != pCurSuite->pInitializeFunc) ? _("Yes") : _("No"),
+ width[3], (NULL != pCurSuite->pCleanupFunc) ? _("Yes") : _("No"),
+ width[4], pCurSuite->uiNumberOfTests,
+ width[5], (CU_FALSE != pCurSuite->fActive) ? _("Yes") : _("No"));
+ }
+ fprintf(stdout, "\n---------------------------------------------------------------------\n");
+ fprintf(stdout, _("Total Number of Suites : %-u"), pRegistry->uiNumberOfSuites);
+ fprintf(stdout, "\n");
}
/*------------------------------------------------------------------------*/
-/** List the tests in a suite to standard output.
+/**
+ * Lists the tests in a suite to standard output.
* @param pSuite The suite to query (non-NULL).
*/
static void list_tests(CU_pSuite pSuite)
{
CU_pTest pCurTest = NULL;
unsigned int uiCount;
+ static size_t width[3];
assert(NULL != pSuite);
+ assert(NULL != pSuite->pName);
+
if (0 == pSuite->uiNumberOfTests) {
- fprintf(stdout, "\nSuite %s contains no tests.\n",
- (NULL != pSuite->pName) ? pSuite->pName : "");
- return;
+ fprintf(stdout, "\n");
+ fprintf(stdout, _("Suite %s contains no tests."), pSuite->pName);
+ fprintf(stdout, "\n");
+ return;
}
assert(NULL != pSuite->pTest);
- fprintf(stdout, "\n--------------- Test List ---------------------------------");
- fprintf(stdout, "\n Test Names (Suite: %s)\n",
- (NULL != pSuite->pName) ? pSuite->pName : "");
-
- for (uiCount = 1, pCurTest = pSuite->pTest; (NULL != pCurTest); uiCount++, pCurTest = pCurTest->pNext) {
- fprintf(stdout, "\n%3u. %s", uiCount, (NULL != pCurTest->pName) ? pCurTest->pName : "");
- }
- fprintf(stdout, "\n-----------------------------------------------------------"
- "\nTotal Number of Tests : %-u\n", pSuite->uiNumberOfTests);
+ /* only number of tests can change between calls */
+ width[0] = CU_number_width(pSuite->uiNumberOfTests) + 1;
+ if (0 == width[1]) {
+ width[1] = 34;
+ width[2] = CU_MAX(strlen(_("Active?")), CU_MAX(f_yes_width, f_no_width)) + 1;
+ }
+
+ fprintf(stdout, "\n%s",
+ _("----------------- Test List ------------------------------"));
+ fprintf(stdout, "\n%s%s\n", _("Suite: "), pSuite->pName);
+ fprintf(stdout, "\n%*s %-*s%*s\n",
+ width[0], _("#"),
+ width[1], _("Test Name"),
+ width[2], _("Active?"));
+
+ for (uiCount = 1, pCurTest = pSuite->pTest ;
+ NULL != pCurTest ;
+ uiCount++, pCurTest = pCurTest->pNext) {
+ assert(NULL != pCurTest->pName);
+ fprintf(stdout, "\n%*u. %-*.*s%*s",
+ width[0], uiCount,
+ width[1], width[1]-1, pCurTest->pName,
+ width[2]-1, (CU_FALSE != pCurTest->fActive) ? _("Yes") : _("No"));
+ }
+ fprintf(stdout, "\n----------------------------------------------------------\n");
+ fprintf(stdout, _("Total Number of Tests : %-u"), pSuite->uiNumberOfTests);
+ fprintf(stdout, "\n");
}
/*------------------------------------------------------------------------*/
-/** Display the record of test failures on standard output. */
+/** Displays the record of test failures on standard output. */
static void show_failures(void)
{
- int i;
+ unsigned int i;
CU_pFailureRecord pFailure = CU_get_failure_list();
if (NULL == pFailure) {
- fprintf(stdout, "\nNo failures.\n");
+ fprintf(stdout, "\n%s\n", _("No failures."));
}
else {
- fprintf(stdout, "\n--------------- Test Run Failures -------------------------");
- fprintf(stdout, "\n src_file:line# : (suite:test) : failure_condition\n");
+ fprintf(stdout, "\n%s",
+ _("--------------- Test Run Failures -------------------------"));
+ fprintf(stdout, "\n%s\n",
+ _(" src_file:line# : (suite:test) : failure_condition"));
for (i = 1 ; (NULL != pFailure) ; pFailure = pFailure->pNext, i++) {
fprintf(stdout, "\n%d. %s:%u : (%s : %s) : %s", i,
- (NULL != pFailure->strFileName) ? pFailure->strFileName : "",
+ (NULL != pFailure->strFileName)
+ ? pFailure->strFileName : "",
pFailure->uiLineNumber,
- ((NULL != pFailure->pSuite) && (NULL != pFailure->pSuite->pName)) ? pFailure->pSuite->pName : "",
- ((NULL != pFailure->pTest) && (NULL != pFailure->pTest->pName)) ? pFailure->pTest->pName : "",
- (NULL != pFailure->strCondition) ? pFailure->strCondition : "");
+ ((NULL != pFailure->pSuite) && (NULL != pFailure->pSuite->pName))
+ ? pFailure->pSuite->pName : "",
+ ((NULL != pFailure->pTest) && (NULL != pFailure->pTest->pName))
+ ? pFailure->pTest->pName : "",
+ (NULL != pFailure->strCondition)
+ ? pFailure->strCondition : "");
}
- fprintf(stdout, "\n-----------------------------------------------------------"
- "\nTotal Number of Failures : %-d\n", i - 1);
+ fprintf(stdout, "\n-----------------------------------------------------------");
+ fprintf(stdout, "\n");
+ fprintf(stdout, _("Total Number of Failures : %-u"), i - 1);
+ fprintf(stdout, "\n");
}
}
@@ -436,16 +620,18 @@
static void console_test_start_message_handler(const CU_pTest pTest, const CU_pSuite pSuite)
{
assert(NULL != pTest);
+ assert(NULL != pTest->pName);
assert(NULL != pSuite);
+ assert(NULL != pSuite->pName);
/* Comparing the Addresses rather than the Group Names. */
if ((NULL == f_pRunningSuite) || (f_pRunningSuite != pSuite)) {
- fprintf(stdout, "\nRunning Suite : %s", (NULL != pSuite->pName) ? pSuite->pName : "");
- fprintf(stdout, "\n\tRunning test : %s", (NULL != pTest->pName) ? pTest->pName : "");
+ fprintf(stdout, _("\nRunning Suite : %s"), pSuite->pName);
+ fprintf(stdout, _("\n Running Test : %s"), pTest->pName);
f_pRunningSuite = pSuite;
}
else {
- fprintf(stdout, "\n\tRunning test : %s", (NULL != pTest->pName) ? pTest->pName : "");
+ fprintf(stdout, _("\n Running Test : %s"), pTest->pName);
}
}
@@ -474,29 +660,10 @@
*/
static void console_all_tests_complete_message_handler(const CU_pFailureRecord pFailure)
{
- CU_pRunSummary pRunSummary = CU_get_run_summary();
- CU_pTestRegistry pRegistry = CU_get_registry();
-
CU_UNREFERENCED_PARAMETER(pFailure); /* not used in console interface */
-
- assert(NULL != pRunSummary);
- assert(NULL != pRegistry);
-
- fprintf(stdout,"\n\n--Run Summary: Type Total Ran Passed Failed"
- "\n suites %8u%8u n/a%8u"
- "\n tests %8u%8u%8u%8u"
- "\n asserts%8u%8u%8u%8u\n",
- pRegistry->uiNumberOfSuites,
- pRunSummary->nSuitesRun,
- pRunSummary->nSuitesFailed,
- pRegistry->uiNumberOfTests,
- pRunSummary->nTestsRun,
- pRunSummary->nTestsRun - pRunSummary->nTestsFailed,
- pRunSummary->nTestsFailed,
- pRunSummary->nAsserts,
- pRunSummary->nAsserts,
- pRunSummary->nAsserts - pRunSummary->nAssertsFailed,
- pRunSummary->nAssertsFailed);
+ printf("\n\n");
+ CU_print_run_results(stdout);
+ printf("\n");
}
/*------------------------------------------------------------------------*/
@@ -506,9 +673,10 @@
static void console_suite_init_failure_message_handler(const CU_pSuite pSuite)
{
assert(NULL != pSuite);
+ assert(NULL != pSuite->pName);
- fprintf(stdout, "\nWARNING - Suite initialization failed for %s.",
- (NULL != pSuite->pName) ? pSuite->pName : "");
+ fprintf(stdout,
+ _("\nWARNING - Suite initialization failed for '%s'."), pSuite->pName);
}
/*------------------------------------------------------------------------*/
@@ -518,9 +686,9 @@
static void console_suite_cleanup_failure_message_handler(const CU_pSuite pSuite)
{
assert(NULL != pSuite);
+ assert(NULL != pSuite->pName);
- fprintf(stdout, "\nWARNING - Suite cleanup failed for %s.",
- (NULL != pSuite->pName) ? pSuite->pName : "");
+ fprintf(stdout, _("\nWARNING - Suite cleanup failed for '%s'."), pSuite->pName);
}
/** @} */
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Console/Makefile.in cunit-2.1-2.dfsg/CUnit/Sources/Console/Makefile.in
--- cunit-2.1-0.dfsg/CUnit/Sources/Console/Makefile.in 2006-03-22 10:57:13.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Console/Makefile.in 2010-10-15 15:11:41.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -45,29 +43,30 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libcunitconsole_la_LIBADD =
am_libcunitconsole_la_OBJECTS = Console.lo
libcunitconsole_la_OBJECTS = $(am_libcunitconsole_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(libcunitconsole_la_SOURCES)
DIST_SOURCES = $(libcunitconsole_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -86,40 +85,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -129,35 +115,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -169,28 +160,41 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
noinst_LTLIBRARIES = libcunitconsole.la
libcunitconsole_la_SOURCES = \
Console.c
@@ -203,14 +207,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Sources/Console/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu CUnit/Sources/Console/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Sources/Console/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu CUnit/Sources/Console/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -228,6 +232,7 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@@ -238,7 +243,7 @@
rm -f "$${dir}/so_locations"; \
done
libcunitconsole.la: $(libcunitconsole_la_OBJECTS) $(libcunitconsole_la_DEPENDENCIES)
- $(LINK) $(libcunitconsole_la_LDFLAGS) $(libcunitconsole_la_OBJECTS) $(libcunitconsole_la_LIBADD) $(LIBS)
+ $(LINK) $(libcunitconsole_la_OBJECTS) $(libcunitconsole_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -249,22 +254,22 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Console.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -275,82 +280,85 @@
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -378,6 +386,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -391,7 +400,7 @@
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -399,18 +408,38 @@
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am:
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -431,19 +460,23 @@
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-info-am
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Curses/Curses.c cunit-2.1-2.dfsg/CUnit/Sources/Curses/Curses.c
--- cunit-2.1-0.dfsg/CUnit/Sources/Curses/Curses.c 2006-03-21 01:30:54.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Curses/Curses.c 2006-05-20 13:19:14.000000000 +0000
@@ -1,7 +1,7 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -29,6 +29,14 @@
* Also added group initialization failure message handler. (AK)
*
* 09-Aug-2004 New interface, made all curses local functions static. (JDS)
+ *
+ * 30-Apr-2006 Suite/test selection is now by number rather than name.
+ * Inactive suites/tests now reported.
+ * Interface supports (de)activation of tests/suites.
+ * Help function added for both menu levels.
+ * Option menu added. (JDS)
+ *
+ * 02-May-2006 Added internationalization hooks. (JDS)
*/
/** @file
@@ -50,10 +58,13 @@
#include "Util.h"
#include "TestRun.h"
#include "CUCurses.h"
+#include "CUnit_intl.h"
-/*
- * Type Definitions
- */
+/*=================================================================
+ * Global / Static data definitions
+ *=================================================================*/
+
+/* Type Definitions */
#ifndef false
#define false (0) /**< Local boolean definition for false. */
@@ -110,9 +121,11 @@
/** Standard string length. */
#define STRING_LENGTH 128
/** String holding main menu run options. */
-static const char* MAIN_OPTIONS = "(R)un (S)elect Suite (L)ist (F)ailures (Q)uit";
+static const char* MAIN_OPTIONS =
+ N_("(R)un (S)elect (L)ist (A)ctivate (F)ailures (O)ptions (H)elp (Q)uit");
/** String holding suite menu run options. */
-static const char* SUITE_OPTIONS = "(R)un (S)elect Test (L)ist (F)ailures (U)p (Q)uit";
+static const char* SUITE_OPTIONS =
+ N_("(R)un (S)elect (L)ist (A)ctivate (F)ailures (O)ptions (H)elp (U)p (Q)uit");
/*
* Color Pairs Initialized for the Various Parameter Display
@@ -124,10 +137,7 @@
static const int PROGRESS_FAILURE_COLOR = 5; /**< Progress bar failure color.*/
static const int MENU_COLOR = 6; /**< Menu color.*/
-/*
- * Global Definitions
- */
-static const char* const f_szProgress = "Progress "; /**< Test for progress bar. */
+static const char* const f_szProgress = N_("Progress "); /**< Text for progress bar. */
static const char* f_szOptions = NULL; /**< String containing options. */
@@ -148,14 +158,18 @@
static short f_nWidth; /**< Width of window. */
static short f_nHeight; /**< Height of window. */
+/** Common width measurements for output formatting. */
+static size_t f_yes_width = 0;
+static size_t f_no_width = 0;
+
/** Pointers to curses interface windows. */
static APPWINDOWS application_windows = {NULL, NULL, NULL, NULL, NULL, NULL, NULL};
/** Details window definition. */
static APPPAD details_pad = {NULL, 0, 0, 0, 0, 0, 0, 0, 0};
-/*
- * Function Declarations
- */
+/*=================================================================
+ * Static function forward declarations
+ *=================================================================*/
static bool initialize_windows(void);
static void uninitialize_windows(void);
@@ -166,6 +180,7 @@
static void refresh_run_summary_window(void);
static void refresh_details_window(void);
static void refresh_options_window(void);
+static void show_detail_window_message(const char* msg);
static bool create_pad(APPPAD* pPad, WINDOW* pParent, unsigned int uiRows, unsigned int uiCols);
static void scroll_window(int nCommand, APPPAD* pPad, void (*parent_refresh)(void));
@@ -178,6 +193,7 @@
static STATUS curses_registry_level_run(CU_pTestRegistry pRegistry);
static STATUS curses_suite_level_run(CU_pSuite pSuite);
+static STATUS curses_set_options_run(void);
static CU_ErrorCode curses_run_all_tests(CU_pTestRegistry pRegistry);
static CU_ErrorCode curses_run_suite_tests(CU_pSuite pSuite);
@@ -192,67 +208,43 @@
static void list_suites(CU_pTestRegistry pRegistry);
static void list_tests(CU_pSuite pSuite);
static void show_failures(void);
+static void show_registry_level_help(void);
+static void show_suite_level_help(CU_pSuite pSuite);
static void reset_run_parameters(void);
-/*------------------------------------------------------------------------*/
-/** Run registered CUnit tests using the curses interface. */
+/*=================================================================
+ * Public Interface functions
+ *=================================================================*/
void CU_curses_run_tests(void)
{
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);
- f_szOptions = MAIN_OPTIONS;
+ f_szOptions = _(MAIN_OPTIONS);
if (!initialize_windows()) {
- return;
+ return;
}
if (!test_initialize()) {
goto test_initialize_fail;
}
- curses_registry_level_run(CU_get_registry());
+ f_yes_width = strlen(_("Yes"));
+ f_no_width = strlen(_("No"));
- /* THIS WAS COMMENTED OUT IN THE 1.1-1 SOURCE
- f_uiTotalTests = 3000;
- {
- int i;
- int iSucc = 0;
- for (i = 0; i < 3000; i++, iSucc++) {
- if (i && !(i%2000))
- iSucc--;
-
- f_uiTestsRun = i + 1;
- f_uiTestsRunSuccessful = iSucc + 1;
- refresh_progress_window();
- refresh_summary_window();
- refresh_run_summary_window();
- }
- }
+ show_detail_window_message(_("Welcome to CUnit. Press the indicated key to run the command."));
+ curses_registry_level_run(CU_get_registry());
- f_uiTestsRunSuccessful = f_uiTestsRun = 0;
- refresh_windows();
- {
- int i;
- int iSucc = -1;
- for (i = 0; i < 3000; i++, iSucc++) {
- if (i && !(i%2000))
- iSucc++;
-
- f_uiTestsRun = i + 1;
- f_uiTestsRunSuccessful = iSucc + 1;
- refresh_progress_window();
- refresh_summary_window();
- refresh_run_summary_window();
- }
- }
- */
+ /* fall thru */
test_initialize_fail:
uninitialize_windows();
}
-/*------------------------------------------------------------------------*/
+/*=================================================================
+ * Static function implementation
+ *=================================================================*/
/** Initialize the curses interface windows. */
static bool initialize_windows(void)
{
@@ -302,7 +294,7 @@
init_pair(PROGRESS_BACKGROUND_COLOR, COLOR_BLACK, COLOR_WHITE);
init_pair(PROGRESS_SUCCESS_COLOR, COLOR_WHITE, COLOR_GREEN);
init_pair(PROGRESS_FAILURE_COLOR, COLOR_WHITE, COLOR_RED);
- init_pair(MENU_COLOR, COLOR_WHITE, COLOR_BLACK);
+ init_pair(MENU_COLOR, COLOR_GREEN, COLOR_BLACK);
refresh_windows();
bStatus = true;
@@ -383,22 +375,25 @@
/** Refresh the title window. */
static void refresh_title_window(void)
{
- const char* const szPackageTitle = "CUnit - A Unit Testing Framework for \'C\' (v" CU_VERSION ")";
- const char* const szSite = "http:\\\\cunit.sourceforge.net\\";
+ char szPackageTitle[STRING_LENGTH];
+ char* szSite = N_("http://cunit.sourceforge.net/");
static bool bFirstTime = true;
if (!bFirstTime) {
+ bFirstTime = false;
return;
}
+ snprintf(szPackageTitle, STRING_LENGTH,
+ "%s%s", _("CUnit - A Unit testing framework for C - Version "), CU_VERSION);
wattrset(application_windows.pTitleWin, A_BOLD | COLOR_PAIR(TITLE_COLOR));
mvwprintw(application_windows.pTitleWin,
0, f_nLeft + (f_nWidth - strlen(szPackageTitle))/2,
"%s", szPackageTitle);
wattrset(application_windows.pTitleWin, A_BOLD | A_UNDERLINE | COLOR_PAIR(TITLE_COLOR));
- mvwprintw(application_windows.pTitleWin, 1, f_nLeft + (f_nWidth - strlen(szSite))/2,
- "%s", szSite);
+ mvwprintw(application_windows.pTitleWin, 1, f_nLeft + (f_nWidth - strlen(_(szSite)))/2,
+ "%s", _(szSite));
wattrset(application_windows.pTitleWin, A_NORMAL);
wrefresh(application_windows.pTitleWin);
@@ -409,7 +404,7 @@
static void refresh_progress_window(void)
{
wattrset(application_windows.pProgressWin, A_BOLD);
- mvwprintw(application_windows.pProgressWin, 0, 1, (char *)f_szProgress);
+ mvwprintw(application_windows.pProgressWin, 0, 1, (char *)_(f_szProgress));
show_progress_bar();
wrefresh(application_windows.pProgressWin);
}
@@ -418,26 +413,45 @@
/** Refresh the summary window. */
static void refresh_summary_window(void)
{
- const char* szSummary = "Run : %6u Tests Success : %6u Failed : %6u";
char szTemp[STRING_LENGTH];
memset(szTemp, 0, sizeof(szTemp));
- snprintf(szTemp, STRING_LENGTH, szSummary, f_uiTestsRun, f_uiTestsRunSuccessful,
- f_uiTestsRun - f_uiTestsRunSuccessful);
+ snprintf(szTemp, STRING_LENGTH, _("Tests Run : %6u Success : %6u Failed : %6u"),
+ f_uiTestsRun, f_uiTestsRunSuccessful,
+ f_uiTestsRun - f_uiTestsRunSuccessful);
werase(application_windows.pSummaryWin);
mvwprintw(application_windows.pSummaryWin, 0, 1, "%s", szTemp);
wrefresh(application_windows.pSummaryWin);
}
/*------------------------------------------------------------------------*/
+/** Prints a custom message in the detail window. */
+static void show_detail_window_message(const char *msg)
+{
+ if (NULL != msg) {
+
+ if (!create_pad(&details_pad, application_windows.pDetailsWin, 1, 256)) {
+ return;
+ }
+
+ assert(256 >= strlen(msg));
+ mvwprintw(details_pad.pPad, 0, 0, "%s", msg);
+ refresh_details_window();
+ }
+}
+
+/*------------------------------------------------------------------------*/
/** Refresh the run summary window. */
static void refresh_run_summary_window(void)
{
- const char* szRunSummary = "Running test \'%s\' of Suite \'%s\'";
+ const char* szRunSummary = N_("Running test \'%s\' of Suite \'%s\'");
char szTemp[STRING_LENGTH];
if (f_pCurrentTest && f_pCurrentSuite) {
- snprintf(szTemp, STRING_LENGTH, szRunSummary, f_pCurrentTest->pName, f_pCurrentSuite->pName);
+ assert(NULL != f_pCurrentTest->pName);
+ assert(NULL != f_pCurrentSuite->pName);
+ snprintf(szTemp, STRING_LENGTH, _(szRunSummary),
+ f_pCurrentTest->pName, f_pCurrentSuite->pName);
}
else {
snprintf(szTemp, STRING_LENGTH, "%s", "");
@@ -451,11 +465,11 @@
/** Refresh the details window. */
static void refresh_details_window(void)
{
- const char* szDetailsTitle = " Details Window";
+ const char* szDetailsTitle = N_(" Details Window ");
box(application_windows.pDetailsWin, ACS_VLINE, ACS_HLINE);
mvwprintw(application_windows.pDetailsWin, 0,
- f_nLeft + (f_nWidth - strlen(szDetailsTitle))/2, "%s", szDetailsTitle);
+ f_nLeft + (f_nWidth - strlen(_(szDetailsTitle)))/2, "%s", _(szDetailsTitle));
scrollok(application_windows.pDetailsWin, CU_TRUE);
wrefresh(application_windows.pDetailsWin);
@@ -493,7 +507,7 @@
{
int nLength = 0;
int nIndex = 0;
- int nStart = strlen(f_szProgress);
+ int nStart = strlen(_(f_szProgress));
int nColorID = 0;
if (0 == (f_uiTestsRun + f_uiTestsSkipped)) {
@@ -518,6 +532,10 @@
/** Initialize the message handlers in preparation for running tests. */
static bool test_initialize(void)
{
+ if (NULL == CU_get_registry()) {
+ return false;
+ }
+
CU_set_test_start_handler(curses_test_start_message_handler);
CU_set_test_complete_handler(curses_test_complete_message_handler);
CU_set_all_test_complete_handler(curses_all_tests_complete_message_handler);
@@ -562,7 +580,7 @@
else if (nTempIndex && ')' == *pS) {
szTemp[nTempIndex++] = *pS;
szTemp[nTempIndex++] = '\0';
- return szTemp;
+ return szTemp;
}
else if (nTempIndex) {
szTemp[nTempIndex++] = *pS;
@@ -573,56 +591,110 @@
}
/*------------------------------------------------------------------------*/
-/** Main loop for curses interface.
- * Displays actions and responds based on user imput.
- * @param pRegistry The CU_pTestRegistry to use for testing (non-NULL).
+/**
+ * Main loop for curses interface.
+ * Displays actions and responds based on user imput.
+ * @param pRegistry The CU_pTestRegistry to use for testing.
+ * If NULL, uses the default registry.
*/
static STATUS curses_registry_level_run(CU_pTestRegistry pRegistry)
{
- char szSuiteName[STRING_LENGTH];
+ char szSuiteNumber[STRING_LENGTH];
CU_pSuite pSuite = NULL;
bool bContinue = true;
+ char szTemp[STRING_LENGTH];
+ long suite_num;
+
+ if (NULL == pRegistry) {
+ pRegistry = CU_get_registry();
+ }
+ assert(NULL != pRegistry);
while (bContinue) {
int option = toupper(getch());
- switch (option) {
- case 'R':
- curses_run_all_tests(pRegistry);
- break;
+ if (option == _("R")[0]) {
+ curses_run_all_tests(pRegistry);
+ }
- case 'S':
- read_input_string("Enter Suite Name : ", szSuiteName, STRING_LENGTH);
+ else if (option == _("S")[0]) {
+ if (0 == pRegistry->uiNumberOfSuites) {
+ fprintf(stdout, "\n%s", _("No suites are registered."));
+ }
+ else {
+ list_suites(pRegistry);
+ snprintf(szTemp, STRING_LENGTH, _("Enter number of suite to select (1-%u) : "),
+ pRegistry->uiNumberOfSuites);
+ read_input_string(szTemp, szSuiteNumber, STRING_LENGTH);
refresh_details_window();
- if (NULL != (pSuite = CU_get_suite_by_name(szSuiteName, (NULL == pRegistry) ? pRegistry : CU_get_registry()))) {
+ suite_num = atol(szSuiteNumber);
+ pSuite = CU_get_suite_by_index(suite_num, pRegistry);
+ if (NULL != pSuite) {
+ assert(NULL != pSuite->pName);
+ snprintf(szTemp, STRING_LENGTH, _("Suite '%s' selected."), pSuite->pName);
+ show_detail_window_message(szTemp);
if (STOP == curses_suite_level_run(pSuite)) {
bContinue = false;
}
- f_szOptions = MAIN_OPTIONS;
+ f_szOptions = _(MAIN_OPTIONS);
refresh_options_window();
}
- break;
+ else {
+ show_detail_window_message(_("Suite not found."));
+ }
+ }
+ }
- case 'L':
- list_suites(pRegistry);
- break;
+ else if (option == _("L")[0]) {
+ list_suites(pRegistry);
+ }
- case 'F':
- show_failures();
- break;
+ else if (option == _("A")[0]) {
+ if (0 == pRegistry->uiNumberOfSuites) {
+ fprintf(stdout, "\n%s", _("No suites are registered."));
+ }
+ else {
+ while (1) {
+ list_suites(pRegistry);
+ snprintf(szTemp, STRING_LENGTH, _("Enter number of suite to select (1-%u) : "),
+ pRegistry->uiNumberOfSuites);
+ read_input_string(szTemp, szSuiteNumber, STRING_LENGTH);
+ refresh_details_window();
+ suite_num = atol(szSuiteNumber);
+ pSuite = CU_get_suite_by_index(suite_num, pRegistry);
+ if (NULL != pSuite) {
+ CU_set_suite_active(pSuite, (CU_FALSE == pSuite->fActive) ? CU_TRUE : CU_FALSE);
+ }
+ else {
+ break;
+ }
+ }
+ f_szOptions = _(MAIN_OPTIONS);
+ refresh_options_window();
+ }
+ }
- case 'Q':
- return bContinue = false;
+ else if (option == _("F")[0]) {
+ show_failures();
+ }
- case KEY_UP:
- case KEY_DOWN:
- case KEY_RIGHT:
- case KEY_LEFT:
- scroll_window(option, &details_pad, refresh_details_window);
- break;
+ else if (option == _("O")[0]) {
+ curses_set_options_run();
+ }
- default:
- break;
+ else if (option == _("Q")[0]) {
+ return bContinue = false;
+ }
+
+ else if ((option == KEY_UP) ||
+ (option == KEY_DOWN) ||
+ (option == KEY_RIGHT) ||
+ (option == KEY_LEFT)) {
+ scroll_window(option, &details_pad, refresh_details_window);
+ }
+
+ else if ((option == _("H")[0]) || (option == _("?")[0])) {
+ show_registry_level_help();
}
}
@@ -631,56 +703,111 @@
/*------------------------------------------------------------------------*/
/** Run a selected suite within the curses interface.
- * Displays actions and responds based on user imput.
- * @param pSuite The suite to use for testing (non-NULL).
+ * Displays actions and responds based on user imput.
+ * @param pSuite The suite to use for testing (non-NULL).
*/
static STATUS curses_suite_level_run(CU_pSuite pSuite)
{
- char szTestName[STRING_LENGTH];
+ char szTestNumber[STRING_LENGTH];
+ char szTemp[STRING_LENGTH];
+ CU_pTestRegistry pRegistry = CU_get_registry();
CU_pTest pTest = NULL;
+ long test_num;
+
+ assert(NULL != pRegistry);
+ assert(NULL != pSuite);
+ assert(NULL != pSuite->pName);
- f_szOptions = SUITE_OPTIONS;
+ f_szOptions = _(SUITE_OPTIONS);
refresh_options_window();
while (true) {
int option = toupper(getch());
- switch (option) {
- case 'R':
- curses_run_suite_tests(pSuite);
- break;
+ if (option == _("R")[0]) {
+ curses_run_suite_tests(pSuite);
+ }
- case 'S':
- read_input_string("Enter Test Name : ", szTestName, STRING_LENGTH);
- if (NULL != (pTest = CU_get_test_by_name(szTestName, pSuite))) {
+ else if (option == _("S")[0]) {
+ if (0 == pSuite->uiNumberOfTests) {
+ snprintf(szTemp, STRING_LENGTH,
+ _("Suite %s contains no tests."), pSuite->pName);
+ show_detail_window_message(szTemp);
+ }
+ else {
+ list_tests(pSuite);
+ snprintf(szTemp, STRING_LENGTH, "%s",
+ _("Enter number of test to select (1-%u) : "),
+ pRegistry->uiNumberOfSuites);
+ read_input_string(szTemp, szTestNumber, STRING_LENGTH);
+ test_num = atol(szTestNumber);
+ pTest = CU_get_test_by_index(test_num, pSuite);
+ if (NULL != pTest) {
curses_run_single_test(pSuite, pTest);
}
+ else {
+ show_detail_window_message(_("Test not found."));
+ }
refresh_details_window();
- break;
+ }
+ }
- case 'L':
- list_tests(pSuite);
- break;
+ else if (option == _("L")[0]) {
+ list_tests(pSuite);
+ }
- case 'F':
- show_failures();
- break;
+ else if (option == _("F")[0]) {
+ show_failures();
+ }
+
+ else if (option == _("A")[0]) {
+ if (0 == pSuite->uiNumberOfTests) {
+ snprintf(szTemp, STRING_LENGTH,
+ _("Suite %s contains no tests."), pSuite->pName);
+ show_detail_window_message(szTemp);
+ }
+ else {
+ while (1) {
+ list_tests(pSuite);
+ snprintf(szTemp, STRING_LENGTH, "%s",
+ _("Enter number of test to select (1-%u) : "),
+ pRegistry->uiNumberOfSuites);
+ read_input_string(szTemp, szTestNumber, STRING_LENGTH);
+ test_num = atol(szTestNumber);
+ pTest = CU_get_test_by_index(test_num, pSuite);
+ if (NULL != pTest) {
+ CU_set_test_active(pTest, (CU_FALSE == pTest->fActive) ? CU_TRUE : CU_FALSE);
+ }
+ else {
+ break;
+ }
+ }
+ f_szOptions = _(SUITE_OPTIONS);
+ refresh_options_window();
+ }
+ }
- case 'U':
- return CONTINUE;
+ else if (option == _("O")[0]) {
+ curses_set_options_run();
+ }
- case 'Q':
- return STOP;
+ else if (option == _("U")[0]) {
+ return CONTINUE;
+ }
- case KEY_UP:
- case KEY_DOWN:
- case KEY_RIGHT:
- case KEY_LEFT:
- scroll_window(option, &details_pad, refresh_details_window);
- break;
+ else if (option == _("Q")[0]) {
+ return STOP;
+ }
- default:
- break;
+ else if ((option == KEY_UP) ||
+ (option == KEY_DOWN) ||
+ (option == KEY_RIGHT) ||
+ (option == KEY_LEFT)) {
+ scroll_window(option, &details_pad, refresh_details_window);
+ }
+
+ else if ((option == _("H")[0]) || (option == _("?")[0])) {
+ show_suite_level_help(pSuite);
}
}
@@ -792,89 +919,180 @@
}
/*------------------------------------------------------------------------*/
-/** Print a list of registered suites in the detail window.
- * @param pRegistry The CU_pTestRegistry to query (non-NULL).
+/** Prints help text for registry level to detail window. */
+static void show_registry_level_help(void)
+{
+ if (!create_pad(&details_pad, application_windows.pDetailsWin, 8, 256)) {
+ return;
+ }
+
+ mvwprintw(details_pad.pPad, 0, 0, _("Commands: R - run all tests in all suites"));
+ mvwprintw(details_pad.pPad, 1, 0, _(" S - Select a suite to run or modify"));
+ mvwprintw(details_pad.pPad, 2, 0, _(" L - List all registered suites"));
+ mvwprintw(details_pad.pPad, 3, 0, _(" A - Activate or deactivate a suite (toggle)"));
+ mvwprintw(details_pad.pPad, 4, 0, _(" F - Show failures from last test run"));
+ mvwprintw(details_pad.pPad, 5, 0, _(" O - Set CUnit options"));
+ mvwprintw(details_pad.pPad, 6, 0, _(" H - Show this help message"));
+ mvwprintw(details_pad.pPad, 7, 0, _(" Q - Quit the application"));
+ refresh_details_window();
+}
+
+/*------------------------------------------------------------------------*/
+/** Prints help text for suite level to detail window. */
+static void show_suite_level_help(CU_pSuite pSuite)
+{
+ char szTemp[STRING_LENGTH];
+
+ assert(NULL != pSuite);
+ assert(NULL != pSuite->pName);
+
+ if (!create_pad(&details_pad, application_windows.pDetailsWin, 9, 256)) {
+ return;
+ }
+
+ snprintf(szTemp, STRING_LENGTH, _("Commands: R - run all tests in suite %s"),
+ pSuite->pName);
+ mvwprintw(details_pad.pPad, 0, 0, szTemp);
+ mvwprintw(details_pad.pPad, 1, 0, _(" S - Select and run a test"));
+ snprintf(szTemp, STRING_LENGTH, _(" L - List all tests registered in suite %s"),
+ pSuite->pName);
+ mvwprintw(details_pad.pPad, 2, 0, szTemp);
+ mvwprintw(details_pad.pPad, 3, 0, _(" A - Activate or deactivate a test (toggle)"));
+ mvwprintw(details_pad.pPad, 4, 0, _(" F - Show failures from last test run"));
+ mvwprintw(details_pad.pPad, 5, 0, _(" M - Move up to main menu"));
+ mvwprintw(details_pad.pPad, 6, 0, _(" O - Set CUnit options"));
+ mvwprintw(details_pad.pPad, 7, 0, _(" H - Show this help message"));
+ mvwprintw(details_pad.pPad, 8, 0, _(" Q - Quit the application"));
+ refresh_details_window();
+}
+
+/*------------------------------------------------------------------------*/
+/** Print a list of registered suites to the detail window.
+ * @param pRegistry The CU_pTestRegistry to query (non-NULL).
*/
static void list_suites(CU_pTestRegistry pRegistry)
{
CU_pSuite pCurSuite = NULL;
int i;
+ char szTemp[STRING_LENGTH];
+ static size_t width[6];
if (NULL == pRegistry) {
pRegistry = CU_get_registry();
}
-
+
assert(pRegistry);
-
- if (!create_pad(&details_pad, application_windows.pDetailsWin,
- pRegistry->uiNumberOfSuites == 0 ? 1 : pRegistry->uiNumberOfSuites + 4, 256)) {
- return;
- }
if (0 == pRegistry->uiNumberOfSuites) {
- mvwprintw(details_pad.pPad, 0, 0, "%s", "No test suites defined.");
- refresh_details_window();
+ show_detail_window_message(_("No suites are registered."));
return;
}
assert(pRegistry->pSuite);
- mvwprintw(details_pad.pPad, 0, 0, "%s", " Suite Name Init? Cleanup? # Tests");
+ if (!create_pad(&details_pad, application_windows.pDetailsWin, pRegistry->uiNumberOfSuites + 4, 256)) {
+ return;
+ }
+
+ /* only need to calculate formatting widths once */
+ if (0 == width[0]) {
+ width[0] = CU_number_width(pRegistry->uiNumberOfSuites) + 1;
+ width[1] = 34;
+ width[2] = CU_MAX(strlen(_("Init?")), CU_MAX(f_yes_width, f_no_width)) + 1;
+ width[3] = CU_MAX(strlen(_("Cleanup?")), CU_MAX(f_yes_width, f_no_width)) + 1;
+ width[4] = CU_MAX(strlen(_("#Tests")), CU_number_width(pRegistry->uiNumberOfTests) + 1) + 1;
+ width[5] = CU_MAX(strlen(_("Active?")), CU_MAX(f_yes_width, f_no_width)) + 1;
+ }
+
+ snprintf(szTemp, STRING_LENGTH, "%*s %-*s%*s%*s%*s%*s",
+ width[0], _("#"),
+ width[1], _("Suite Name"),
+ width[2], _("Init?"),
+ width[3], _("Cleanup?"),
+ width[4], _("#Tests"),
+ width[5], _("Active?"));
+ mvwprintw(details_pad.pPad, 0, 0, "%s", szTemp);
for (i = 0, pCurSuite = pRegistry->pSuite; pCurSuite; pCurSuite = pCurSuite->pNext, i++) {
- char szTemp[256];
-
- snprintf(szTemp, sizeof(szTemp), "%3d. %-34.33s %3s %3s %3d",
- i + 1,
- pCurSuite->pName,
- pCurSuite->pInitializeFunc ? "YES" : "NO",
- pCurSuite->pCleanupFunc ? "YES" : "NO",
- pCurSuite->uiNumberOfTests);
+ assert(NULL != pCurSuite->pName);
+ snprintf(szTemp, STRING_LENGTH, "%*d. %-*.*s%*s%*s%*u%*s",
+ width[0], i+1,
+ width[1], width[1] - 1, pCurSuite->pName,
+ width[2]-1, (NULL != pCurSuite->pInitializeFunc) ? _("Yes") : _("No"),
+ width[3], (NULL != pCurSuite->pCleanupFunc) ? _("Yes") : _("No"),
+ width[4], pCurSuite->uiNumberOfTests,
+ width[5], (CU_FALSE != pCurSuite->fActive) ? _("Yes") : _("No"));
mvwprintw(details_pad.pPad, i + 2, 0, "%s", szTemp);
}
- mvwprintw(details_pad.pPad, i + 2, 0, "%s", "------------------------------------------------------------------");
- mvwprintw(details_pad.pPad, i + 3, 0, "Total Number of Test Suites : %-d", pRegistry->uiNumberOfSuites);
+ mvwprintw(details_pad.pPad, i + 2, 0, "%s",
+ "---------------------------------------------------------------------------");
+ mvwprintw(details_pad.pPad, i + 3, 0,
+ _("Total Number of Suites : %-u"), pRegistry->uiNumberOfSuites);
refresh_details_window();
}
/*------------------------------------------------------------------------*/
-/** Print a list of tests contained in a specified suite
- * in the detail window.
- * @param pSuite The suite to query (non-NULL).
+/** Print a list of tests contained in a specified suite to the detail window.
+ * @param pSuite The suite to query (non-NULL).
*/
static void list_tests(CU_pSuite pSuite)
{
CU_pTest pCurTest = NULL;
- int i;
+ unsigned int i;
+ char szTemp[STRING_LENGTH];
+ static size_t width[3];
- assert(pSuite);
+ assert(NULL != pSuite);
+ assert(NULL != pSuite->pName);
- if (!create_pad(&details_pad, application_windows.pDetailsWin,
- pSuite->uiNumberOfTests == 0 ? 1 : pSuite->uiNumberOfTests + 4, 256)) {
+ if (!create_pad(&details_pad, application_windows.pDetailsWin, pSuite->uiNumberOfTests + 5, 256)) {
return;
}
if (0 == pSuite->uiNumberOfTests) {
- mvwprintw(details_pad.pPad, 0, 0, "Suite %s contains no tests.", pSuite->pName);
- refresh_details_window();
+ snprintf(szTemp, STRING_LENGTH,
+ _("Suite %s contains no tests."), pSuite->pName);
+ show_detail_window_message(szTemp);
return;
}
assert(pSuite->pTest);
- mvwprintw(details_pad.pPad, 0, 0, " Tests in suite %s", pSuite->pName);
-
- for (i = 0, pCurTest = pSuite->pTest; pCurTest; pCurTest = pCurTest->pNext, i++) {
- char szTemp[256];
-
- snprintf(szTemp, sizeof(szTemp), "%3d. %s", i + 1, pCurTest->pName);
- mvwprintw(details_pad.pPad, i + 2, 0, "%s", szTemp);
+ /* only number of tests can change between calls */
+ width[0] = CU_number_width(pSuite->uiNumberOfTests) + 1;
+ if (0 == width[1]) {
+ width[1] = 34;
+ width[2] = CU_MAX(strlen(_("Active?")), CU_MAX(f_yes_width, f_no_width)) + 1;
+ }
+
+ snprintf(szTemp, STRING_LENGTH, "%s: %s", _("Suite"), pSuite->pName);
+ mvwprintw(details_pad.pPad, 0, 0, szTemp);
+
+ snprintf(szTemp, STRING_LENGTH,
+ "%*s %-*s%*s",
+ width[0], _("#"),
+ width[1], _("Test Name"),
+ width[2], _("Active?"));
+ mvwprintw(details_pad.pPad, 1, 0, szTemp);
+
+ for (i = 0, pCurTest = pSuite->pTest ;
+ NULL != pCurTest ;
+ pCurTest = pCurTest->pNext, i++) {
+ assert(NULL != pCurTest->pName);
+ snprintf(szTemp, STRING_LENGTH,
+ "%*u. %-*.*s%*s",
+ width[0], i + 1,
+ width[1], width[1]-1, pCurTest->pName,
+ width[2]-1, (CU_FALSE != pCurTest->fActive) ? _("Yes") : _("No"));
+ mvwprintw(details_pad.pPad, i + 3, 0, "%s", szTemp);
}
- mvwprintw(details_pad.pPad, i + 2, 0, "%s", "---------------------------------------------");
- mvwprintw(details_pad.pPad, i + 3, 0, "Total Number of Tests : %-d", pSuite->uiNumberOfTests);
+ mvwprintw(details_pad.pPad, i + 3, 0, "%s",
+ "---------------------------------------------");
+ mvwprintw(details_pad.pPad, i + 4, 0,
+ _("Total Number of Tests : %-u"), pSuite->uiNumberOfTests);
refresh_details_window();
}
@@ -884,42 +1102,81 @@
{
int i;
CU_pFailureRecord pFailure = CU_get_failure_list();
- unsigned int nFailures = CU_get_number_of_failures();
-
- if (!create_pad(&details_pad, application_windows.pDetailsWin,
- nFailures == 0 ? 1 : nFailures + 5, 256)) {
- return;
- }
+ unsigned int nFailures = CU_get_number_of_failure_records();
if (0 == nFailures) {
- mvwprintw(details_pad.pPad, 0, 0, "%s", "No Failures.");
- refresh_details_window();
+ show_detail_window_message(_("No failures."));
return;
}
assert(pFailure);
- mvwprintw(details_pad.pPad, 1, 0, "%s", " src_file:line# : (suite:test) : failure_condition");
+ if (!create_pad(&details_pad, application_windows.pDetailsWin, nFailures + 5, 256)) {
+ return;
+ }
+
+ mvwprintw(details_pad.pPad, 1, 0, "%s", _(" src_file:line# : (suite:test) : failure_condition"));
for (i = 0 ; pFailure ; pFailure = pFailure->pNext, i++) {
- char szTemp[256];
+ char szTemp[STRING_LENGTH];
- snprintf(szTemp, 256, "%d. %s:%d : (%s : %s) : %s", i + 1,
- pFailure->strFileName ? pFailure->strFileName : "",
+ snprintf(szTemp, STRING_LENGTH, "%d. %s:%d : (%s : %s) : %s", i + 1,
+ ((NULL != pFailure->strFileName) ? pFailure->strFileName : ""),
pFailure->uiLineNumber,
- pFailure->pSuite ? pFailure->pSuite->pName : "",
- pFailure->pTest ? pFailure->pTest->pName : "",
- pFailure->strCondition ? pFailure->strCondition : "");
+ (((NULL != pFailure->pSuite) && (NULL != pFailure->pSuite->pName))
+ ? pFailure->pSuite->pName : ""),
+ (((NULL != pFailure->pTest) && (NULL != pFailure->pTest->pName))
+ ? pFailure->pTest->pName : ""),
+ ((NULL != pFailure->strCondition) ? pFailure->strCondition : ""));
mvwprintw(details_pad.pPad, i + 3, 0, "%s", szTemp);
}
mvwprintw(details_pad.pPad, i + 3, 0, "%s", "=============================================");
- mvwprintw(details_pad.pPad, i + 4, 0, "Total Number of Failures : %-d", nFailures);
+ mvwprintw(details_pad.pPad, i + 4, 0, _("Total Number of Failures : %-u"), nFailures);
refresh_details_window();
}
/*------------------------------------------------------------------------*/
+/**
+ * Sets CUnit options interactively using curses interface.
+ * Displays actions and responds based on user imput.
+ */
+static STATUS curses_set_options_run(void)
+{
+ char szTemp[STRING_LENGTH];
+ STATUS eStatus = CONTINUE;
+ long option_num;
+
+ if (!create_pad(&details_pad, application_windows.pDetailsWin, 3, 256)) {
+ return eStatus;
+ }
+
+ mvwprintw(details_pad.pPad, 0, 0, _("CUnit Options:"));
+
+ while (CONTINUE == eStatus) {
+
+ snprintf(szTemp, STRING_LENGTH, _(" 1 - Inactive suites/tests treated as runtime failures %s"),
+ (CU_FALSE != CU_get_fail_on_inactive()) ? _("Yes") : _("No "));
+ mvwprintw(details_pad.pPad, 2, 0, szTemp);
+ refresh_details_window();
+ read_input_string(_("Enter number of option to change : "), szTemp, STRING_LENGTH);
+ option_num = atol(szTemp);
+
+ switch (option_num) {
+ case 1:
+ CU_set_fail_on_inactive((CU_FALSE == CU_get_fail_on_inactive()) ? CU_TRUE : CU_FALSE);
+ break;
+
+ default:
+ eStatus = MOVE_UP;
+ break;
+ }
+ }
+ return eStatus;
+}
+
+/*------------------------------------------------------------------------*/
/** Run all tests within the curses interface.
* The test registry is changed to the specified registry
* before running the tests, and reset to the original
@@ -1044,26 +1301,32 @@
f_pCurrentTest = NULL;
f_pCurrentSuite = NULL;
- if (!create_pad(&details_pad, application_windows.pDetailsWin, 16 , 256)) {
+ if (!create_pad(&details_pad, application_windows.pDetailsWin, 21, 256)) {
return;
}
- mvwprintw(details_pad.pPad, 0, 0, "%s", "====== Suite Run Summary ======");
- mvwprintw(details_pad.pPad, 1, 0, " TOTAL SUITES: %4u", f_uiTotalSuites);
- mvwprintw(details_pad.pPad, 2, 0, " Run: %4u", f_uiTotalSuites - f_uiSuitesSkipped);
- mvwprintw(details_pad.pPad, 3, 0, " Skipped: %4u", f_uiSuitesSkipped);
-
- mvwprintw(details_pad.pPad, 5, 0, "%s", "====== Test Run Summary =======");
- mvwprintw(details_pad.pPad, 6, 0, " TOTAL TESTS: %4u", f_uiTotalTests);
- mvwprintw(details_pad.pPad, 7, 0, " Run: %4u", f_uiTestsRun);
- mvwprintw(details_pad.pPad, 8, 0, " Skipped: %4u", f_uiTestsSkipped);
- mvwprintw(details_pad.pPad, 9, 0, " Successful: %4u", f_uiTestsRunSuccessful);
- mvwprintw(details_pad.pPad, 10, 0, " Failed: %4u", f_uiTestsFailed);
-
- mvwprintw(details_pad.pPad, 12, 0, "%s", "====== Assertion Summary ======");
- mvwprintw(details_pad.pPad, 13, 0, " TOTAL ASSERTS: %4u", CU_get_number_of_asserts());
- mvwprintw(details_pad.pPad, 14, 0, " Passed: %4u", CU_get_number_of_successes());
- mvwprintw(details_pad.pPad, 15, 0, " Failed: %4u", CU_get_number_of_failures());
+ mvwprintw(details_pad.pPad, 0, 0, "%s", _("====== Suite Run Summary ======"));
+ mvwprintw(details_pad.pPad, 1, 0, _(" TOTAL SUITES: %4u"), f_uiTotalSuites);
+ mvwprintw(details_pad.pPad, 2, 0, _(" Run: %4u"), f_uiTotalSuites - f_uiSuitesSkipped);
+ mvwprintw(details_pad.pPad, 3, 0, _(" Skipped: %4u"), f_uiSuitesSkipped);
+ mvwprintw(details_pad.pPad, 4, 0, _(" Inactive: %4u"), CU_get_number_of_suites_inactive());
+
+ mvwprintw(details_pad.pPad, 6, 0, "%s", _("====== Test Run Summary ======="));
+ mvwprintw(details_pad.pPad, 7, 0, _(" TOTAL TESTS: %4u"), f_uiTotalTests);
+ mvwprintw(details_pad.pPad, 8, 0, _(" Run: %4u"), f_uiTestsRun);
+ mvwprintw(details_pad.pPad, 9, 0, _(" Skipped: %4u"), f_uiTestsSkipped);
+ mvwprintw(details_pad.pPad, 10, 0, _(" Successful: %4u"), f_uiTestsRunSuccessful);
+ mvwprintw(details_pad.pPad, 11, 0, _(" Failed: %4u"), f_uiTestsFailed);
+ mvwprintw(details_pad.pPad, 12, 0, _(" Inactive: %4u"), CU_get_number_of_tests_inactive());
+
+ mvwprintw(details_pad.pPad, 14, 0, "%s", _("====== Assertion Summary ======"));
+ mvwprintw(details_pad.pPad, 15, 0, _(" TOTAL ASSERTS: %4u"), CU_get_number_of_asserts());
+ mvwprintw(details_pad.pPad, 16, 0, _(" Passed: %4u"), CU_get_number_of_successes());
+ mvwprintw(details_pad.pPad, 17, 0, _(" Failed: %4u"), CU_get_number_of_failures());
+
+
+ mvwprintw(details_pad.pPad, 19, 0, "%s", _("====== Failure Summary ======"));
+ mvwprintw(details_pad.pPad, 20, 0, _(" TOTAL FAILURES: %4u"), CU_get_number_of_failure_records());
refresh_details_window();
refresh_run_summary_window();
@@ -1083,4 +1346,4 @@
refresh_progress_window();
}
-/** @} */
+/** @} */
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Curses/Makefile.in cunit-2.1-2.dfsg/CUnit/Sources/Curses/Makefile.in
--- cunit-2.1-0.dfsg/CUnit/Sources/Curses/Makefile.in 2006-03-22 10:57:14.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Curses/Makefile.in 2010-10-15 15:11:41.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -45,29 +43,30 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libcunitcurses_la_LIBADD =
am_libcunitcurses_la_OBJECTS = Curses.lo
libcunitcurses_la_OBJECTS = $(am_libcunitcurses_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(libcunitcurses_la_SOURCES)
DIST_SOURCES = $(libcunitcurses_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -86,40 +85,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -129,35 +115,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -169,28 +160,41 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
noinst_LTLIBRARIES = libcunitcurses.la
libcunitcurses_la_SOURCES = \
Curses.c
@@ -203,14 +207,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Sources/Curses/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu CUnit/Sources/Curses/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Sources/Curses/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu CUnit/Sources/Curses/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -228,6 +232,7 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@@ -238,7 +243,7 @@
rm -f "$${dir}/so_locations"; \
done
libcunitcurses.la: $(libcunitcurses_la_OBJECTS) $(libcunitcurses_la_DEPENDENCIES)
- $(LINK) $(libcunitcurses_la_LDFLAGS) $(libcunitcurses_la_OBJECTS) $(libcunitcurses_la_LIBADD) $(LIBS)
+ $(LINK) $(libcunitcurses_la_OBJECTS) $(libcunitcurses_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -249,22 +254,22 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Curses.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -275,82 +280,85 @@
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -378,6 +386,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -391,7 +400,7 @@
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -399,18 +408,38 @@
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am:
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -431,19 +460,23 @@
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-info-am
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Framework/CUError.c cunit-2.1-2.dfsg/CUnit/Sources/Framework/CUError.c
--- cunit-2.1-0.dfsg/CUnit/Sources/Framework/CUError.c 2006-01-30 03:52:34.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Framework/CUError.c 2006-05-19 21:57:27.000000000 +0000
@@ -1,7 +1,7 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -23,6 +23,8 @@
*
* 16-Jul-2004 Created access functions for error code, error action
* functions, messages for new error codes. (JDS)
+ *
+ * 02-May-2006 Added internationalization hooks. (JDS)
*/
/** @file
@@ -35,40 +37,34 @@
#include
#include
+#include "CUnit_intl.h"
#include "CUError.h"
-/*
- * Global/Static Definitions
- */
+/*=================================================================
+ * Global/Static Definitions
+ *=================================================================*/
/** Local variable holding the current error code. */
static CU_ErrorCode g_error_number = CUE_SUCCESS;
/** Local variable holding the current error action code. */
static CU_ErrorAction g_error_action = CUEA_IGNORE;
-/* Private function forward declarations */
+/*=================================================================
+ * Private function forward declarations
+ *=================================================================*/
static const char* get_error_desc(CU_ErrorCode error);
#ifdef CUNIT_DO_NOT_DEFINE_UNLESS_BUILDING_TESTS
void test_exit(int status);
#endif
-/*------------------------------------------------------------------------*/
-/** Set the error code.
- * This function is used internally by CUnit implementation functions
- * when an error condition occurs within the framework. It should
- * not generally be called by user code. NOTE that if the current
- * error action is CUEA_ABORT, then calling this function will
- * result in exit() being called for the current application.
- * @param error CU_ErrorCode indicating the current error condition.
- * @see CU_get_error()
- * @see CU_get_error_msg()
- * @see CU_ErrorCode
- */
+/*=================================================================
+ * Public API functions
+ *=================================================================*/
void CU_set_error(CU_ErrorCode error)
{
if ((error != CUE_SUCCESS) && (g_error_action == CUEA_ABORT)) {
#ifndef CUNIT_DO_NOT_DEFINE_UNLESS_BUILDING_TESTS
- fprintf(stderr, "\nAborting due to error #%d: %s\n",
+ fprintf(stderr, _("\nAborting due to error #%d: %s\n"),
(int)error,
get_error_desc(error));
exit((int)error);
@@ -81,140 +77,102 @@
}
/*------------------------------------------------------------------------*/
-/** Get the error code.
- * CUnit implementation functions set the error code to indicate the
- * status of the most recent operation. In general, the CUnit functions
- * will clear the code to CUE_SUCCESS, then reset it to a specific error
- * code if an exception condition is encountered. Some functions
- * return the code, others leave it to the user to inspect if desired.
- * @return The current error condition code.
- * @see CU_get_error_msg()
- * @see CU_ErrorCode
- */
CU_ErrorCode CU_get_error(void)
{
return g_error_number;
}
/*------------------------------------------------------------------------*/
-/** Get the message corresponding to the error code.
- * CUnit implementation functions set the error code to indicate the
- * of the most recent operation. In general, the CUnit functions will
- * clear the code to CUE_SUCCESS, then reset it to a specific error
- * code if an exception condition is encountered. This function allows
- * the user to retrieve a descriptive error message corresponding to the
- * error code set by the last operation.
- * @return A message corresponding to the current error condition.
- * @see CU_get_error()
- * @see CU_ErrorCode
- */
const char* CU_get_error_msg(void)
{
return get_error_desc(g_error_number);
}
/*------------------------------------------------------------------------*/
-/** Set the action to take when an error condition occurs.
- * This function should be used to specify the action to take
- * when an error condition is encountered. The default action is
- * CUEA_IGNORE, which results in errors being ignored and test runs
- * being continued (if possible). A value of CUEA_FAIL causes test
- * runs to stop as soon as an error condition occurs, while
- * CU_ABORT causes the application to exit on any error.
- * @param action CU_ErrorAction indicating the new error action.
- * @see CU_get_error_action()
- * @see CU_set_error()
- * @see CU_ErrorAction
- */
void CU_set_error_action(CU_ErrorAction action)
{
g_error_action = action;
}
/*------------------------------------------------------------------------*/
-/** Get the current error action code.
- * @return The current error action code.
- * @see CU_set_error_action()
- * @see CU_set_error()
- * @see CU_ErrorAction
- */
CU_ErrorAction CU_get_error_action(void)
{
return g_error_action;
}
-/*
- * Private static function definitions
- */
-/*------------------------------------------------------------------------*/
+/*=================================================================
+ * Private static function definitions
+ *=================================================================*/
/** Internal function to look up the error message for a specified
- * error code. An empty string is returned if iError is not a member
- * of CU_ErrorCode.
- * @param iError CU_ErrorCode to look up.
- * @return Pointer to a string containing the error message.
- * @see CU_get_error_msg()
+ * error code. An empty string is returned if iError is not a member
+ * of CU_ErrorCode. If you add an error code to enum CU_ErrorCode,
+ * be sure to add a corresponding error message here.
+ *
+ * @param iError CU_ErrorCode to look up.
+ * @return Pointer to a string containing the error message.
+ * @see CU_get_error_msg()
*/
static const char* get_error_desc(CU_ErrorCode iError)
{
int iMaxIndex;
static const char* ErrorDescription[] = {
- "No Error", /* CUE_SUCCESS - 0 */
- "Memory allocation failed.", /* CUE_NOMEMORY - 1 */
- "",
- "",
+ N_("No Error."), /* CUE_SUCCESS - 0 */
+ N_("Memory allocation failed."), /* CUE_NOMEMORY - 1 */
"",
"",
"",
"",
"",
"",
- "Test registry does not exist.", /* CUE_NOREGISTRY - 10 */
- "Registry already exists.", /* CUE_REGISTRY_EXISTS - 11 */
"",
"",
+ N_("Test registry does not exist."), /* CUE_NOREGISTRY - 10 */
+ N_("Registry already exists."), /* CUE_REGISTRY_EXISTS - 11 */
"",
"",
"",
"",
"",
"",
- "NULL suite not allowed.", /* CUE_NOSUITE - 20 */
- "Suite name cannot be NULL.", /* CUE_NO_SUITENAME - 21 */
- "Suite initialization function failed.", /* CUE_SINIT_FAILED - 22 */
- "Suite cleanup function failed.", /* CUE_SCLEAN_FAILED - 23 */
- "Suite having name already registered.", /* CUE_DUP_SUITE - 24 */
"",
"",
+ N_("NULL suite not allowed."), /* CUE_NOSUITE - 20 */
+ N_("Suite name cannot be NULL."), /* CUE_NO_SUITENAME - 21 */
+ N_("Suite initialization function failed."), /* CUE_SINIT_FAILED - 22 */
+ N_("Suite cleanup function failed."), /* CUE_SCLEAN_FAILED - 23 */
+ N_("Suite having name already registered."), /* CUE_DUP_SUITE - 24 */
+ N_("Requested suite is not active."), /* CUE_SUITE_INACTIVE - 25 */
"",
"",
"",
- "NULL test not allowed.", /* CUE_NOTEST - 30 */
- "Test name cannot be NULL.", /* CUE_NO_TESTNAME - 31 */
- "Test having this name already in suite.",/* CUE_DUP_TEST - 32 */
- "Test not registered in specified suite.",/* CUE_TEST_NOT_IN_SUITE - 33 */
"",
+ N_("NULL test or test function not allowed."),/* CUE_NOTEST - 30 */
+ N_("Test name cannot be NULL."), /* CUE_NO_TESTNAME - 31 */
+ N_("Test having this name already in suite."),/* CUE_DUP_TEST - 32 */
+ N_("Test not registered in specified suite."),/* CUE_TEST_NOT_IN_SUITE - 33 */
+ N_("Requested test is not active"), /* CUE_TEST_INACTIVE - 34 */
"",
"",
"",
"",
"",
- "Error opening file.", /* CUE_FOPEN_FAILED - 40 */
- "Error closing file.", /* CUE_FCLOSE_FAILED - 41 */
- "Bad file name.", /* CUE_BAD_FILENAME - 42 */
- "Error during write to file.", /* CUE_WRITE_ERROR - 43 */
- "Undefined Error"
+ N_("Error opening file."), /* CUE_FOPEN_FAILED - 40 */
+ N_("Error closing file."), /* CUE_FCLOSE_FAILED - 41 */
+ N_("Bad file name."), /* CUE_BAD_FILENAME - 42 */
+ N_("Error during write to file."), /* CUE_WRITE_ERROR - 43 */
+ N_("Undefined Error")
};
iMaxIndex = (int)(sizeof(ErrorDescription)/sizeof(char *) - 1);
if ((int)iError < 0) {
- return ErrorDescription[0];
+ return _(ErrorDescription[0]);
}
else if ((int)iError > iMaxIndex) {
- return ErrorDescription[iMaxIndex];
+ return _(ErrorDescription[iMaxIndex]);
}
else {
- return ErrorDescription[(int)iError];
+ return _(ErrorDescription[(int)iError]);
}
}
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Framework/Makefile.in cunit-2.1-2.dfsg/CUnit/Sources/Framework/Makefile.in
--- cunit-2.1-0.dfsg/CUnit/Sources/Framework/Makefile.in 2006-03-22 10:57:14.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Framework/Makefile.in 2010-10-15 15:11:41.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,15 +16,12 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -46,13 +44,11 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
libcunittestfmk_a_AR = $(AR) $(ARFLAGS)
-@ENABLE_TEST_TRUE@am__DEPENDENCIES_1 = CUError_test.o MyMem_test.o \
-@ENABLE_TEST_TRUE@ TestDB_test.o TestRun_test.o Util_test.o
-@ENABLE_TEST_TRUE@libcunittestfmk_a_DEPENDENCIES = \
-@ENABLE_TEST_TRUE@ $(am__DEPENDENCIES_1)
+@ENABLE_TEST_TRUE@libcunittestfmk_a_DEPENDENCIES = $(TEST_OBJECTS)
am_libcunittestfmk_a_OBJECTS =
libcunittestfmk_a_OBJECTS = $(am_libcunittestfmk_a_OBJECTS)
LTLIBRARIES = $(noinst_LTLIBRARIES)
@@ -60,25 +56,25 @@
am__objects_1 = CUError.lo MyMem.lo TestDB.lo TestRun.lo Util.lo
am_libcunitfmk_la_OBJECTS = $(am__objects_1)
libcunitfmk_la_OBJECTS = $(am_libcunitfmk_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(libcunittestfmk_a_SOURCES) $(libcunitfmk_la_SOURCES)
DIST_SOURCES = $(libcunittestfmk_a_SOURCES) $(libcunitfmk_la_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -97,40 +93,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -140,35 +123,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -180,28 +168,41 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
SHARED_SOURCES = \
CUError.c \
MyMem.c \
@@ -231,14 +232,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Sources/Framework/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu CUnit/Sources/Framework/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Sources/Framework/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu CUnit/Sources/Framework/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -256,6 +257,7 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
@@ -273,7 +275,7 @@
rm -f "$${dir}/so_locations"; \
done
libcunitfmk.la: $(libcunitfmk_la_OBJECTS) $(libcunitfmk_la_DEPENDENCIES)
- $(LINK) $(libcunitfmk_la_LDFLAGS) $(libcunitfmk_la_OBJECTS) $(libcunitfmk_la_LIBADD) $(LIBS)
+ $(LINK) $(libcunitfmk_la_OBJECTS) $(libcunitfmk_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -288,22 +290,22 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Util.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -314,82 +316,85 @@
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -417,6 +422,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -430,7 +436,7 @@
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -438,18 +444,38 @@
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am:
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -470,23 +496,28 @@
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \
ctags distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am
+ tags uninstall uninstall-am
@ENABLE_TEST_TRUE@%_test.o: %.c
@ENABLE_TEST_TRUE@ $(COMPILE) $(TEST_INCLUDES) $(TEST_DEFINES) -o $@ -c $<
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Framework/MyMem.c cunit-2.1-2.dfsg/CUnit/Sources/Framework/MyMem.c
--- cunit-2.1-0.dfsg/CUnit/Sources/Framework/MyMem.c 2006-01-30 03:52:34.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Framework/MyMem.c 2006-05-20 13:19:14.000000000 +0000
@@ -1,7 +1,7 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -33,6 +33,8 @@
*
* 24-Apr-2005 Changed type of allocated sizes to size_t to avoid
* signed-unsigned mismatch. (JDS)
+ *
+ * 02-May-2006 Added internationalization hooks. (JDS)
*/
/** @file
@@ -52,6 +54,7 @@
#include "CUnit.h"
#include "MyMem.h"
+#include "CUnit_intl.h"
#ifdef MEMTRACE
@@ -154,7 +157,7 @@
assert (NULL != pMemoryNode);
/* create and set up the new event */
- pMemoryEvent = malloc(sizeof(MEMORY_EVENT));
+ pMemoryEvent = (PMEMORY_EVENT)malloc(sizeof(MEMORY_EVENT));
assert(NULL != pMemoryEvent);
pMemoryEvent->Size = size;
@@ -333,7 +336,7 @@
}
if (NULL == (pFile = fopen(szDumpFileName, "w"))) {
- fprintf(stderr, "Failed to open file \"%s\" : %s", szDumpFileName, strerror(errno));
+ fprintf(stderr, _("Failed to open file \"%s\" : %s"), szDumpFileName, strerror(errno));
return;
}
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Framework/TestDB.c cunit-2.1-2.dfsg/CUnit/Sources/Framework/TestDB.c
--- cunit-2.1-0.dfsg/CUnit/Sources/Framework/TestDB.c 2006-03-21 01:30:54.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Framework/TestDB.c 2006-06-03 03:25:02.000000000 +0000
@@ -21,21 +21,29 @@
/*
* Implementation of Registry/TestGroup/Testcase management Routines.
*
- * Aug 2001 Initial implementation (AK)
+ * Aug 2001 Initial implementation (AK)
*
- * 09/Aug/2001 Added startup initialize/cleanup registry functions. (AK)
+ * 09/Aug/2001 Added startup initialize/cleanup registry functions. (AK)
*
- * 29/Aug/2001 Added Test and Group Add functions. (AK)
+ * 29/Aug/2001 Added Test and Group Add functions. (AK)
*
- * 02/Oct/2001 Added Proper Error codes and Messages on the failure conditions. (AK)
+ * 02/Oct/2001 Added Proper Error codes and Messages on the failure conditions. (AK)
*
- * 13/Oct/2001 Added Code to Check for the Duplicate Group name and test name. (AK)
+ * 13/Oct/2001 Added Code to Check for the Duplicate Group name and test name. (AK)
*
- * 15-Jul-2004 Added doxygen comments, new interface, added assertions to
- * internal functions, moved error handling code to CUError.c,
- * added assertions to make sure no modification of registry
- * during a run, bug fixes, changed CU_set_registry() so that it
- * doesn't require cleaning the existing registry. (JDS)
+ * 15-Jul-2004 Added doxygen comments, new interface, added assertions to
+ * internal functions, moved error handling code to CUError.c,
+ * added assertions to make sure no modification of registry
+ * during a run, bug fixes, changed CU_set_registry() so that it
+ * doesn't require cleaning the existing registry. (JDS)
+ *
+ * 24-Apr-2006 Removed constraint that suites/tests be uniquely named.
+ * Added ability to turn individual tests/suites on or off.
+ * Added lookup functions for suites/tests based on index.
+ * Moved doxygen comments for public API here to header.
+ * Modified internal unit tests to include these changes. (JDS)
+ *
+ * 02-May-2006 Added internationalization hooks. (JDS)
*/
/** @file
@@ -56,15 +64,16 @@
#include "TestDB.h"
#include "TestRun.h"
#include "Util.h"
+#include "CUnit_intl.h"
-/*
+/*=================================================================
* Global/Static Definitions
- */
+ *=================================================================*/
static CU_pTestRegistry f_pTestRegistry = NULL; /**< The active internal Test Registry. */
-/*
+/*=================================================================
* Private function forward declarations
- */
+ *=================================================================*/
static void cleanup_test_registry(CU_pTestRegistry pRegistry);
static CU_pSuite create_suite(const char* strName, CU_InitializeFunc pInit, CU_CleanupFunc pClean);
static void cleanup_suite(CU_pSuite pSuite);
@@ -76,22 +85,9 @@
static CU_BOOL suite_exists(CU_pTestRegistry pRegistry, const char* szSuiteName);
static CU_BOOL test_exists(CU_pSuite pSuite, const char* szTestName);
-/*
+/*=================================================================
* Public Interface functions
- */
-/*------------------------------------------------------------------------*/
-/** Initialize the test registry.
- * Any existing registry is freed, including all stored suites and
- * associated tests. The most recent stored test results are also cleared.
- * This function must not be called during a test run (checked
- * by assertion)
.
- * @return CUE_NOMEMORY if memory for the new registry cannot be allocated,
- * CUE_SUCCESS otherwise.
- * @see CU_cleanup_registry
- * @see CU_get_registry
- * @see CU_set_registry
- * @see CU_registry_initialized
- */
+ *=================================================================*/
CU_ErrorCode CU_initialize_registry(void)
{
CU_ErrorCode result;
@@ -113,32 +109,12 @@
}
/*------------------------------------------------------------------------*/
-/** Check whether the test registry has been initialized.
- * @return CU_TRUE if the registry has been initialized,
- * CU_FALSE otherwise.
- * @see CU_initialize_registry
- * @see CU_cleanup_registry
- */
CU_BOOL CU_registry_initialized(void)
{
return (NULL == f_pTestRegistry) ? CU_FALSE : CU_TRUE;
}
/*------------------------------------------------------------------------*/
-/** Clear the test registry.
- * The active test registry is freed, including all stored suites and
- * associated tests. The most recent stored test results are also cleared.
- * After calling this function, CUnit suites cannot be added until
- * CU_initialize_registry() or CU_set_registry() is called. Further, any
- * pointers to suites or test cases held by the user will be invalidated
- * by calling this function.
- * This function may be called multiple times without generating an
- * error condition. However, this function must not be called during
- * a test run (checked by assertion)
.
- * @see CU_initialize_registry
- * @see CU_get_registry
- * @see CU_set_registry
- */
void CU_cleanup_registry(void)
{
assert(CU_FALSE == CU_is_test_running());
@@ -150,34 +126,12 @@
}
/*------------------------------------------------------------------------*/
-/** Retrieve a pointer to the current test registry.
- * Returns NULL if the registry has not been initialized using
- * CU_initialize_registry(). Directly accessing the registry
- * should not be necessary for most users. This function is
- * provided primarily for internal and testing purposes.
- * @return A pointer to the current registry (NULL if uninitialized).
- * @see CU_initialize_registry
- * @see CU_set_registry
- */
CU_pTestRegistry CU_get_registry(void)
{
return f_pTestRegistry;
}
/*------------------------------------------------------------------------*/
-/** Set the registry to an existing CU_pTestRegistry instance.
- * A pointer to the original registry is returned. Note that the
- * original registry is not freed, and it becomes the caller's
- * responsibility to do so. Directly accessing the registry
- * should not be necessary for most users. This function is
- * provided primarily for internal and testing purposes.
- * This function must not be called during a test run (checked
- * by assertion)
.
- * @return A pointer to the original registry that was replaced.
- * @see CU_initialize_registry
- * @see CU_cleanup_registry
- * @see CU_get_registry
- */
CU_pTestRegistry CU_set_registry(CU_pTestRegistry pRegistry)
{
CU_pTestRegistry pOldRegistry = f_pTestRegistry;
@@ -190,27 +144,6 @@
}
/*------------------------------------------------------------------------*/
-/** Create a new test suite and add it to the test registry.
- * This function creates a new test suite having the specified
- * name and initialization/cleanup functions and adds it to the
- * test registry. It returns a pointer to the newly-created suite,
- * which will be NULL if there was a problem with the suite creation
- * or addition.
- * CU_add_suite() sets the following error codes:
- * -CUE_NOREGISTRY if the registry hasn't been initialized.
- * -CUE_NO_SUITENAME if strName is NULL.
- * -CUE_DUP_SUITE if a suite having strName is already registered.
- * -CUE_NOMEMORY if a memory allocation failed.
- * NOTE - the CU_pSuite pointer returned should NOT BE FREED BY
- * THE USER. The suite is freed by the CUnit system when
- * CU_cleanup_registry() is called.
- * This function must not be called during a test run (checked
- * by assertion)
.
- * @param strName Name for the new test suite (unique, non-NULL).
- * @param pInit Initialization function to call before running suite.
- * @param pClean Cleanup function to call after running suite.
- * @return A pointer to the newly-created suite (NULL if creation failed)
- */
CU_pSuite CU_add_suite(const char* strName, CU_InitializeFunc pInit, CU_CleanupFunc pClean)
{
CU_pSuite pRetValue = NULL;
@@ -224,15 +157,15 @@
else if (NULL == strName) {
error = CUE_NO_SUITENAME;
}
- else if (CU_TRUE == suite_exists(f_pTestRegistry, strName)) {
- error = CUE_DUP_SUITE;
- }
else {
pRetValue = create_suite(strName, pInit, pClean);
if (NULL == pRetValue) {
error = CUE_NOMEMORY;
}
else {
+ if (CU_TRUE == suite_exists(f_pTestRegistry, strName)) {
+ error = CUE_DUP_SUITE;
+ }
insert_suite(f_pTestRegistry, pRetValue);
}
}
@@ -242,26 +175,170 @@
}
/*------------------------------------------------------------------------*/
-/** Create a new test case and add it to a test suite.
- * This function creates a new test having the specified name and
- * function, and adds it to the specified suite. At present, there is
- * no mechanism for creating a test case independent of a suite, although
- * this function does return a pointer to the newly-created test.
- * CU_add_test() sets the following error codes:
- * -CUE_NOSUITE if pSuite is NULL.
- * -CUE_NO_TESTNAME if strName is NULL.
- * -CUE_DUP_TEST if a test having strName is already registered to pSuite.
- * -CUE_NOMEMORY if a memory allocation failed.
- * NOTE - the CU_pTest pointer returned should NOT BE FREED BY
- * THE USER. The test is freed by the CUnit system when
- * CU_cleanup_registry() is called.
- * This function must not be called during a test run (checked
- * by assertion)
.
- * @param pSuite Test suite to which to add new test.
- * @param strName Name for the new test case (unique to pSuite, non-NULL).
- * @param pTest Function to call when running the test.
- * @return A pointer to the newly-created test (NULL if creation failed)
- */
+CU_ErrorCode CU_set_suite_active(CU_pSuite pSuite, CU_BOOL fNewActive)
+{
+ CU_ErrorCode result = CUE_SUCCESS;
+
+ if (NULL == pSuite) {
+ result = CUE_NOSUITE;
+ }
+ else {
+ pSuite->fActive = fNewActive;
+ }
+
+ CU_set_error(result);
+ return result;
+}
+
+/*------------------------------------------------------------------------*/
+CU_ErrorCode CU_set_suite_name(CU_pSuite pSuite, const char *strNewName)
+{
+ CU_ErrorCode result = CUE_SUCCESS;
+
+ if (NULL == pSuite) {
+ result = CUE_NOSUITE;
+ }
+ else if (NULL == strNewName) {
+ result = CUE_NO_SUITENAME;
+ }
+ else {
+ CU_FREE(pSuite->pName);
+ pSuite->pName = (char *)CU_MALLOC(strlen(strNewName)+1);
+ strcpy(pSuite->pName, strNewName);
+ }
+
+ CU_set_error(result);
+ return result;
+}
+
+/*------------------------------------------------------------------------*/
+CU_ErrorCode CU_set_suite_initfunc(CU_pSuite pSuite, CU_InitializeFunc pNewInit)
+{
+ CU_ErrorCode result = CUE_SUCCESS;
+
+ if (NULL == pSuite) {
+ result = CUE_NOSUITE;
+ }
+ else {
+ pSuite->pInitializeFunc = pNewInit;
+ }
+
+ CU_set_error(result);
+ return result;
+}
+
+/*------------------------------------------------------------------------*/
+CU_ErrorCode CU_set_suite_cleanupfunc(CU_pSuite pSuite, CU_CleanupFunc pNewClean)
+{
+ CU_ErrorCode result = CUE_SUCCESS;
+
+ if (NULL == pSuite) {
+ result = CUE_NOSUITE;
+ }
+ else {
+ pSuite->pCleanupFunc = pNewClean;
+ }
+
+ CU_set_error(result);
+ return result;
+}
+
+/*------------------------------------------------------------------------*/
+CU_pSuite CU_get_suite(const char *strName)
+{
+ CU_pSuite result = NULL;
+ CU_ErrorCode error = CUE_SUCCESS;
+
+ if (NULL == f_pTestRegistry) {
+ error = CUE_NOREGISTRY;
+ }
+ else if (NULL == strName) {
+ error = CUE_NO_SUITENAME;
+ }
+ else {
+ result = CU_get_suite_by_name(strName, f_pTestRegistry);
+ }
+
+ CU_set_error(error);
+ return result;
+}
+
+/*------------------------------------------------------------------------*/
+CU_pSuite CU_get_suite_at_pos(unsigned int pos)
+{
+ CU_pSuite result = NULL;
+ CU_ErrorCode error = CUE_SUCCESS;
+
+ if (NULL == f_pTestRegistry) {
+ error = CUE_NOREGISTRY;
+ }
+ else {
+ result = CU_get_suite_by_index(pos, f_pTestRegistry);
+ }
+
+ CU_set_error(error);
+ return result;
+}
+
+/*------------------------------------------------------------------------*/
+unsigned int CU_get_suite_pos(CU_pSuite pSuite)
+{
+ unsigned int result = 0;
+ CU_ErrorCode error = CUE_SUCCESS;
+ CU_pSuite pCurrentSuite = NULL;
+
+ if (NULL == f_pTestRegistry) {
+ error = CUE_NOREGISTRY;
+ }
+ else if (NULL == pSuite) {
+ error = CUE_NOSUITE;
+ }
+ else {
+ pCurrentSuite = f_pTestRegistry->pSuite;
+ result = 1;
+ while ((NULL != pCurrentSuite) && (pCurrentSuite != pSuite)) {
+ ++result;
+ pCurrentSuite = pCurrentSuite->pNext;
+ }
+ if (pCurrentSuite == NULL) {
+ result = 0;
+ }
+ }
+
+ CU_set_error(error);
+ return result;
+}
+
+/*------------------------------------------------------------------------*/
+unsigned int CU_get_suite_pos_by_name(const char *strName)
+{
+ unsigned int result = 0;
+ CU_ErrorCode error = CUE_SUCCESS;
+ CU_pSuite pCurrentSuite = NULL;
+
+ if (NULL == f_pTestRegistry) {
+ error = CUE_NOREGISTRY;
+ }
+ else if (NULL == strName) {
+ error = CUE_NO_SUITENAME;
+ }
+ else {
+ pCurrentSuite = f_pTestRegistry->pSuite;
+ result = 1;
+ while ((NULL != pCurrentSuite) && (0 != strcmp(pCurrentSuite->pName, strName))) {
+ ++result;
+ pCurrentSuite = pCurrentSuite->pNext;
+ }
+ if (pCurrentSuite == NULL) {
+ result = 0;
+ }
+ }
+
+ CU_set_error(error);
+ return result;
+}
+
+/*------------------------------------------------------------------------*/
CU_pTest CU_add_test(CU_pSuite pSuite, const char* strName, CU_TestFunc pTestFunc)
{
CU_pTest pRetValue = NULL;
@@ -281,9 +358,6 @@
else if(NULL == pTestFunc) {
error = CUE_NOTEST;
}
- else if (CU_TRUE == test_exists(pSuite, strName)) {
- error = CUE_DUP_TEST;
- }
else {
pRetValue = create_test(strName, pTestFunc);
if (NULL == pRetValue) {
@@ -291,6 +365,9 @@
}
else {
f_pTestRegistry->uiNumberOfTests++;
+ if (CU_TRUE == test_exists(pSuite, strName)) {
+ error = CUE_DUP_TEST;
+ }
insert_test(pSuite, pRetValue);
}
}
@@ -299,6 +376,166 @@
return pRetValue;
}
+/*------------------------------------------------------------------------*/
+CU_ErrorCode CU_set_test_active(CU_pTest pTest, CU_BOOL fNewActive)
+{
+ CU_ErrorCode result = CUE_SUCCESS;
+
+ if (NULL == pTest) {
+ result = CUE_NOTEST;
+ }
+ else {
+ pTest->fActive = fNewActive;
+ }
+
+ CU_set_error(result);
+ return result;
+}
+
+/*------------------------------------------------------------------------*/
+CU_ErrorCode CU_set_test_name(CU_pTest pTest, const char *strNewName)
+{
+ CU_ErrorCode result = CUE_SUCCESS;
+
+ if (NULL == pTest) {
+ result = CUE_NOTEST;
+ }
+ else if (NULL == strNewName) {
+ result = CUE_NO_TESTNAME;
+ }
+ else {
+ CU_FREE(pTest->pName);
+ pTest->pName = (char *)CU_MALLOC(strlen(strNewName)+1);
+ strcpy(pTest->pName, strNewName);
+ }
+
+ CU_set_error(result);
+ return result;
+}
+
+/*------------------------------------------------------------------------*/
+CU_ErrorCode CU_set_test_func(CU_pTest pTest, CU_TestFunc pNewFunc)
+{
+ CU_ErrorCode result = CUE_SUCCESS;
+
+ if ((NULL == pTest) || (NULL == pNewFunc)) {
+ result = CUE_NOTEST;
+ }
+ else {
+ pTest->pTestFunc = pNewFunc;
+ }
+
+ CU_set_error(result);
+ return result;
+}
+
+/*------------------------------------------------------------------------*/
+CU_pTest CU_get_test(CU_pSuite pSuite, const char *strName)
+{
+ CU_pTest result = NULL;
+ CU_ErrorCode error = CUE_SUCCESS;
+
+ if (NULL == f_pTestRegistry) {
+ error = CUE_NOREGISTRY;
+ }
+ else if (NULL == pSuite) {
+ error = CUE_NOSUITE;
+ }
+ else if (NULL == strName) {
+ error = CUE_NO_SUITENAME;
+ }
+ else {
+ result = CU_get_test_by_name(strName, pSuite);
+ }
+
+ CU_set_error(error);
+ return result;
+}
+
+/*------------------------------------------------------------------------*/
+CU_pTest CU_get_test_at_pos(CU_pSuite pSuite, unsigned int pos)
+{
+ CU_pTest result = NULL;
+ CU_ErrorCode error = CUE_SUCCESS;
+
+ if (NULL == f_pTestRegistry) {
+ error = CUE_NOREGISTRY;
+ }
+ else if (NULL == pSuite) {
+ error = CUE_NOSUITE;
+ }
+ else {
+ result = CU_get_test_by_index(pos, pSuite);
+ }
+
+ CU_set_error(error);
+ return result;
+}
+
+/*------------------------------------------------------------------------*/
+unsigned int CU_get_test_pos(CU_pSuite pSuite, CU_pTest pTest)
+{
+ unsigned int result = 0;
+ CU_ErrorCode error = CUE_SUCCESS;
+ CU_pTest pCurrentTest = NULL;
+
+ if (NULL == f_pTestRegistry) {
+ error = CUE_NOREGISTRY;
+ }
+ else if (NULL == pSuite) {
+ error = CUE_NOSUITE;
+ }
+ else if (NULL == pTest) {
+ error = CUE_NOTEST;
+ }
+ else {
+ pCurrentTest = pSuite->pTest;
+ result = 1;
+ while ((NULL != pCurrentTest) && (pCurrentTest != pTest)) {
+ ++result;
+ pCurrentTest = pCurrentTest->pNext;
+ }
+ if (pCurrentTest == NULL) {
+ result = 0;
+ }
+ }
+
+ CU_set_error(error);
+ return result;
+}
+
+/*------------------------------------------------------------------------*/
+unsigned int CU_get_test_pos_by_name(CU_pSuite pSuite, const char *strName)
+{
+ unsigned int result = 0;
+ CU_ErrorCode error = CUE_SUCCESS;
+ CU_pTest pCurrentTest = NULL;
+
+ if (NULL == f_pTestRegistry) {
+ error = CUE_NOREGISTRY;
+ }
+ else if (NULL == pSuite) {
+ error = CUE_NOSUITE;
+ }
+ else if (NULL == strName) {
+ error = CUE_NO_TESTNAME;
+ }
+ else {
+ pCurrentTest = pSuite->pTest;
+ result = 1;
+ while ((NULL != pCurrentTest) && (0 != strcmp(pCurrentTest->pName, strName))) {
+ ++result;
+ pCurrentTest = pCurrentTest->pNext;
+ }
+ if (pCurrentTest == NULL) {
+ result = 0;
+ }
+ }
+
+ CU_set_error(error);
+ return result;
+}
+
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
/* This section is based conceptually on code
* Copyright (C) 2004 Aurema Pty Ltd.
@@ -322,17 +559,6 @@
* int test_suite_register(test_suite_t *ts)
*/
/*------------------------------------------------------------------------*/
-/** Registers multiple suite arrays in CU_SuiteInfo format.
- * The function accepts a variable number of suite arrays to
- * be registered. The number of arrays is indicated by
- * the value of the 1st argument, suite_count. Each suite
- * in each array is registered with the CUnit test registry,
- * along with all of the associated tests.
- * @param suite_count The number of CU_SuiteInfo* arguments to follow.
- * @param ... suite_count number of CU_SuiteInfo* arguments. NULLs are ignored.
- * @return A CU_ErrorCode indicating the error status.
- * @see CU_register_suites()
- */
CU_ErrorCode CU_register_nsuites(int suite_count, ...)
{
CU_SuiteInfo *pSuiteItem = NULL;
@@ -365,24 +591,18 @@
}
/*------------------------------------------------------------------------*/
-/** Registers the suites in a single CU_SuiteInfo array..
- * Multiple arrays can be registered using CU_register_nsuites().
- * @param suite_info NULL-terminated array of CU_SuiteInfo
- * items to register.
- * @return A CU_ErrorCode indicating the error status.
- * @see CU_register_suites()
- */
CU_ErrorCode CU_register_suites(CU_SuiteInfo suite_info[])
{
return CU_register_nsuites(1, suite_info);
}
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
-/*
+/*=================================================================
* Private static function definitions
- */
+ *=================================================================*/
/*------------------------------------------------------------------------*/
-/** Internal function to clean up the specified test registry.
+/**
+ * Internal function to clean up the specified test registry.
* cleanup_suite() will be called for each registered suite to perform
* cleanup of the associated test cases. Then, the suite's memory will
* be freed. Note that any pointers to tests or suites in pRegistry
@@ -390,6 +610,7 @@
* can occur if this function is called during a test run involving pRegistry.
* Note that memory held for data members in the registry (e.g. pName) and
* the registry itself are not freed by this function.
+ *
* @see cleanup_suite()
* @see cleanup_test()
* @param pRegistry CU_pTestRegistry to clean up (non-NULL).
@@ -415,14 +636,16 @@
}
/*------------------------------------------------------------------------*/
-/** Internal function to create a new test suite having the specified parameters.
- * This function creates a new test suite having the specified
- * name and initialization/cleanup functions. The strName cannot
- * be NULL (checked by assertion), but either or both function
- * pointers can be. A pointer to the newly-created suite is returned,
- * or NULL if there was an error allocating memory for the new suite.
- * It is the responsibility of the caller to destroy the returned
- * suite (use cleanup_suite() before freeing the returned pointer).
+/**
+ * Internal function to create a new test suite having the specified parameters.
+ * This function creates a new test suite having the specified name and
+ * initialization/cleanup functions. The new suite is active for execution during
+ * test runs. The strName cannot be NULL (checked by assertion), but either or
+ * both function pointers can be. A pointer to the newly-created suite is returned,
+ * or NULL if there was an error allocating memory for the new suite. It is the
+ * responsibility of the caller to destroy the returned suite (use cleanup_suite()
+ * before freeing the returned pointer).
+ *
* @param strName Name for the new test suite (non-NULL).
* @param pInit Initialization function to call before running suite.
* @param pClean Cleanup function to call after running suite.
@@ -438,6 +661,7 @@
pRetValue->pName = (char *)CU_MALLOC(strlen(strName)+1);
if (NULL != pRetValue->pName) {
strcpy(pRetValue->pName, strName);
+ pRetValue->fActive = CU_TRUE;
pRetValue->pInitializeFunc = pInit;
pRetValue->pCleanupFunc = pClean;
pRetValue->pTest = NULL;
@@ -455,15 +679,15 @@
}
/*------------------------------------------------------------------------*/
-/** Internal function to clean up the specified test suite.
- * Each test case registered with pSuite will be freed.
- * Allocated memory held by the suite (i.e. the name)
- * will also be deallocated.
- * Severe problems can occur if this function is called
- * during a test run involving pSuite.
+/**
+ * Internal function to clean up the specified test suite.
+ * Each test case registered with pSuite will be freed. Allocated memory held
+ * by the suite (i.e. the name) will also be deallocated. Severe problems can
+ * occur if this function is called during a test run involving pSuite.
+ *
+ * @param pSuite CU_pSuite to clean up (non-NULL).
* @see cleanup_test_registry()
* @see cleanup_test()
- * @param pSuite CU_pSuite to clean up (non-NULL).
*/
static void cleanup_suite(CU_pSuite pSuite)
{
@@ -491,13 +715,13 @@
}
/*------------------------------------------------------------------------*/
-/** Internal function to insert a suite into a registry.
- * The suite name is assumed to be unique. Internally, the list
- * of suites is a double-linked list, which this function manages.
- * Insertion of duplicate (or NULL) pSuites is not allowed, both
- * of which are checked by assertion.
- * Severe problems can occur if this function is called during a
- * test run involving pRegistry.
+/**
+ * Internal function to insert a suite into a registry.
+ * The suite name is assumed to be unique. Internally, the list of suites
+ * is a double-linked list, which this function manages. Insertion of NULL
+ * pSuites is not allowed (checked by assertion). Severe problems can occur
+ * if this function is called during a test run involving pRegistry.
+ *
* @param pRegistry CU_pTestRegistry to insert into (non-NULL).
* @param pSuite CU_pSuite to insert (non-NULL).
* @see insert_test()
@@ -534,13 +758,15 @@
}
/*------------------------------------------------------------------------*/
-/** Internal function to create a new test case having the specified parameters.
- * This function creates a new test having the specified name and
- * test function. The strName cannot be NULL (checked by assertion),
- * but the function pointer may be. A pointer to the newly-created
- * test is returned, or NULL if there was an error allocating memory for
- * the new test. It is the responsibility of the caller to destroy the
- * returned test (use cleanup_test() before freeing the returned pointer).
+/**
+ * Internal function to create a new test case having the specified parameters.
+ * This function creates a new test having the specified name and test function.
+ * The strName cannot be NULL (checked by assertion), but the function pointer
+ * may be. A pointer to the newly-created test is returned, or NULL if there
+ * was an error allocating memory for the new test. It is the responsibility
+ * of the caller to destroy the returned test (use cleanup_test() before freeing
+ * the returned pointer).
+ *
* @param strName Name for the new test.
* @param pTestFunc Test function to call when running this test.
* @return A pointer to the newly-created test (NULL if creation failed)
@@ -555,6 +781,7 @@
pRetValue->pName = (char *)CU_MALLOC(strlen(strName)+1);
if (NULL != pRetValue->pName) {
strcpy(pRetValue->pName, strName);
+ pRetValue->fActive = CU_TRUE;
pRetValue->pTestFunc = pTestFunc;
pRetValue->pJumpBuf = NULL;
pRetValue->pNext = NULL;
@@ -570,13 +797,14 @@
}
/*------------------------------------------------------------------------*/
-/** Internal function to clean up the specified test.
- * All memory associated with the test will be freed.
- * Severe problems can occur if this function is called
- * during a test run involving pTest.
+/**
+ * Internal function to clean up the specified test.
+ * All memory associated with the test will be freed. Severe problems can
+ * occur if this function is called during a test run involving pTest.
+ *
+ * @param pTest CU_pTest to clean up (non-NULL).
* @see cleanup_test_registry()
* @see cleanup_suite()
- * @param pTest CU_pTest to clean up (non-NULL).
*/
static void cleanup_test(CU_pTest pTest)
{
@@ -590,15 +818,15 @@
}
/*------------------------------------------------------------------------*/
-/** Internal function to insert a test into a suite.
- * The test name is assumed to be unique. Internally, the list
- * of tests in a suite is a double-linked list, which this
- * function manages. Insertion of duplicate tests (or NULL
- * pTest) is not allowed (checked by assertion). Further,
- * pTest must be an independent test (i.e. both pTest->pNext
- * and pTest->pPrev == NULL), which is also checked by assertion.
- * Severe problems can occur if this function is called during
- * a test run involving pSuite.
+/**
+ * Internal function to insert a test into a suite.
+ * The test name is assumed to be unique. Internally, the list of tests in
+ * a suite is a double-linked list, which this function manages. Neither
+ * pSuite nor pTest may be NULL (checked by assertion). Further, pTest must
+ * be an independent test (i.e. both pTest->pNext and pTest->pPrev == NULL),
+ * which is also checked by assertion. Severe problems can occur if this
+ * function is called during a test run involving pSuite.
+ *
* @param pSuite CU_pSuite to insert into (non-NULL).
* @param pTest CU_pTest to insert (non-NULL).
* @see insert_suite()
@@ -634,8 +862,10 @@
}
/*------------------------------------------------------------------------*/
-/** Internal function to check whether a suite having a specified
+/**
+ * Internal function to check whether a suite having a specified
* name already exists.
+ *
* @param pRegistry CU_pTestRegistry to check (non-NULL).
* @param szSuiteName Suite name to check (non-NULL).
* @return CU_TRUE if suite exists in the registry, CU_FALSE otherwise.
@@ -659,8 +889,10 @@
}
/*------------------------------------------------------------------------*/
-/** Internal function to check whether a test having a specified
+/**
+ * Internal function to check whether a test having a specified
* name is already registered in a given suite.
+ *
* @param pSuite CU_pSuite to check (non-NULL).
* @param szTestName Test case name to check (non-NULL).
* @return CU_TRUE if test exists in the suite, CU_FALSE otherwise.
@@ -683,14 +915,9 @@
return CU_FALSE;
}
-/*------------------------------------------------------------------------*/
-/** Create and initialize a new test registry.
- * Returns a pointer to a new, initialized registry (NULL if
- * memory could not be allocated). It is the caller's
- * responsibility to destroy and free the new registry
- * (unless it is made the active test registry using
- * CU_set_registry().
- */
+/*=================================================================
+ * Public but primarily internal function definitions
+ *=================================================================*/
CU_pTestRegistry CU_create_new_registry(void)
{
CU_pTestRegistry pRegistry = (CU_pTestRegistry)CU_MALLOC(sizeof(CU_TestRegistry));
@@ -704,18 +931,6 @@
}
/*------------------------------------------------------------------------*/
-/** Destroy and free all memory for an existing test registry.
- * The active test registry is destroyed by the CUnit system in
- * CU_cleanup_registry(), so only call this function on registries
- * created or held independently of the internal CUnit system.
- *
- * Once a registry is made the active test registry using
- * CU_set_registry(), its destruction will be handled by the
- * framework. ppRegistry may not be NULL (checked by assertion),
- * but *ppRegistry can be NULL (in which case the function has no
- * effect). Note that *ppRegistry will be set to NULL on return.
- * @param ppRegistry Address of a pointer to the registry to destroy (non-NULL).
- */
void CU_destroy_existing_registry(CU_pTestRegistry* ppRegistry)
{
assert(NULL != ppRegistry);
@@ -730,14 +945,6 @@
}
/*------------------------------------------------------------------------*/
-/** Retrieve a pointer to the suite having the specified name.
- * Scans the pRegistry and returns a pointer to the first
- * suite located having the specified name.
- * @param szSuiteName The name of the suite to locate.
- * @param pRegistry The registry to scan.
- * @return Pointer to the first suite having the specified name,
- * NULL if not found.
- */
CU_pSuite CU_get_suite_by_name(const char* szSuiteName, CU_pTestRegistry pRegistry)
{
CU_pSuite pSuite = NULL;
@@ -759,14 +966,24 @@
}
/*------------------------------------------------------------------------*/
-/** Retrieve a pointer to the test case having the specified name.
- * Scans the pSuite and returns a pointer to the first
- * test case located having the specified name.
- * @param szTestName The name of the test case to locate.
- * @param pSuite The suite to scan.
- * @return Pointer to the first test case having the specified name,
- * NULL if not found.
- */
+CU_pSuite CU_get_suite_by_index(unsigned int index, CU_pTestRegistry pRegistry)
+{
+ CU_pSuite result = NULL;
+ unsigned int i;
+
+ assert(NULL != pRegistry);
+
+ if ((index > 0) && (index <= f_pTestRegistry->uiNumberOfSuites)) {
+ result = f_pTestRegistry->pSuite;
+ for (i=1 ; ipNext;
+ }
+ }
+
+ return result;
+}
+
+/*------------------------------------------------------------------------*/
CU_pTest CU_get_test_by_name(const char* szTestName, CU_pSuite pSuite)
{
CU_pTest pTest = NULL;
@@ -787,6 +1004,23 @@
return pTest;
}
+/*------------------------------------------------------------------------*/
+CU_pTest CU_get_test_by_index(unsigned int index, CU_pSuite pSuite)
+{
+ CU_pTest result = NULL;
+ unsigned int i;
+
+ assert(NULL != pSuite);
+
+ if ((index > 0) && (index <= pSuite->uiNumberOfTests)) {
+ result = pSuite->pTest;
+ for (i=1 ; ipNext;
+ }
+ }
+
+ return result;
+}
/** @} */
/*------------------------------------------------------------------------*/
@@ -795,13 +1029,13 @@
#include "test_cunit.h"
static int sfunc1(void)
-{
- return 0;
-}
+{ return 0; }
static void test1(void)
-{
-}
+{}
+
+static void test2(void)
+{}
/*--------------------------------------------------*/
static void test_CU_initialize_registry(void)
@@ -860,6 +1094,10 @@
}
/*--------------------------------------------------*/
+/* test CU_add_suite()
+ * CU_get_suite_by_name()
+ * CU_get_suite_by_index()
+ */
static void test_CU_add_suite(void)
{
CU_pSuite pSuite = NULL;
@@ -885,7 +1123,7 @@
TEST(0 == pReg->uiNumberOfSuites);
TEST(0 == pReg->uiNumberOfTests);
- /* error condition - duplicate name */
+ /* warning condition - duplicate name */
CU_initialize_registry();
pReg = CU_get_registry();
@@ -895,12 +1133,28 @@
TEST(1 == pReg->uiNumberOfSuites);
TEST(0 == pReg->uiNumberOfTests);
- pSuite = CU_add_suite("suite1", NULL, NULL);
+ pSuite2 = CU_add_suite("suite1", NULL, NULL);
TEST(CUE_DUP_SUITE == CU_get_error());
- TEST(NULL == pSuite);
- TEST(1 == pReg->uiNumberOfSuites);
+ TEST(NULL != pSuite2);
+ TEST(2 == pReg->uiNumberOfSuites);
TEST(0 == pReg->uiNumberOfTests);
+ TEST(!strcmp("suite1", pSuite->pName));
+ TEST(pSuite->fActive == CU_TRUE); /* suite active on creation */
+ TEST(pSuite->pTest == NULL); /* no tests added yet */
+ TEST(pSuite->uiNumberOfTests == 0); /* no tests added yet */
+ TEST(pSuite->pInitializeFunc == NULL); /* no init function */
+ TEST(pSuite->pCleanupFunc == NULL); /* no cleanup function */
+ TEST(pSuite->pNext == pSuite2); /* now have another suite */
+
+ TEST(!strcmp("suite1", pSuite2->pName));
+ TEST(pSuite2->fActive == CU_TRUE); /* suite active on creation */
+ TEST(pSuite2->pTest == NULL); /* no tests added yet */
+ TEST(pSuite2->uiNumberOfTests == 0); /* no tests added yet */
+ TEST(pSuite2->pInitializeFunc == NULL); /* no init function */
+ TEST(pSuite2->pCleanupFunc == NULL); /* no cleanup function */
+ TEST(pSuite2->pNext == NULL); /* end of the list */
+
/* error condition - memory allocation failure */
CU_initialize_registry();
pReg = CU_get_registry();
@@ -917,15 +1171,22 @@
CU_initialize_registry();
pReg = CU_get_registry();
+ TEST(CU_get_suite_by_index(0, pReg) == NULL);
+ TEST(CU_get_suite_by_index(1, pReg) == NULL);
+
pSuite = CU_add_suite("suite1", NULL, NULL);
TEST(CUE_SUCCESS == CU_get_error());
TEST(NULL != pSuite);
TEST(1 == pReg->uiNumberOfSuites);
TEST(0 == pReg->uiNumberOfTests);
TEST(CU_get_suite_by_name("suite1", pReg) == pSuite);
+ TEST(CU_get_suite_by_index(0, pReg) == NULL);
+ TEST(CU_get_suite_by_index(1, pReg) == pSuite);
+ TEST(CU_get_suite_by_index(2, pReg) == NULL);
TEST(pReg->pSuite == pSuite);
TEST(!strcmp("suite1", pSuite->pName));
+ TEST(pSuite->fActive == CU_TRUE); /* suite active on creation */
TEST(pSuite->pTest == NULL); /* no tests added yet */
TEST(pSuite->uiNumberOfTests == 0); /* no tests added yet */
TEST(pSuite->pInitializeFunc == NULL); /* no init function */
@@ -934,74 +1195,341 @@
pSuite2 = CU_add_suite("suite2", sfunc1, NULL);
TEST(CUE_SUCCESS == CU_get_error());
- TEST(NULL != pSuite2);
- TEST(2 == pReg->uiNumberOfSuites);
- TEST(0 == pReg->uiNumberOfTests);
- TEST(CU_get_suite_by_name("suite2", pReg) == pSuite2);
+ TEST(NULL != pSuite2);
+ TEST(2 == pReg->uiNumberOfSuites);
+ TEST(0 == pReg->uiNumberOfTests);
+ TEST(CU_get_suite_by_name("suite2", pReg) == pSuite2);
+ TEST(CU_get_suite_by_index(0, pReg) == NULL);
+ TEST(CU_get_suite_by_index(1, pReg) == pSuite);
+ TEST(CU_get_suite_by_index(2, pReg) == pSuite2);
+ TEST(CU_get_suite_by_index(3, pReg) == NULL);
+
+ pSuite3 = CU_add_suite("suite3", NULL, sfunc1);
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(NULL != pSuite3);
+ TEST(3 == pReg->uiNumberOfSuites);
+ TEST(0 == pReg->uiNumberOfTests);
+ TEST(CU_get_suite_by_name("suite3", pReg) == pSuite3);
+ TEST(CU_get_suite_by_index(0, pReg) == NULL);
+ TEST(CU_get_suite_by_index(1, pReg) == pSuite);
+ TEST(CU_get_suite_by_index(2, pReg) == pSuite2);
+ TEST(CU_get_suite_by_index(3, pReg) == pSuite3);
+ TEST(CU_get_suite_by_index(4, pReg) == NULL);
+
+ pSuite4 = CU_add_suite("suite4", sfunc1, sfunc1);
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(NULL != pSuite4);
+ TEST(4 == pReg->uiNumberOfSuites);
+ TEST(0 == pReg->uiNumberOfTests);
+ TEST(CU_get_suite_by_name("suite4", pReg) == pSuite4);
+ TEST(CU_get_suite_by_index(0, pReg) == NULL);
+ TEST(CU_get_suite_by_index(1, pReg) == pSuite);
+ TEST(CU_get_suite_by_index(2, pReg) == pSuite2);
+ TEST(CU_get_suite_by_index(3, pReg) == pSuite3);
+ TEST(CU_get_suite_by_index(4, pReg) == pSuite4);
+ TEST(CU_get_suite_by_index(5, pReg) == NULL);
+
+ /* test registry suite structures */
+ TEST(pReg->pSuite == pSuite);
+
+ TEST(!strcmp("suite1", pSuite->pName));
+ TEST(pSuite->fActive == CU_TRUE); /* suite active on creation */
+ TEST(pSuite->pTest == NULL); /* no tests added yet */
+ TEST(pSuite->uiNumberOfTests == 0); /* no tests added yet */
+ TEST(pSuite->pInitializeFunc == NULL); /* no init function */
+ TEST(pSuite->pCleanupFunc == NULL); /* no cleanup function */
+ TEST(pSuite->pNext == pSuite2); /* now have another suite */
+
+ TEST(!strcmp("suite2", pSuite2->pName));
+ TEST(pSuite2->fActive == CU_TRUE); /* suite active on creation */
+ TEST(pSuite2->pTest == NULL); /* no tests added yet */
+ TEST(pSuite2->uiNumberOfTests == 0); /* no tests added yet */
+ TEST(pSuite2->pInitializeFunc == sfunc1); /* no init function */
+ TEST(pSuite2->pCleanupFunc == NULL); /* no cleanup function */
+ TEST(pSuite2->pNext == pSuite3); /* next suite in list */
+
+ TEST(!strcmp("suite3", pSuite3->pName));
+ TEST(pSuite3->fActive == CU_TRUE); /* suite active on creation */
+ TEST(pSuite3->pTest == NULL); /* no tests added yet */
+ TEST(pSuite3->uiNumberOfTests == 0); /* no tests added yet */
+ TEST(pSuite3->pInitializeFunc == NULL); /* no init function */
+ TEST(pSuite3->pCleanupFunc == sfunc1); /* no cleanup function */
+ TEST(pSuite3->pNext == pSuite4); /* next suite in list */
+
+ TEST(!strcmp("suite4", pSuite4->pName));
+ TEST(pSuite4->fActive == CU_TRUE); /* suite active on creation */
+ TEST(pSuite4->pTest == NULL); /* no tests added yet */
+ TEST(pSuite4->uiNumberOfTests == 0); /* no tests added yet */
+ TEST(pSuite4->pInitializeFunc == sfunc1); /* no init function */
+ TEST(pSuite4->pCleanupFunc == sfunc1); /* no cleanup function */
+ TEST(pSuite4->pNext == NULL); /* end of suite list */
+
+ TEST(0 != test_cunit_get_n_memevents(pSuite));
+ TEST(0 != test_cunit_get_n_memevents(pSuite2));
+ TEST(0 != test_cunit_get_n_memevents(pSuite3));
+ TEST(0 != test_cunit_get_n_memevents(pSuite4));
+
+ TEST(test_cunit_get_n_allocations(pSuite) != test_cunit_get_n_deallocations(pSuite));
+ TEST(test_cunit_get_n_allocations(pSuite2) != test_cunit_get_n_deallocations(pSuite2));
+ TEST(test_cunit_get_n_allocations(pSuite3) != test_cunit_get_n_deallocations(pSuite3));
+ TEST(test_cunit_get_n_allocations(pSuite4) != test_cunit_get_n_deallocations(pSuite4));
+
+ /* clean up everything and confirm deallocation */
+ CU_cleanup_registry();
+
+ TEST(test_cunit_get_n_allocations(pSuite) == test_cunit_get_n_deallocations(pSuite));
+ TEST(test_cunit_get_n_allocations(pSuite2) == test_cunit_get_n_deallocations(pSuite2));
+ TEST(test_cunit_get_n_allocations(pSuite3) == test_cunit_get_n_deallocations(pSuite3));
+ TEST(test_cunit_get_n_allocations(pSuite4) == test_cunit_get_n_deallocations(pSuite4));
+}
+
+/*--------------------------------------------------*/
+/* test CU_set_suite_active()
+ * CU_set_suite_name()
+ * CU_set_suite_initfunc()
+ * CU_set_suite_cleanupfunc()
+ */
+static void test_CU_set_suite_attributes(void)
+{
+ CU_pSuite pSuite1 = NULL;
+ CU_pSuite pSuite2 = NULL;
+
+ /* initialize system */
+ CU_initialize_registry();
+
+ pSuite1 = CU_add_suite("suite1", NULL, NULL);
+ TEST_FATAL(NULL != pSuite1);
+ TEST_FATAL(NULL != CU_add_test(pSuite1, "test1", test1));
+ TEST_FATAL(NULL != CU_add_test(pSuite1, "test2", test1));
+
+ pSuite2 = CU_add_suite("suite2", sfunc1, NULL); /* add another suite */
+ TEST_FATAL(NULL != pSuite2);
+ TEST_FATAL(NULL != CU_add_test(pSuite2, "test1", test1));
+ TEST_FATAL(NULL != CU_add_test(pSuite2, "test2", test1));
+
+ /* test CU_set_suite_active() */
+ TEST(CUE_NOSUITE == CU_set_suite_active(NULL, CU_FALSE)); /* error - NULL suite */
+
+ TEST(pSuite2->fActive == CU_TRUE); /* suites active on creation */
+ TEST(pSuite1->fActive == CU_TRUE);
+
+ TEST(CUE_SUCCESS == CU_set_suite_active(pSuite1, CU_TRUE));
+ TEST(CUE_SUCCESS == CU_set_suite_active(pSuite2, CU_FALSE));
+ TEST(pSuite1->fActive == CU_TRUE);
+ TEST(pSuite2->fActive == CU_FALSE);
+
+ TEST(CUE_SUCCESS == CU_set_suite_active(pSuite1, CU_FALSE));
+ TEST(CUE_SUCCESS == CU_set_suite_active(pSuite2, CU_FALSE));
+ TEST(pSuite1->fActive == CU_FALSE);
+ TEST(pSuite2->fActive == CU_FALSE);
+
+ TEST(CUE_SUCCESS == CU_set_suite_active(pSuite1, CU_FALSE));
+ TEST(CUE_SUCCESS == CU_set_suite_active(pSuite2, CU_TRUE));
+ TEST(pSuite1->fActive == CU_FALSE);
+ TEST(pSuite2->fActive == CU_TRUE);
+
+ /* test CU_set_suite_name() */
+ TEST(CUE_NOSUITE == CU_set_suite_name(NULL, "null suite")); /* error - NULL suite */
+ TEST(CUE_NO_SUITENAME == CU_set_suite_name(pSuite1, NULL)); /* error - NULL name */
+
+ TEST(!strcmp(pSuite1->pName, "suite1"));
+ TEST(!strcmp(pSuite2->pName, "suite2"));
+ TEST(CUE_SUCCESS == CU_set_suite_name(pSuite1, "This is my new name."));
+ TEST(!strcmp(pSuite1->pName, "This is my new name."));
+ TEST(!strcmp(pSuite2->pName, "suite2"));
+
+ TEST(CUE_SUCCESS == CU_set_suite_name(pSuite2, "Never mind."));
+ TEST(!strcmp(pSuite1->pName, "This is my new name."));
+ TEST(!strcmp(pSuite2->pName, "Never mind."));
+
+ TEST(CUE_SUCCESS == CU_set_suite_name(pSuite1, "suite1"));
+ TEST(CUE_SUCCESS == CU_set_suite_name(pSuite2, "suite2"));
+ TEST(!strcmp(pSuite1->pName, "suite1"));
+ TEST(!strcmp(pSuite2->pName, "suite2"));
+
+ /* test CU_set_suite_initfunc() */
+ TEST(CUE_NOSUITE == CU_set_suite_initfunc(NULL, &sfunc1)); /* error - NULL suite */
+
+ TEST(pSuite1->pInitializeFunc == NULL);
+ TEST(pSuite2->pInitializeFunc == &sfunc1);
+ TEST(CUE_SUCCESS == CU_set_suite_initfunc(pSuite1, &sfunc1));
+ TEST(pSuite1->pInitializeFunc == &sfunc1);
+ TEST(pSuite2->pInitializeFunc == &sfunc1);
+
+ TEST(CUE_SUCCESS == CU_set_suite_initfunc(pSuite2, NULL));
+ TEST(pSuite1->pInitializeFunc == &sfunc1);
+ TEST(pSuite2->pInitializeFunc == NULL);
+
+ /* test CU_set_suite_cleanupfunc() */
+ TEST(CUE_NOSUITE == CU_set_suite_cleanupfunc(NULL, &sfunc1));
+
+ TEST(pSuite1->pCleanupFunc == NULL);
+ TEST(pSuite2->pCleanupFunc == NULL);
+ TEST(CUE_SUCCESS == CU_set_suite_cleanupfunc(pSuite1, &sfunc1));
+ TEST(pSuite1->pCleanupFunc == &sfunc1);
+ TEST(pSuite2->pCleanupFunc == NULL);
+
+ TEST(CUE_SUCCESS == CU_set_suite_cleanupfunc(pSuite2, &sfunc1));
+ TEST(pSuite1->pCleanupFunc == &sfunc1);
+ TEST(pSuite2->pCleanupFunc == &sfunc1);
+
+ /* clean up */
+ CU_cleanup_registry();
+}
+
+static void test_succeed(void) { CU_TEST(CU_TRUE); }
+static void test_fail(void) { CU_TEST(CU_FALSE); }
+static int suite_succeed(void) { return 0; }
+static int suite_fail(void) { return 1; }
+
+/*--------------------------------------------------*/
+/* test CU_get_suite()
+ * CU_get_suite_at_pos()
+ * CU_get_suite_pos()
+ * CU_get_suite_pos_by_name()
+ */
+static void test_get_suite_functions(void)
+{
+ CU_pSuite pSuite1 = NULL;
+ CU_pSuite pSuite2 = NULL;
+ CU_pSuite pSuite3 = NULL;
+ CU_pSuite pSuite4 = NULL;
+ CU_pSuite pSuite5 = NULL;
+ CU_pTest pTest1 = NULL;
+ CU_pTest pTest2 = NULL;
+ CU_pTest pTest3 = NULL;
+ CU_pTest pTest4 = NULL;
+ CU_pTest pTest5 = NULL;
+ CU_pTest pTest6 = NULL;
+ CU_pTest pTest7 = NULL;
+ CU_pTest pTest8 = NULL;
+ CU_pTest pTest9 = NULL;
+ CU_pTest pTest10 = NULL;
+
+ /* error condition - registry not initialized */
+ CU_cleanup_registry();
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(NULL == CU_get_suite("suite1"));
+ TEST(CUE_NOREGISTRY == CU_get_error());
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(NULL == CU_get_suite_at_pos(0));
+ TEST(CUE_NOREGISTRY == CU_get_error());
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(0 == CU_get_suite_pos(pSuite1));
+ TEST(CUE_NOREGISTRY == CU_get_error());
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(0 == CU_get_suite_pos_by_name("suite1"));
+ TEST(CUE_NOREGISTRY == CU_get_error());
+
+ /* register some suites and tests */
+ CU_initialize_registry();
+ pSuite1 = CU_add_suite("suite1", NULL, NULL);
+ pTest1 = CU_add_test(pSuite1, "test1", test_succeed);
+ pTest2 = CU_add_test(pSuite1, "test2", test_fail);
+ pTest3 = CU_add_test(pSuite1, "test1", test_succeed); /* duplicate test name */
+ pTest4 = CU_add_test(pSuite1, "test4", test_fail);
+ pTest5 = CU_add_test(pSuite1, "test1", test_succeed); /* duplicate test name */
+ pSuite2 = CU_add_suite("suite2", suite_fail, NULL);
+ pTest6 = CU_add_test(pSuite2, "test6", test_succeed);
+ pTest7 = CU_add_test(pSuite2, "test7", test_succeed);
+ pSuite3 = CU_add_suite("suite1", NULL, NULL); /* duplicate suite name */
+ pTest8 = CU_add_test(pSuite3, "test8", test_fail);
+ pTest9 = CU_add_test(pSuite3, "test9", test_succeed);
+ pSuite4 = CU_add_suite("suite4", NULL, suite_fail);
+ pTest10 = CU_add_test(pSuite4, "test10", test_succeed);
+
+ /* error condition - invalid parameters */
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(NULL == CU_get_suite(NULL));
+ TEST(CUE_NO_SUITENAME == CU_get_error());
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(0 == CU_get_suite_pos(NULL));
+ TEST(CUE_NOSUITE == CU_get_error());
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(0 == CU_get_suite_pos_by_name(NULL));
+ TEST(CUE_NO_SUITENAME == CU_get_error());
+
+ /* normal operation - CU_get_suite() */
+
+ TEST(NULL == CU_get_suite("")); /* invalid names */
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(NULL == CU_get_suite("bad name"));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(NULL == CU_get_suite("suite3"));
+ TEST(CUE_SUCCESS == CU_get_error());
+
+ TEST(pSuite1 == CU_get_suite("suite1")); /* valid names */
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pSuite2 == CU_get_suite("suite2"));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pSuite4 == CU_get_suite("suite4"));
+ TEST(CUE_SUCCESS == CU_get_error());
- pSuite3 = CU_add_suite("suite3", NULL, sfunc1);
+ /* normal operation - CU_get_suite_at_pos() */
+
+ TEST(NULL == CU_get_suite_at_pos(0)); /* invalid positions */
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(NULL == CU_get_suite_at_pos(5));
TEST(CUE_SUCCESS == CU_get_error());
- TEST(NULL != pSuite3);
- TEST(3 == pReg->uiNumberOfSuites);
- TEST(0 == pReg->uiNumberOfTests);
- TEST(CU_get_suite_by_name("suite3", pReg) == pSuite3);
- pSuite4 = CU_add_suite("suite4", sfunc1, sfunc1);
+ TEST(pSuite1 == CU_get_suite_at_pos(1)); /* valid positions */
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pSuite2 == CU_get_suite_at_pos(2));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pSuite3 == CU_get_suite_at_pos(3));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pSuite4 == CU_get_suite_at_pos(4));
TEST(CUE_SUCCESS == CU_get_error());
- TEST(NULL != pSuite4);
- TEST(4 == pReg->uiNumberOfSuites);
- TEST(0 == pReg->uiNumberOfTests);
- TEST(CU_get_suite_by_name("suite4", pReg) == pSuite4);
- TEST(pReg->pSuite == pSuite);
+ /* normal operation - CU_get_suite_pos() */
- TEST(!strcmp("suite1", pSuite->pName));
- TEST(pSuite->pTest == NULL); /* no tests added yet */
- TEST(pSuite->uiNumberOfTests == 0); /* no tests added yet */
- TEST(pSuite->pInitializeFunc == NULL); /* no init function */
- TEST(pSuite->pCleanupFunc == NULL); /* no cleanup function */
- TEST(pSuite->pNext == pSuite2); /* now have another suite */
+ pSuite5 = (CU_pSuite)malloc(sizeof(CU_Suite));
+ TEST_FATAL(NULL != pSuite5);
- TEST(!strcmp("suite2", pSuite2->pName));
- TEST(pSuite2->pTest == NULL); /* no tests added yet */
- TEST(pSuite2->uiNumberOfTests == 0); /* no tests added yet */
- TEST(pSuite2->pInitializeFunc == sfunc1); /* no init function */
- TEST(pSuite2->pCleanupFunc == NULL); /* no cleanup function */
- TEST(pSuite2->pNext == pSuite3); /* next suite in list */
+ TEST(0 == CU_get_suite_pos(pSuite5)); /* invalid suite */
+ TEST(CUE_SUCCESS == CU_get_error());
- TEST(!strcmp("suite3", pSuite3->pName));
- TEST(pSuite3->pTest == NULL); /* no tests added yet */
- TEST(pSuite3->uiNumberOfTests == 0); /* no tests added yet */
- TEST(pSuite3->pInitializeFunc == NULL); /* no init function */
- TEST(pSuite3->pCleanupFunc == sfunc1); /* no cleanup function */
- TEST(pSuite3->pNext == pSuite4); /* next suite in list */
+ TEST(1 == CU_get_suite_pos(pSuite1)); /* valid suites */
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(2 == CU_get_suite_pos(pSuite2));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(3 == CU_get_suite_pos(pSuite3));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(4 == CU_get_suite_pos(pSuite4));
+ TEST(CUE_SUCCESS == CU_get_error());
- TEST(!strcmp("suite4", pSuite4->pName));
- TEST(pSuite4->pTest == NULL); /* no tests added yet */
- TEST(pSuite4->uiNumberOfTests == 0); /* no tests added yet */
- TEST(pSuite4->pInitializeFunc == sfunc1); /* no init function */
- TEST(pSuite4->pCleanupFunc == sfunc1); /* no cleanup function */
- TEST(pSuite4->pNext == NULL); /* end of suite list */
+ free(pSuite5);
- TEST(0 != test_cunit_get_n_memevents(pSuite));
- TEST(0 != test_cunit_get_n_memevents(pSuite2));
- TEST(0 != test_cunit_get_n_memevents(pSuite3));
- TEST(0 != test_cunit_get_n_memevents(pSuite4));
+ /* normal operation - CU_get_suite_pos_by_name() */
- TEST(test_cunit_get_n_allocations(pSuite) != test_cunit_get_n_deallocations(pSuite));
- TEST(test_cunit_get_n_allocations(pSuite2) != test_cunit_get_n_deallocations(pSuite2));
- TEST(test_cunit_get_n_allocations(pSuite3) != test_cunit_get_n_deallocations(pSuite3));
- TEST(test_cunit_get_n_allocations(pSuite4) != test_cunit_get_n_deallocations(pSuite4));
+ TEST(0 == CU_get_suite_pos_by_name("")); /* invalid names */
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(0 == CU_get_suite_pos_by_name("suite3"));
+ TEST(CUE_SUCCESS == CU_get_error());
- CU_cleanup_registry();
+ TEST(1 == CU_get_suite_pos_by_name("suite1")); /* valid suites */
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(2 == CU_get_suite_pos_by_name("suite2"));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(4 == CU_get_suite_pos_by_name("suite4"));
+ TEST(CUE_SUCCESS == CU_get_error());
- TEST(test_cunit_get_n_allocations(pSuite) == test_cunit_get_n_deallocations(pSuite));
- TEST(test_cunit_get_n_allocations(pSuite2) == test_cunit_get_n_deallocations(pSuite2));
- TEST(test_cunit_get_n_allocations(pSuite3) == test_cunit_get_n_deallocations(pSuite3));
- TEST(test_cunit_get_n_allocations(pSuite4) == test_cunit_get_n_deallocations(pSuite4));
+ /* clean up */
+ CU_cleanup_registry();
}
/*--------------------------------------------------*/
+/* test CU_add_test()
+ * CU_get_test_by_name()
+ * CU_get_test_by_index()
+ */
static void test_CU_add_test(void)
{
CU_pSuite pSuite1 = NULL;
@@ -1045,7 +1573,7 @@
TEST(0 == pReg->uiNumberOfTests);
TEST(0 == pSuite1->uiNumberOfTests);
- /* error condition - duplicate name */
+ /* warning condition - duplicate name */
CU_initialize_registry();
pReg = CU_get_registry();
@@ -1057,13 +1585,34 @@
TEST(1 == pReg->uiNumberOfSuites);
TEST(1 == pReg->uiNumberOfTests);
TEST(1 == pSuite1->uiNumberOfTests);
+ TEST(CU_get_test_by_index(0, pSuite1) == NULL);
+ TEST(CU_get_test_by_index(1, pSuite1) == pTest1);
+ TEST(CU_get_test_by_index(2, pSuite1) == NULL);
pTest2 = CU_add_test(pSuite1, "test1", test1);
TEST(CUE_DUP_TEST == CU_get_error());
- TEST(NULL == pTest2);
+ TEST(NULL != pTest2);
TEST(1 == pReg->uiNumberOfSuites);
- TEST(1 == pReg->uiNumberOfTests);
- TEST(1 == pSuite1->uiNumberOfTests);
+ TEST(2 == pReg->uiNumberOfTests);
+ TEST(2 == pSuite1->uiNumberOfTests);
+
+ TEST(!strcmp("test1", pTest1->pName));
+ TEST(pTest1->fActive == CU_TRUE);
+ TEST(pTest1->pNext == pTest2);
+ TEST(pTest1->pJumpBuf == NULL);
+ TEST(pTest1->pTestFunc == test1);
+ TEST(CU_get_test_by_name("test1", pSuite1) == pTest1);
+ TEST(CU_get_test_by_index(0, pSuite1) == NULL);
+ TEST(CU_get_test_by_index(1, pSuite1) == pTest1);
+ TEST(CU_get_test_by_index(2, pSuite1) == pTest2);
+ TEST(CU_get_test_by_index(3, pSuite1) == NULL);
+
+ TEST(!strcmp("test1", pTest2->pName));
+ TEST(pTest2->fActive == CU_TRUE);
+ TEST(pTest2->pNext == NULL);
+ TEST(pTest2->pJumpBuf == NULL);
+ TEST(pTest2->pTestFunc == test1);
+ TEST(CU_get_test_by_name("test1", pSuite1) == pTest1);
/* error condition - memory allocation failure */
CU_initialize_registry();
@@ -1089,6 +1638,9 @@
pSuite2 = CU_add_suite("suite2", sfunc1, sfunc1);
TEST(CUE_SUCCESS == CU_get_error());
+ TEST(CU_get_test_by_index(0, pSuite1) == NULL);
+ TEST(CU_get_test_by_index(1, pSuite1) == NULL);
+
pTest1 = CU_add_test(pSuite1, "test1", test1);
TEST(CUE_SUCCESS == CU_get_error());
TEST(NULL != pTest1);
@@ -1098,6 +1650,9 @@
TEST(0 == pSuite2->uiNumberOfTests);
TEST(pSuite1->pTest == pTest1);
TEST(pSuite2->pTest == NULL);
+ TEST(CU_get_test_by_index(0, pSuite1) == NULL);
+ TEST(CU_get_test_by_index(1, pSuite1) == pTest1);
+ TEST(CU_get_test_by_index(2, pSuite1) == NULL);
pTest2 = CU_add_test(pSuite2, "test2", test1);
TEST(CUE_SUCCESS == CU_get_error());
@@ -1108,6 +1663,9 @@
TEST(1 == pSuite2->uiNumberOfTests);
TEST(pSuite1->pTest == pTest1);
TEST(pSuite2->pTest == pTest2);
+ TEST(CU_get_test_by_index(0, pSuite2) == NULL);
+ TEST(CU_get_test_by_index(1, pSuite2) == pTest2);
+ TEST(CU_get_test_by_index(2, pSuite2) == NULL);
pTest3 = CU_add_test(pSuite1, "test3", test1);
TEST(CUE_SUCCESS == CU_get_error());
@@ -1118,6 +1676,10 @@
TEST(1 == pSuite2->uiNumberOfTests);
TEST(pSuite1->pTest == pTest1);
TEST(pSuite2->pTest == pTest2);
+ TEST(CU_get_test_by_index(0, pSuite1) == NULL);
+ TEST(CU_get_test_by_index(1, pSuite1) == pTest1);
+ TEST(CU_get_test_by_index(2, pSuite1) == pTest3);
+ TEST(CU_get_test_by_index(3, pSuite1) == NULL);
pTest4 = CU_add_test(pSuite1, "test4", test1);
TEST(CUE_SUCCESS == CU_get_error());
@@ -1128,7 +1690,12 @@
TEST(1 == pSuite2->uiNumberOfTests);
TEST(pSuite1->pTest == pTest1);
TEST(pSuite2->pTest == pTest2);
-
+ TEST(CU_get_test_by_index(0, pSuite1) == NULL);
+ TEST(CU_get_test_by_index(1, pSuite1) == pTest1);
+ TEST(CU_get_test_by_index(2, pSuite1) == pTest3);
+ TEST(CU_get_test_by_index(3, pSuite1) == pTest4);
+ TEST(CU_get_test_by_index(4, pSuite1) == NULL);
+
TEST(!strcmp("test1", pTest1->pName));
TEST(pTest1->pNext == pTest3);
TEST(pTest1->pJumpBuf == NULL);
@@ -1182,6 +1749,331 @@
}
/*--------------------------------------------------*/
+/* test CU_set_test_active()
+ * CU_set_test_name()
+ * CU_set_test_func()
+ */
+static void test_CU_set_test_attributes(void)
+{
+ CU_pSuite pSuite1 = NULL;
+ CU_pSuite pSuite2 = NULL;
+ CU_pTest pTest1 = NULL;
+ CU_pTest pTest2 = NULL;
+ CU_pTest pTest3 = NULL;
+ CU_pTest pTest4 = NULL;
+
+ /* initialize system */
+ CU_initialize_registry();
+
+ pSuite1 = CU_add_suite("suite1", NULL, NULL);
+ TEST_FATAL(NULL != pSuite1);
+ pTest1 = CU_add_test(pSuite1, "test1", test2);
+ TEST_FATAL(NULL != pTest1);
+ pTest2 = CU_add_test(pSuite1, "test2", test1);
+ TEST_FATAL(NULL != pTest2);
+
+ pSuite2 = CU_add_suite("suite2", sfunc1, NULL); /* add another suite */
+ TEST_FATAL(NULL != pSuite2);
+ pTest3 = CU_add_test(pSuite2, "test3", test2);
+ TEST_FATAL(NULL != pTest3);
+ pTest4 = CU_add_test(pSuite2, "test4", test1);
+ TEST_FATAL(NULL != pTest4);
+
+ /* test CU_set_test_active() */
+ TEST(CUE_NOTEST == CU_set_test_active(NULL, CU_FALSE)); /* error - NULL test */
+
+ TEST(CU_TRUE == pTest1->fActive); /* tests active on creation */
+ TEST(CU_TRUE == pTest2->fActive);
+ TEST(CU_TRUE == pTest3->fActive);
+ TEST(CU_TRUE == pTest4->fActive);
+
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest1, CU_TRUE));
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest2, CU_TRUE));
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest3, CU_FALSE));
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest4, CU_FALSE));
+ TEST(CU_TRUE == pTest1->fActive);
+ TEST(CU_TRUE == pTest2->fActive);
+ TEST(CU_FALSE == pTest3->fActive);
+ TEST(CU_FALSE == pTest4->fActive);
+
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest1, CU_FALSE));
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest2, CU_TRUE));
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest3, CU_TRUE));
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest4, CU_FALSE));
+ TEST(CU_FALSE == pTest1->fActive);
+ TEST(CU_TRUE == pTest2->fActive);
+ TEST(CU_TRUE == pTest3->fActive);
+ TEST(CU_FALSE == pTest4->fActive);
+
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest1, CU_FALSE));
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest2, CU_FALSE));
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest3, CU_FALSE));
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest4, CU_FALSE));
+ TEST(CU_FALSE == pTest1->fActive);
+ TEST(CU_FALSE == pTest2->fActive);
+ TEST(CU_FALSE == pTest3->fActive);
+ TEST(CU_FALSE == pTest4->fActive);
+
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest1, CU_TRUE));
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest2, CU_TRUE));
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest3, CU_TRUE));
+ TEST(CUE_SUCCESS == CU_set_test_active(pTest4, CU_TRUE));
+ TEST(CU_TRUE == pTest1->fActive);
+ TEST(CU_TRUE == pTest2->fActive);
+ TEST(CU_TRUE == pTest3->fActive);
+ TEST(CU_TRUE == pTest4->fActive);
+
+ /* test CU_set_test_name() */
+ TEST(CUE_NOTEST == CU_set_test_name(NULL, "null test")); /* error - NULL test */
+ TEST(CUE_NO_TESTNAME == CU_set_test_name(pTest1, NULL)); /* error - NULL name */
+
+ TEST(!strcmp("test1", pTest1->pName));
+ TEST(!strcmp("test2", pTest2->pName));
+ TEST(!strcmp("test3", pTest3->pName));
+ TEST(!strcmp("test4", pTest4->pName));
+
+ TEST(CUE_SUCCESS == CU_set_test_name(pTest1, "Aren't I a pretty girl?"));
+ TEST(CUE_SUCCESS == CU_set_test_name(pTest2, "Polly want a cracker."));
+ TEST(CUE_SUCCESS == CU_set_test_name(pTest3, "@This is utter nonsense@"));
+ TEST(CUE_SUCCESS == CU_set_test_name(pTest4, "Yep!"));
+
+ TEST(!strcmp("Aren't I a pretty girl?", pTest1->pName));
+ TEST(!strcmp("Polly want a cracker.", pTest2->pName));
+ TEST(!strcmp("@This is utter nonsense@", pTest3->pName));
+ TEST(!strcmp("Yep!", pTest4->pName));
+
+ TEST(CUE_SUCCESS == CU_set_test_name(pTest1, "test1"));
+ TEST(CUE_SUCCESS == CU_set_test_name(pTest2, "test2"));
+ TEST(CUE_SUCCESS == CU_set_test_name(pTest3, "test3"));
+ TEST(CUE_SUCCESS == CU_set_test_name(pTest4, "test4"));
+
+ TEST(!strcmp("test1", pTest1->pName));
+ TEST(!strcmp("test2", pTest2->pName));
+ TEST(!strcmp("test3", pTest3->pName));
+ TEST(!strcmp("test4", pTest4->pName));
+
+ /* test CU_set_test_func() */
+ TEST(CUE_NOTEST == CU_set_test_func(NULL, &test1)); /* error - NULL test */
+ TEST(CUE_NOTEST == CU_set_test_func(pTest1, NULL)); /* error - NULL test function */
+
+ TEST(&test2 == pTest1->pTestFunc);
+ TEST(&test1 == pTest2->pTestFunc);
+ TEST(&test2 == pTest3->pTestFunc);
+ TEST(&test1 == pTest4->pTestFunc);
+
+ TEST(CUE_SUCCESS == CU_set_test_func(pTest1, &test1));
+ TEST(CUE_SUCCESS == CU_set_test_func(pTest2, &test2));
+ TEST(CUE_SUCCESS == CU_set_test_func(pTest3, &test1));
+ TEST(CUE_SUCCESS == CU_set_test_func(pTest4, &test2));
+
+ TEST(&test1 == pTest1->pTestFunc);
+ TEST(&test2 == pTest2->pTestFunc);
+ TEST(&test1 == pTest3->pTestFunc);
+ TEST(&test2 == pTest4->pTestFunc);
+
+ TEST(CUE_SUCCESS == CU_set_test_func(pTest1, &test2));
+ TEST(CUE_SUCCESS == CU_set_test_func(pTest2, &test1));
+ TEST(CUE_SUCCESS == CU_set_test_func(pTest3, &test2));
+ TEST(CUE_SUCCESS == CU_set_test_func(pTest4, &test1));
+
+ /* clean up */
+ CU_cleanup_registry();
+}
+
+/*--------------------------------------------------*/
+/* test CU_get_test()
+ * CU_get_test_at_pos()
+ * CU_get_test_pos()
+ * CU_get_test_pos_by_name()
+ */
+static void test_get_test_functions(void)
+{
+ CU_pSuite pSuite1 = NULL;
+ CU_pSuite pSuite2 = NULL;
+ CU_pSuite pSuite3 = NULL;
+ CU_pSuite pSuite4 = NULL;
+ CU_pTest pTest1 = NULL;
+ CU_pTest pTest2 = NULL;
+ CU_pTest pTest3 = NULL;
+ CU_pTest pTest4 = NULL;
+ CU_pTest pTest5 = NULL;
+ CU_pTest pTest6 = NULL;
+ CU_pTest pTest7 = NULL;
+ CU_pTest pTest8 = NULL;
+ CU_pTest pTest9 = NULL;
+ CU_pTest pTest10 = NULL;
+
+ /* error condition - registry not initialized */
+ CU_cleanup_registry();
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(NULL == CU_get_test(pSuite1, "test1"));
+ TEST(CUE_NOREGISTRY == CU_get_error());
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(NULL == CU_get_test_at_pos(pSuite1, 0));
+ TEST(CUE_NOREGISTRY == CU_get_error());
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(0 == CU_get_test_pos(pSuite1, pTest1));
+ TEST(CUE_NOREGISTRY == CU_get_error());
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(0 == CU_get_test_pos_by_name(pSuite1, "test1"));
+ TEST(CUE_NOREGISTRY == CU_get_error());
+
+ /* register some suites and tests */
+ CU_initialize_registry();
+ pSuite1 = CU_add_suite("suite1", NULL, NULL);
+ pTest1 = CU_add_test(pSuite1, "test1", test_succeed);
+ pTest2 = CU_add_test(pSuite1, "test2", test_fail);
+ pTest3 = CU_add_test(pSuite1, "test1", test_succeed); /* duplicate test name */
+ pTest4 = CU_add_test(pSuite1, "test4", test_fail);
+ pTest5 = CU_add_test(pSuite1, "test1", test_succeed); /* duplicate test name */
+ pSuite2 = CU_add_suite("suite2", suite_fail, NULL);
+ pTest6 = CU_add_test(pSuite2, "test6", test_succeed);
+ pTest7 = CU_add_test(pSuite2, "test7", test_succeed);
+ pSuite3 = CU_add_suite("suite1", NULL, NULL); /* duplicate suite name */
+ pTest8 = CU_add_test(pSuite3, "test8", test_fail);
+ pTest9 = CU_add_test(pSuite3, "test9", test_succeed);
+ pSuite4 = CU_add_suite("suite4", NULL, suite_fail);
+ pTest10 = CU_add_test(pSuite4, "test10", test_succeed);
+
+ /* error condition - invalid parameters */
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(NULL == CU_get_test(NULL, "test1")); /* suite NULL */
+ TEST(CUE_NOSUITE == CU_get_error());
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(NULL == CU_get_test(pSuite1, NULL)); /* name NULL */
+ TEST(CUE_NO_SUITENAME == CU_get_error());
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(0 == CU_get_test_at_pos(NULL, 1)); /* suite NULL */
+ TEST(CUE_NOSUITE == CU_get_error());
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(0 == CU_get_test_pos(NULL, pTest1)); /* suite NULL */
+ TEST(CUE_NOSUITE == CU_get_error());
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(0 == CU_get_test_pos(pSuite1, NULL)); /* test NULL */
+ TEST(CUE_NOTEST == CU_get_error());
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(0 == CU_get_test_pos_by_name(NULL, "test1")); /* suite NULL */
+ TEST(CUE_NOSUITE == CU_get_error());
+
+ CU_set_error(CUE_SUCCESS);
+ TEST(0 == CU_get_test_pos_by_name(pSuite1, NULL)); /* name NULL */
+ TEST(CUE_NO_TESTNAME == CU_get_error());
+
+ /* normal operation - CU_get_test() */
+
+ TEST(NULL == CU_get_test(pSuite1, "")); /* invalid names */
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(NULL == CU_get_test(pSuite2, "bad name"));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(NULL == CU_get_test(pSuite1, "test3"));
+ TEST(CUE_SUCCESS == CU_get_error());
+
+ TEST(pTest1 == CU_get_test(pSuite1, "test1")); /* valid names */
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pTest6 == CU_get_test(pSuite2, "test6"));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pTest8 == CU_get_test(pSuite3, "test8"));
+ TEST(CUE_SUCCESS == CU_get_error());
+
+ /* normal operation - CU_get_test_at_pos() */
+
+ TEST(NULL == CU_get_test_at_pos(pSuite1, 0)); /* invalid positions */
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(NULL == CU_get_test_at_pos(pSuite1, 6));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(NULL == CU_get_test_at_pos(pSuite4, 2));
+ TEST(CUE_SUCCESS == CU_get_error());
+
+ TEST(pTest1 == CU_get_test_at_pos(pSuite1, 1)); /* valid positions */
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pTest2 == CU_get_test_at_pos(pSuite1, 2));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pTest3 == CU_get_test_at_pos(pSuite1, 3));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pTest4 == CU_get_test_at_pos(pSuite1, 4));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pTest5 == CU_get_test_at_pos(pSuite1, 5));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pTest6 == CU_get_test_at_pos(pSuite2, 1));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pTest7 == CU_get_test_at_pos(pSuite2, 2));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pTest8 == CU_get_test_at_pos(pSuite3, 1));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pTest9 == CU_get_test_at_pos(pSuite3, 2));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(pTest10 == CU_get_test_at_pos(pSuite4, 1));
+ TEST(CUE_SUCCESS == CU_get_error());
+
+ /* normal operation - CU_get_test_pos() */
+
+ TEST(0 == CU_get_test_pos(pSuite1, pTest6)); /* invalid tests */
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(0 == CU_get_test_pos(pSuite4, pTest6));
+ TEST(CUE_SUCCESS == CU_get_error());
+
+ TEST(1 == CU_get_test_pos(pSuite1, pTest1)); /* valid tests */
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(2 == CU_get_test_pos(pSuite1, pTest2));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(3 == CU_get_test_pos(pSuite1, pTest3));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(4 == CU_get_test_pos(pSuite1, pTest4));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(5 == CU_get_test_pos(pSuite1, pTest5));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(1 == CU_get_test_pos(pSuite2, pTest6));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(2 == CU_get_test_pos(pSuite2, pTest7));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(1 == CU_get_test_pos(pSuite3, pTest8));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(2 == CU_get_test_pos(pSuite3, pTest9));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(1 == CU_get_test_pos(pSuite4, pTest10));
+ TEST(CUE_SUCCESS == CU_get_error());
+
+ /* normal operation - CU_get_test_pos_by_name() */
+
+ TEST(0 == CU_get_test_pos_by_name(pSuite1, "")); /* invalid names */
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(0 == CU_get_test_pos_by_name(pSuite1, "test9"));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(0 == CU_get_test_pos_by_name(pSuite2, "test1"));
+ TEST(CUE_SUCCESS == CU_get_error());
+
+ TEST(1 == CU_get_test_pos_by_name(pSuite1, "test1")); /* valid names */
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(2 == CU_get_test_pos_by_name(pSuite1, "test2"));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(4 == CU_get_test_pos_by_name(pSuite1, "test4"));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(1 == CU_get_test_pos_by_name(pSuite2, "test6"));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(2 == CU_get_test_pos_by_name(pSuite2, "test7"));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(1 == CU_get_test_pos_by_name(pSuite3, "test8"));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(2 == CU_get_test_pos_by_name(pSuite3, "test9"));
+ TEST(CUE_SUCCESS == CU_get_error());
+ TEST(1 == CU_get_test_pos_by_name(pSuite4, "test10"));
+ TEST(CUE_SUCCESS == CU_get_error());
+
+ /* clean up */
+ CU_cleanup_registry();
+}
+
+/*--------------------------------------------------*/
static void test_CU_get_registry(void)
{
CU_cleanup_registry();
@@ -1255,6 +2147,9 @@
}
/*--------------------------------------------------*/
+/* test CU_create_new_registry()
+ * CU_destroy_existing_registry()
+ */
static void test_CU_create_new_registry(void)
{
CU_pTestRegistry pReg = NULL;
@@ -1281,24 +2176,6 @@
}
/*--------------------------------------------------*/
-static void test_CU_destroy_existing_registry(void)
-{
- /* covered by test_CU_create_new_registry() */
-}
-
-/*--------------------------------------------------*/
-static void test_CU_get_suite_by_name(void)
-{
- /* covered by test_CU_add_suite() */
-}
-
-/*--------------------------------------------------*/
-static void test_CU_get_test_by_name(void)
-{
- /* covered by test_CU_add_test() */
-}
-
-/*--------------------------------------------------*/
static void test_cleanup_test_registry(void)
{
CU_pSuite pSuite1 = NULL;
@@ -1374,6 +2251,9 @@
}
/*--------------------------------------------------*/
+/* test create_suite()
+ * cleanup_suite()
+ */
static void test_create_suite(void)
{
CU_pSuite pSuite1 = NULL;
@@ -1450,12 +2330,9 @@
}
/*--------------------------------------------------*/
-static void test_cleanup_suite(void)
-{
- /* covered by test_create_suite() and test_create_test() */
-}
-
-/*--------------------------------------------------*/
+/* test insert_suite()
+ * suite_exists()
+ */
static void test_insert_suite(void)
{
CU_pSuite pSuite1 = NULL;
@@ -1607,6 +2484,9 @@
}
/*--------------------------------------------------*/
+/* test insert_test()
+ * test_exists()
+ */
static void test_insert_test(void)
{
CU_pSuite pSuite1 = NULL;
@@ -1740,18 +2620,6 @@
}
/*--------------------------------------------------*/
-static void test_suite_exists(void)
-{
- /* covered by test_insert_suite() */
-}
-
-/*--------------------------------------------------*/
-static void test_test_exists(void)
-{
- /* covered by test_insert_test() */
-}
-
-/*--------------------------------------------------*/
static void group_A_case_1(void)
{
CU_ASSERT_TRUE(1);
@@ -1784,6 +2652,12 @@
CU_TEST_INFO_NULL,
};
+static CU_TestInfo group_C_test_cases[] = {
+ { "1", group_B_case_1 },
+ { "1", group_B_case_2 }, /* duplicate test name */
+ CU_TEST_INFO_NULL,
+};
+
static CU_SuiteInfo suites0[] = {
CU_SUITE_INFO_NULL,
};
@@ -1800,6 +2674,12 @@
CU_SUITE_INFO_NULL,
};
+static CU_SuiteInfo suites3[] = {
+ { "A3", NULL, NULL, group_A_test_cases },
+ { "A3", NULL, NULL, group_C_test_cases }, /* duplicate suite name */
+ CU_SUITE_INFO_NULL,
+};
+
static void test_register_suite(void)
{
CU_pTestRegistry pReg = NULL;
@@ -1837,9 +2717,15 @@
/* test CU_register_suites() with duplicate suite name */
status = CU_register_suites(suites1);
- TEST(CUE_DUP_SUITE == status);
- TEST(2 == pReg->uiNumberOfSuites);
- TEST(4 == pReg->uiNumberOfTests);
+ TEST(CUE_SUCCESS == status); /* shaky - depends on order of operation in CU_register_suites() */
+ TEST(4 == pReg->uiNumberOfSuites);
+ TEST(8 == pReg->uiNumberOfTests);
+
+ /* test CU_register_suites() with duplicate test name */
+ status = CU_register_suites(suites3);
+ TEST(CUE_DUP_TEST == status); /* shaky - depends on order of operation in CU_register_suites() */
+ TEST(6 == pReg->uiNumberOfSuites);
+ TEST(12 == pReg->uiNumberOfTests);
CU_cleanup_registry();
@@ -1865,22 +2751,20 @@
test_CU_initialize_registry();
test_CU_cleanup_registry();
test_CU_add_suite();
+ test_CU_set_suite_attributes();
+ test_get_suite_functions();
test_CU_add_test();
+ test_CU_set_test_attributes();
+ test_get_test_functions();
test_CU_get_registry();
test_CU_set_registry();
test_CU_create_new_registry();
- test_CU_destroy_existing_registry();
- test_CU_get_suite_by_name();
- test_CU_get_test_by_name();
test_cleanup_test_registry();
test_create_suite();
- test_cleanup_suite();
test_insert_suite();
test_create_test();
test_cleanup_test();
test_insert_test();
- test_suite_exists();
- test_test_exists();
test_register_suite();
test_cunit_end_tests();
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Framework/TestRun.c cunit-2.1-2.dfsg/CUnit/Sources/Framework/TestRun.c
--- cunit-2.1-0.dfsg/CUnit/Sources/Framework/TestRun.c 2006-01-30 03:52:34.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Framework/TestRun.c 2010-10-14 08:31:42.000000000 +0000
@@ -1,7 +1,7 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -19,7 +19,7 @@
*/
/*
- * Implementation of Console Test Interface.
+ * Implementation of Test Run Interface.
*
* Aug 2001 Initial implementaion (AK)
*
@@ -48,6 +48,17 @@
*
* 30-Apr-2005 Added callback for suite cleanup function failure,
* updated unit tests. (JDS)
+ *
+ * 23-Apr-2006 Added testing for suite/test deactivation, changing functions.
+ * Moved doxygen comments for public functions into header.
+ * Added type marker to CU_FailureRecord.
+ * Added support for tracking inactive suites/tests. (JDS)
+ *
+ * 02-May-2006 Added internationalization hooks. (JDS)
+ *
+ * 02-Jun-2006 Added support for elapsed time. Added handlers for suite
+ * start and complete events. Reworked test run routines to
+ * better support these features, suite/test activation. (JDS)
*/
/** @file
@@ -62,66 +73,83 @@
#include
#include
#include
+#include
#include "CUnit.h"
#include "MyMem.h"
#include "TestDB.h"
#include "TestRun.h"
+#include "Util.h"
+#include "CUnit_intl.h"
+/*=================================================================
+ * Global/Static Definitions
+ *=================================================================*/
static CU_BOOL f_bTestIsRunning = CU_FALSE; /**< Flag for whether a test run is in progress */
static CU_pSuite f_pCurSuite = NULL; /**< Pointer to the suite currently being run. */
static CU_pTest f_pCurTest = NULL; /**< Pointer to the test currently being run. */
/** CU_RunSummary to hold results of each test run. */
-static CU_RunSummary f_run_summary = {0, 0, 0, 0, 0, 0, 0};
+static CU_RunSummary f_run_summary = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+
/** CU_pFailureRecord to hold head of failure record list of each test run. */
static CU_pFailureRecord f_failure_list = NULL;
+
/** CU_pFailureRecord to hold head of failure record list of each test run. */
static CU_pFailureRecord f_last_failure = NULL;
-/* Forward declarations of static functions. */
-static void clear_previous_results(CU_pRunSummary pRunSummary, CU_pFailureRecord* ppFailure);
-static void cleanup_failure_list(CU_pFailureRecord* ppFailure);
-static CU_ErrorCode run_single_suite(CU_pSuite pSuite, CU_pRunSummary pRunSummary);
-static CU_ErrorCode run_single_test(CU_pTest pTest, CU_pRunSummary pRunSummary);
-static void add_failure(CU_pFailureRecord* ppFailure,
- CU_pRunSummary pRunSummary,
- unsigned int uiLineNumber,
- char szCondition[],
- char szFileName[],
- CU_pSuite pSuite,
- CU_pTest pTest);
+/** Flag for whether inactive suites/tests are treated as failures. */
+static CU_BOOL f_failure_on_inactive = CU_TRUE;
+
+/** Variable for storage of start time for test run. */
+static clock_t f_start_time;
+
+
+/** Pointer to the function to be called before running a suite. */
+static CU_SuiteStartMessageHandler f_pSuiteStartMessageHandler = NULL;
/** Pointer to the function to be called before running a test. */
static CU_TestStartMessageHandler f_pTestStartMessageHandler = NULL;
+
/** Pointer to the function to be called after running a test. */
static CU_TestCompleteMessageHandler f_pTestCompleteMessageHandler = NULL;
+
+/** Pointer to the function to be called after running a suite. */
+static CU_SuiteCompleteMessageHandler f_pSuiteCompleteMessageHandler = NULL;
+
/** Pointer to the function to be called when all tests have been run. */
static CU_AllTestsCompleteMessageHandler f_pAllTestsCompleteMessageHandler = NULL;
+
/** Pointer to the function to be called if a suite initialization function returns an error. */
static CU_SuiteInitFailureMessageHandler f_pSuiteInitFailureMessageHandler = NULL;
+
/** Pointer to the function to be called if a suite cleanup function returns an error. */
static CU_SuiteCleanupFailureMessageHandler f_pSuiteCleanupFailureMessageHandler = NULL;
-/*------------------------------------------------------------------------*/
-/** Assertion implementation function.
- * All CUnit assertions reduce to a call to this function.
- * It should only be called during an active test run (checked
- * by assertion). This means that CUnit assertions should only
- * be used in registered test functions during a test run.
- * @param bValue Value of the assertion (CU_TRUE or CU_FALSE).
- * @param uiLine Line number of failed test statement.
- * @param strCondition String containing logical test that failed.
- * @param strFile Source file where test statement failed.
- * @param strFunction Function where test statement failed.
- * @param bFatal CU_TRUE to abort test (via longjmp()), CU_FALSE to continue test.
- * @return As a convenience, returns the value of the assertion.
- */
+/*=================================================================
+ * Private function forward declarations
+ *=================================================================*/
+static void clear_previous_results(CU_pRunSummary pRunSummary, CU_pFailureRecord* ppFailure);
+static void cleanup_failure_list(CU_pFailureRecord* ppFailure);
+static CU_ErrorCode run_single_suite(CU_pSuite pSuite, CU_pRunSummary pRunSummary);
+static CU_ErrorCode run_single_test(CU_pTest pTest, CU_pRunSummary pRunSummary);
+static void add_failure(CU_pFailureRecord* ppFailure,
+ CU_pRunSummary pRunSummary,
+ CU_FailureType type,
+ unsigned int uiLineNumber,
+ const char *szCondition,
+ const char *szFileName,
+ CU_pSuite pSuite,
+ CU_pTest pTest);
+
+/*=================================================================
+ * Public Interface functions
+ *=================================================================*/
CU_BOOL CU_assertImplementation(CU_BOOL bValue,
unsigned int uiLine,
- char strCondition[],
- char strFile[],
- char strFunction[],
+ const char *strCondition,
+ const char *strFile,
+ const char *strFunction,
CU_BOOL bFatal)
{
/* not used in current implementation - stop compiler warning */
@@ -134,7 +162,7 @@
++f_run_summary.nAsserts;
if (CU_FALSE == bValue) {
++f_run_summary.nAssertsFailed;
- add_failure(&f_failure_list, &f_run_summary,
+ add_failure(&f_failure_list, &f_run_summary, CUF_AssertFailed,
uiLine, strCondition, strFile, f_pCurSuite, f_pCurTest);
if ((CU_TRUE == bFatal) && (NULL != f_pCurTest->pJumpBuf)) {
@@ -145,452 +173,511 @@
return bValue;
}
-/*
- * Get/Set functions for Message Handlers.
- */
/*------------------------------------------------------------------------*/
-/** Set the message handler to call before each test is run. */
+void CU_set_suite_start_handler(CU_SuiteStartMessageHandler pSuiteStartHandler)
+{
+ f_pSuiteStartMessageHandler = pSuiteStartHandler;
+}
+
+/*------------------------------------------------------------------------*/
void CU_set_test_start_handler(CU_TestStartMessageHandler pTestStartHandler)
{
f_pTestStartMessageHandler = pTestStartHandler;
}
/*------------------------------------------------------------------------*/
-/** Set the message handler to call after each test is run. */
void CU_set_test_complete_handler(CU_TestCompleteMessageHandler pTestCompleteHandler)
{
f_pTestCompleteMessageHandler = pTestCompleteHandler;
}
/*------------------------------------------------------------------------*/
-/** Set the message handler to call after all tests have been run. */
+void CU_set_suite_complete_handler(CU_SuiteCompleteMessageHandler pSuiteCompleteHandler)
+{
+ f_pSuiteCompleteMessageHandler = pSuiteCompleteHandler;
+}
+
+/*------------------------------------------------------------------------*/
void CU_set_all_test_complete_handler(CU_AllTestsCompleteMessageHandler pAllTestsCompleteHandler)
{
f_pAllTestsCompleteMessageHandler = pAllTestsCompleteHandler;
}
/*------------------------------------------------------------------------*/
-/** Set the message handler to call when a suite
- * initialization function returns an error.
- */
void CU_set_suite_init_failure_handler(CU_SuiteInitFailureMessageHandler pSuiteInitFailureHandler)
{
f_pSuiteInitFailureMessageHandler = pSuiteInitFailureHandler;
}
/*------------------------------------------------------------------------*/
-/** Set the message handler to call when a suite
- * cleanup function returns an error.
- */
void CU_set_suite_cleanup_failure_handler(CU_SuiteCleanupFailureMessageHandler pSuiteCleanupFailureHandler)
{
f_pSuiteCleanupFailureMessageHandler = pSuiteCleanupFailureHandler;
}
/*------------------------------------------------------------------------*/
-/** Retrieve the message handler called before each test is run. */
+CU_SuiteStartMessageHandler CU_get_suite_start_handler(void)
+{
+ return f_pSuiteStartMessageHandler;
+}
+
+/*------------------------------------------------------------------------*/
CU_TestStartMessageHandler CU_get_test_start_handler(void)
{
return f_pTestStartMessageHandler;
}
/*------------------------------------------------------------------------*/
-/** Retrieve the message handler called after each test is run. */
CU_TestCompleteMessageHandler CU_get_test_complete_handler(void)
{
return f_pTestCompleteMessageHandler;
}
/*------------------------------------------------------------------------*/
-/** Retrieve the message handler called after all tests are run. */
+CU_SuiteCompleteMessageHandler CU_get_suite_complete_handler(void)
+{
+ return f_pSuiteCompleteMessageHandler;
+}
+
+/*------------------------------------------------------------------------*/
CU_AllTestsCompleteMessageHandler CU_get_all_test_complete_handler(void)
{
return f_pAllTestsCompleteMessageHandler;
}
/*------------------------------------------------------------------------*/
-/** Retrieve the message handler called when a suite
- * initialization error occurs.
- */
CU_SuiteInitFailureMessageHandler CU_get_suite_init_failure_handler(void)
{
return f_pSuiteInitFailureMessageHandler;
}
/*------------------------------------------------------------------------*/
-/** Retrieve the message handler called when a suite
- * cleanup error occurs.
- */
CU_SuiteCleanupFailureMessageHandler CU_get_suite_cleanup_failure_handler(void)
{
return f_pSuiteCleanupFailureMessageHandler;
}
-/*
- * Functions to get the Run statistics for the Test Run.
- */
/*------------------------------------------------------------------------*/
-/** Retrieve the number of suites completed during the previous run.
- * The count is reset each time the client initiates a run.
- * @see CU_get_number_of_tests_run()
- */
unsigned int CU_get_number_of_suites_run(void)
{
return f_run_summary.nSuitesRun;
}
/*------------------------------------------------------------------------*/
-/** Retrieve the number of suites which failed to initialize
- * during the previous run.
- * The count is reset each time the client initiates a run.
- * @see CU_get_number_of_tests_run()
- */
unsigned int CU_get_number_of_suites_failed(void)
{
return f_run_summary.nSuitesFailed;
}
/*------------------------------------------------------------------------*/
-/** Retrieve the number of tests completed during the previous run.
- * The count is reset each time the client initiates a run.
- * @see CU_get_number_of_suites_run()
- */
+unsigned int CU_get_number_of_suites_inactive(void)
+{
+ return f_run_summary.nSuitesInactive;
+}
+
+/*------------------------------------------------------------------------*/
unsigned int CU_get_number_of_tests_run(void)
{
return f_run_summary.nTestsRun;
}
/*------------------------------------------------------------------------*/
-/** Retrieve the number of tests which contained failed
- * assertions during the previous run.
- * The count is reset each time the client initiates a run.
- * @see CU_get_number_of_suites_run()
- */
unsigned int CU_get_number_of_tests_failed(void)
{
return f_run_summary.nTestsFailed;
}
/*------------------------------------------------------------------------*/
-/** Retrieve the number of assertions processed during the last run.
- * The count is reset each time the client initiates a run.
- * @see CU_get_number_of_successes()
- * @see CU_get_number_of_failures()
- */
+unsigned int CU_get_number_of_tests_inactive(void)
+{
+ return f_run_summary.nTestsInactive;
+}
+
+/*------------------------------------------------------------------------*/
unsigned int CU_get_number_of_asserts(void)
{
return f_run_summary.nAsserts;
}
/*------------------------------------------------------------------------*/
-/** Retrieve the number of successful assertions during the last run.
- * The count is reset each time the client initiates a run.
- * @see CU_get_number_of_failures()
- */
unsigned int CU_get_number_of_successes(void)
{
return (f_run_summary.nAsserts - f_run_summary.nAssertsFailed);
}
/*------------------------------------------------------------------------*/
-/** Retrieve the number of failed assertions during the last run.
- * The count is reset each time the client initiates a run.
- * @see CU_get_number_of_successes()
- */
unsigned int CU_get_number_of_failures(void)
{
return f_run_summary.nAssertsFailed;
}
/*------------------------------------------------------------------------*/
-/** Retrieve the number failure records created during
- * the previous run. Note that this may be more than the
- * number of failed assertions, since failure records may also
- * be created for failed suite initialization and cleanup.
- * The count is reset each time the client initiates a run.
- */
unsigned int CU_get_number_of_failure_records(void)
{
return f_run_summary.nFailureRecords;
}
/*------------------------------------------------------------------------*/
-/** Retrieve the list of failures which occurred during
- * the last test run. Note that the pointer returned
- * is invalidated when the client initiates a run using
- * CU_run_all_tests(), CU_run_suite(), or CU_run_test().
- * @see CU_get_number_of_successes()
- */
+double CU_get_elapsed_time(void)
+{
+ if (CU_TRUE == f_bTestIsRunning) {
+ return ((double)clock() - (double)f_start_time)/(double)CLOCKS_PER_SEC;
+ }
+ else {
+ return f_run_summary.ElapsedTime;
+ }
+}
+
+/*------------------------------------------------------------------------*/
CU_pFailureRecord CU_get_failure_list(void)
{
return f_failure_list;
}
/*------------------------------------------------------------------------*/
-/** Retrieve the entire run summary for the last test run.
- * Note that the pFailure pointer in the run summary is
- * invalidated when the client initiates a run using
- * CU_run_all_tests(), CU_run_suite(), or CU_run_test().
- * @see CU_get_number_of_successes()
- */
CU_pRunSummary CU_get_run_summary(void)
{
return &f_run_summary;
}
-/*
- * Functions for running suites and tests.
- */
/*------------------------------------------------------------------------*/
-/** Run all tests in all suites registered in the test registry.
- * The suites are run in the order registered in the test registry.
- * For each registered suite, any initialization function is first
- * called, the suite is run using run_single_suite(), and finally
- * any suite cleanup function is called. If an error condition
- * (other than CUE_NOREGISTRY) occurs during the run, the action
- * depends on the current error action (see CU_set_error_action()).
- * @return A CU_ErrorCode indicating the first error condition
- * encountered while running the tests.
- * @see CU_run_suite() to run the tests in a specific suite.
- * @see CU_run_test() for run a specific test only.
- */
CU_ErrorCode CU_run_all_tests(void)
{
CU_pTestRegistry pRegistry = CU_get_registry();
CU_pSuite pSuite = NULL;
- CU_ErrorCode result;
+ CU_ErrorCode result = CUE_SUCCESS;
CU_ErrorCode result2;
- CU_set_error(result = CUE_SUCCESS);
+ /* Clear results from the previous run */
+ clear_previous_results(&f_run_summary, &f_failure_list);
+
if (NULL == pRegistry) {
- CU_set_error(result = CUE_NOREGISTRY);
+ result = CUE_NOREGISTRY;
}
else {
/* test run is starting - set flag */
f_bTestIsRunning = CU_TRUE;
-
- /* Clear results from the previous run */
- clear_previous_results(&f_run_summary, &f_failure_list);
+ f_start_time = clock();
pSuite = pRegistry->pSuite;
while ((NULL != pSuite) && ((CUE_SUCCESS == result) || (CU_get_error_action() == CUEA_IGNORE))) {
- /* if the suite has tests, run it */
- if (pSuite->uiNumberOfTests > 0) {
- result2 = run_single_suite(pSuite, &f_run_summary);
- result = (CUE_SUCCESS == result) ? result2 : result; /* result = 1st error encountered */
- }
+ result2 = run_single_suite(pSuite, &f_run_summary);
+ result = (CUE_SUCCESS == result) ? result2 : result; /* result = 1st error encountered */
pSuite = pSuite->pNext;
}
/* test run is complete - clear flag */
f_bTestIsRunning = CU_FALSE;
+ f_run_summary.ElapsedTime = ((double)clock() - (double)f_start_time)/(double)CLOCKS_PER_SEC;
if (NULL != f_pAllTestsCompleteMessageHandler) {
(*f_pAllTestsCompleteMessageHandler)(f_failure_list);
}
}
+ CU_set_error(result);
return result;
}
/*------------------------------------------------------------------------*/
-/** Run all tests in a specified suite.
- * The suite need not be registered in the test registry to be run.
- * Any initialization function for the suite is first called,
- * then the suite is run using run_single_suite(), and any
- * suite cleanup function is called. Note that the
- * run statistics (counts of tests, successes, failures)
- * are initialized each time this function is called.
- * If an error condition occurs during the run, the action
- * depends on the current error action (see CU_set_error_action()).
- * @param pSuite The suite containing the test (non-NULL)
- * @return A CU_ErrorCode indicating the first error condition
- * encountered while running the suite. CU_run_suite()
- * sets and returns CUE_NOSUITE if pSuite is NULL. Other
- * error codes can be set during suite initialization or
- * cleanup or during test runs.
- * @see CU_run_all_tests() to run all suites.
- * @see CU_run_test() to run a single test in a specific suite.
- */
CU_ErrorCode CU_run_suite(CU_pSuite pSuite)
{
- CU_ErrorCode result;
+ CU_ErrorCode result = CUE_SUCCESS;
+
+ /* Clear results from the previous run */
+ clear_previous_results(&f_run_summary, &f_failure_list);
- CU_set_error(result = CUE_SUCCESS);
if (NULL == pSuite) {
- CU_set_error(result = CUE_NOSUITE);
+ result = CUE_NOSUITE;
}
else {
/* test run is starting - set flag */
f_bTestIsRunning = CU_TRUE;
+ f_start_time = clock();
- /* Clear results from the previous run */
- clear_previous_results(&f_run_summary, &f_failure_list);
-
- if (pSuite->uiNumberOfTests > 0) {
- result = run_single_suite(pSuite, &f_run_summary);
- }
+ result = run_single_suite(pSuite, &f_run_summary);
/* test run is complete - clear flag */
f_bTestIsRunning = CU_FALSE;
+ f_run_summary.ElapsedTime = ((double)clock() - (double)f_start_time)/(double)CLOCKS_PER_SEC;
+ /* run handler for overall completion, if any */
if (NULL != f_pAllTestsCompleteMessageHandler) {
(*f_pAllTestsCompleteMessageHandler)(f_failure_list);
}
}
+ CU_set_error(result);
return result;
}
/*------------------------------------------------------------------------*/
-/** Run a specific test in a specified suite.
- * The suite need not be registered in the test registry to be run,
- * although the test must be registered in the specified suite.
- * Any initialization function for the suite is first
- * called, then the test is run using run_single_test(), and
- * any suite cleanup function is called. Note that the
- * run statistics (counts of tests, successes, failures)
- * are initialized each time this function is called.
- * @param pSuite The suite containing the test (non-NULL)
- * @param pTest The test to run (non-NULL)
- * @return A CU_ErrorCode indicating the first error condition
- * encountered while running the suite. CU_run_test()
- * sets and returns CUE_NOSUITE if pSuite is NULL,
- * CUE_NOTEST if pTest is NULL, and CUE_TEST_NOT_IN_SUITE
- * if pTest is not registered in pSuite. Other
- * error codes can be set during suite initialization or
- * cleanup or during the test run.
- * @see CU_run_all_tests() to run all tests/suites.
- * @see CU_run_suite() to run all tests in a specific suite.
- */
CU_ErrorCode CU_run_test(CU_pSuite pSuite, CU_pTest pTest)
{
- CU_ErrorCode result;
+ CU_ErrorCode result = CUE_SUCCESS;
CU_ErrorCode result2;
- CU_set_error(result = CUE_SUCCESS);
+ /* Clear results from the previous run */
+ clear_previous_results(&f_run_summary, &f_failure_list);
+
if (NULL == pSuite) {
- CU_set_error(result = CUE_NOSUITE);
+ result = CUE_NOSUITE;
}
else if (NULL == pTest) {
- CU_set_error(result = CUE_NOTEST);
+ result = CUE_NOTEST;
+ }
+ else if (CU_FALSE == pSuite->fActive) {
+ f_run_summary.nSuitesInactive++;
+ if (CU_FALSE != f_failure_on_inactive) {
+ add_failure(&f_failure_list, &f_run_summary, CUF_SuiteInactive,
+ 0, _("Suite inactive"), _("CUnit System"), pSuite, NULL);
+ }
+ result = CUE_SUITE_INACTIVE;
}
else if ((NULL == pTest->pName) || (NULL == CU_get_test_by_name(pTest->pName, pSuite))) {
- CU_set_error(result = CUE_TEST_NOT_IN_SUITE);
+ result = CUE_TEST_NOT_IN_SUITE;
}
else {
/* test run is starting - set flag */
f_bTestIsRunning = CU_TRUE;
-
- /* Clear results from the previous run */
- clear_previous_results(&f_run_summary, &f_failure_list);
+ f_start_time = clock();
f_pCurTest = NULL;
f_pCurSuite = pSuite;
+ /* run handler for suite start, if any */
+ if (NULL != f_pSuiteStartMessageHandler) {
+ (*f_pSuiteStartMessageHandler)(pSuite);
+ }
+
+ /* run the suite initialization function, if any */
if ((NULL != pSuite->pInitializeFunc) && (0 != (*pSuite->pInitializeFunc)())) {
+ /* init function had an error - call handler, if any */
if (NULL != f_pSuiteInitFailureMessageHandler) {
(*f_pSuiteInitFailureMessageHandler)(pSuite);
}
f_run_summary.nSuitesFailed++;
- add_failure(&f_failure_list, &f_run_summary,
- 0, "Suite Initialization failed - Test Skipped", "CUnit System", pSuite, pTest);
- CU_set_error(result = CUE_SINIT_FAILED);
- /* test run is complete - clear flag */
- f_bTestIsRunning = CU_FALSE;
+ add_failure(&f_failure_list, &f_run_summary, CUF_SuiteInitFailed, 0,
+ _("Suite Initialization failed - Suite Skipped"),
+ _("CUnit System"), pSuite, NULL);
+ result = CUE_SINIT_FAILED;
}
/* reach here if no suite initialization, or if it succeeded */
else {
result2 = run_single_test(pTest, &f_run_summary);
result = (CUE_SUCCESS == result) ? result2 : result;
+ /* run the suite cleanup function, if any */
if ((NULL != pSuite->pCleanupFunc) && (0 != (*pSuite->pCleanupFunc)())) {
+ /* cleanup function had an error - call handler, if any */
if (NULL != f_pSuiteCleanupFailureMessageHandler) {
(*f_pSuiteCleanupFailureMessageHandler)(pSuite);
}
f_run_summary.nSuitesFailed++;
- add_failure(&f_failure_list, &f_run_summary,
- 0, "Suite cleanup failed.", "CUnit System", pSuite, pTest);
+ add_failure(&f_failure_list, &f_run_summary, CUF_SuiteCleanupFailed,
+ 0, _("Suite cleanup failed."), _("CUnit System"), pSuite, NULL);
result = (CUE_SUCCESS == result) ? CUE_SCLEAN_FAILED : result;
- CU_set_error(CUE_SCLEAN_FAILED);
}
+ }
+
+ /* run handler for suite completion, if any */
+ if (NULL != f_pSuiteCompleteMessageHandler) {
+ (*f_pSuiteCompleteMessageHandler)(pSuite, NULL);
+ }
- /* test run is complete - clear flag */
- f_bTestIsRunning = CU_FALSE;
-
- if (NULL != f_pAllTestsCompleteMessageHandler) {
- (*f_pAllTestsCompleteMessageHandler)(f_failure_list);
- }
+ /* test run is complete - clear flag */
+ f_bTestIsRunning = CU_FALSE;
+ f_run_summary.ElapsedTime = ((double)clock() - (double)f_start_time)/(double)CLOCKS_PER_SEC;
- f_pCurSuite = NULL;
+ /* run handler for overall completion, if any */
+ if (NULL != f_pAllTestsCompleteMessageHandler) {
+ (*f_pAllTestsCompleteMessageHandler)(f_failure_list);
}
+
+ f_pCurSuite = NULL;
}
+ CU_set_error(result);
return result;
}
/*------------------------------------------------------------------------*/
-/** Initialize the run summary information stored from
- * the previous test run. Resets the run counts to zero,
- * and frees any memory associated with failure records.
- * Calling this function multiple times, while inefficient,
- * will not cause an error condition.
- * @see clear_previous_results()
- */
void CU_clear_previous_results(void)
{
clear_previous_results(&f_run_summary, &f_failure_list);
}
/*------------------------------------------------------------------------*/
-/** Retrieve a pointer to the currently-running suite (NULL if none).
- */
CU_pSuite CU_get_current_suite(void)
{
return f_pCurSuite;
}
/*------------------------------------------------------------------------*/
-/** Retrieve a pointer to the currently-running test (NULL if none).
- */
CU_pTest CU_get_current_test(void)
{
return f_pCurTest;
}
/*------------------------------------------------------------------------*/
-/** Returns CU_TRUE
if a test run is in progress,
- * CU_TRUE
otherwise.
- */
CU_BOOL CU_is_test_running(void)
{
return f_bTestIsRunning;
}
/*------------------------------------------------------------------------*/
-/** Record a failed test.
- * This function is called whenever a test fails to record the
- * details of the failure. This includes user assertion failures
- * and system errors such as failure to initialize a suite.
+CU_EXPORT void CU_set_fail_on_inactive(CU_BOOL new_inactive)
+{
+ f_failure_on_inactive = new_inactive;
+}
+
+/*------------------------------------------------------------------------*/
+CU_EXPORT CU_BOOL CU_get_fail_on_inactive(void)
+{
+ return f_failure_on_inactive;
+}
+
+/*------------------------------------------------------------------------*/
+CU_EXPORT void CU_print_run_results(FILE *file)
+{
+ char *summary_string;
+
+ assert(NULL != file);
+ summary_string = CU_get_run_results_string();
+ if (NULL != summary_string) {
+ fprintf(file, "%s", summary_string);
+ CU_FREE(summary_string);
+ }
+ else {
+ fprintf(file, _("An error occurred printing the run results."));
+ }
+}
+
+/*------------------------------------------------------------------------*/
+CU_EXPORT char * CU_get_run_results_string(void)
+
+{
+ CU_pRunSummary pRunSummary = &f_run_summary;
+ CU_pTestRegistry pRegistry = CU_get_registry();
+ size_t width[9];
+ size_t len;
+ char *result;
+
+ assert(NULL != pRunSummary);
+ assert(NULL != pRegistry);
+
+ width[0] = strlen(_("Run Summary:"));
+ width[1] = CU_MAX(6,
+ CU_MAX(strlen(_("Type")),
+ CU_MAX(strlen(_("suites")),
+ CU_MAX(strlen(_("tests")),
+ strlen(_("asserts")))))) + 1;
+ width[2] = CU_MAX(6,
+ CU_MAX(strlen(_("Total")),
+ CU_MAX(CU_number_width(pRegistry->uiNumberOfSuites),
+ CU_MAX(CU_number_width(pRegistry->uiNumberOfTests),
+ CU_number_width(pRunSummary->nAsserts))))) + 1;
+ width[3] = CU_MAX(6,
+ CU_MAX(strlen(_("Ran")),
+ CU_MAX(CU_number_width(pRunSummary->nSuitesRun),
+ CU_MAX(CU_number_width(pRunSummary->nTestsRun),
+ CU_number_width(pRunSummary->nAsserts))))) + 1;
+ width[4] = CU_MAX(6,
+ CU_MAX(strlen(_("Passed")),
+ CU_MAX(strlen(_("n/a")),
+ CU_MAX(CU_number_width(pRunSummary->nTestsRun - pRunSummary->nTestsFailed),
+ CU_number_width(pRunSummary->nAsserts - pRunSummary->nAssertsFailed))))) + 1;
+ width[5] = CU_MAX(6,
+ CU_MAX(strlen(_("Failed")),
+ CU_MAX(CU_number_width(pRunSummary->nSuitesFailed),
+ CU_MAX(CU_number_width(pRunSummary->nTestsFailed),
+ CU_number_width(pRunSummary->nAssertsFailed))))) + 1;
+ width[6] = CU_MAX(6,
+ CU_MAX(strlen(_("Inactive")),
+ CU_MAX(CU_number_width(pRunSummary->nSuitesInactive),
+ CU_MAX(CU_number_width(pRunSummary->nTestsInactive),
+ strlen(_("n/a")))))) + 1;
+
+ width[7] = strlen(_("Elapsed time = "));
+ width[8] = strlen(_(" seconds"));
+
+ len = 13 + 4*(width[0] + width[1] + width[2] + width[3] + width[4] + width[5] + width[6]) + width[7] + width[8] + 1;
+ result = (char *)CU_MALLOC(len);
+
+ if (NULL != result) {
+ snprintf(result, len, "%*s%*s%*s%*s%*s%*s%*s\n" /* if you change this, be sure */
+ "%*s%*s%*u%*u%*s%*u%*u\n" /* to change the calculation of */
+ "%*s%*s%*u%*u%*u%*u%*u\n" /* len above! */
+ "%*s%*s%*u%*u%*u%*u%*s\n\n"
+ "%*s%8.3f%*s",
+ width[0], _("Run Summary:"),
+ width[1], _("Type"),
+ width[2], _("Total"),
+ width[3], _("Ran"),
+ width[4], _("Passed"),
+ width[5], _("Failed"),
+ width[6], _("Inactive"),
+ width[0], " ",
+ width[1], _("suites"),
+ width[2], pRegistry->uiNumberOfSuites,
+ width[3], pRunSummary->nSuitesRun,
+ width[4], _("n/a"),
+ width[5], pRunSummary->nSuitesFailed,
+ width[6], pRunSummary->nSuitesInactive,
+ width[0], " ",
+ width[1], _("tests"),
+ width[2], pRegistry->uiNumberOfTests,
+ width[3], pRunSummary->nTestsRun,
+ width[4], pRunSummary->nTestsRun - pRunSummary->nTestsFailed,
+ width[5], pRunSummary->nTestsFailed,
+ width[6], pRunSummary->nTestsInactive,
+ width[0], " ",
+ width[1], _("asserts"),
+ width[2], pRunSummary->nAsserts,
+ width[3], pRunSummary->nAsserts,
+ width[4], pRunSummary->nAsserts - pRunSummary->nAssertsFailed,
+ width[5], pRunSummary->nAssertsFailed,
+ width[6], _("n/a"),
+ width[7], _("Elapsed time = "), CU_get_elapsed_time(), /* makes sure time is updated */
+ width[8], _(" seconds")
+ );
+ result[len-1] = '\0';
+ }
+ return result;
+}
+
+/*=================================================================
+ * Static Function Definitions
+ *=================================================================*/
+/**
+ * Records a runtime failure.
+ * This function is called whenever a runtime failure occurs.
+ * This includes user assertion failures, suite initialization and
+ * cleanup failures, and inactive suites/tests when set as failures.
+ * This function records the details of the failure in a new
+ * failure record in the linked list of runtime failures.
+ *
* @param ppFailure Pointer to head of linked list of failure
* records to append with new failure record.
* If it points to a NULL pointer, it will be set
* to point to the new failure record.
* @param pRunSummary Pointer to CU_RunSummary keeping track of failure records
* (ignored if NULL).
+ * @param type Type of failure.
* @param uiLineNumber Line number of the failure, if applicable.
* @param szCondition Description of failure condition
* @param szFileName Name of file, if applicable
* @param pSuite The suite being run at time of failure
* @param pTest The test being run at time of failure
*/
-void add_failure(CU_pFailureRecord* ppFailure,
- CU_pRunSummary pRunSummary,
- unsigned int uiLineNumber,
- char szCondition[],
- char szFileName[],
- CU_pSuite pSuite,
- CU_pTest pTest)
+static void add_failure(CU_pFailureRecord* ppFailure,
+ CU_pRunSummary pRunSummary,
+ CU_FailureType type,
+ unsigned int uiLineNumber,
+ const char *szCondition,
+ const char *szFileName,
+ CU_pSuite pSuite,
+ CU_pTest pTest)
{
CU_pFailureRecord pFailureNew = NULL;
CU_pFailureRecord pTemp = NULL;
@@ -626,6 +713,7 @@
strcpy(pFailureNew->strCondition, szCondition);
}
+ pFailureNew->type = type;
pFailureNew->uiLineNumber = uiLineNumber;
pFailureNew->pTest = pTest;
pFailureNew->pSuite = pSuite;
@@ -654,12 +742,12 @@
* Local function for result set initialization/cleanup.
*/
/*------------------------------------------------------------------------*/
-/** Initialize the run summary information in the
- * specified structure. Resets the run counts to zero,
- * and calls cleanup_failure_list() if failures
- * were recorded by the last test run.
- * Calling this function multiple times, while inefficient,
- * will not cause an error condition.
+/**
+ * Initializes the run summary information in the specified structure.
+ * Resets the run counts to zero, and calls cleanup_failure_list() if
+ * failures were recorded by the last test run. Calling this function
+ * multiple times, while inefficient, will not cause an error condition.
+ *
* @param pRunSummary CU_RunSummary to initialize (non-NULL).
* @param ppFailure The failure record to clean (non-NULL).
* @see CU_clear_previous_results()
@@ -671,11 +759,14 @@
pRunSummary->nSuitesRun = 0;
pRunSummary->nSuitesFailed = 0;
+ pRunSummary->nSuitesInactive = 0;
pRunSummary->nTestsRun = 0;
pRunSummary->nTestsFailed = 0;
+ pRunSummary->nTestsInactive = 0;
pRunSummary->nAsserts = 0;
pRunSummary->nAssertsFailed = 0;
pRunSummary->nFailureRecords = 0;
+ pRunSummary->ElapsedTime = 0.0;
if (NULL != *ppFailure) {
cleanup_failure_list(ppFailure);
@@ -685,9 +776,10 @@
}
/*------------------------------------------------------------------------*/
-/** Free all memory allocated for the linked list of
- * test failure records. pFailure is reset to NULL
- * after its list is cleaned up.
+/**
+ * Frees all memory allocated for the linked list of test failure
+ * records. pFailure is reset to NULL after its list is cleaned up.
+ *
* @param ppFailure Pointer to head of linked list of
* CU_pFailureRecords to clean.
* @see CU_clear_previous_results()
@@ -718,11 +810,14 @@
}
/*------------------------------------------------------------------------*/
-/** Run all tests in a specified suite.
- * Internal function to run all tests in a suite. The suite
- * need not be registered in the test registry to be run.
- * If the CUnit system is in an error condition after running
- * a test, no additional tests are run.
+/**
+ * Runs all tests in a specified suite.
+ * Internal function to run all tests in a suite. The suite need
+ * not be registered in the test registry to be run. Only
+ * suites having their fActive flags set CU_TRUE will actually be
+ * run. If the CUnit framework is in an error condition after
+ * running a test, no additional tests are run.
+ *
* @param pSuite The suite containing the test (non-NULL).
* @param pRunSummary The CU_RunSummary to receive the results (non-NULL).
* @return A CU_ErrorCode indicating the status of the run.
@@ -732,100 +827,170 @@
static CU_ErrorCode run_single_suite(CU_pSuite pSuite, CU_pRunSummary pRunSummary)
{
CU_pTest pTest = NULL;
- CU_ErrorCode result;
+ unsigned int nStartFailures;
+ /* keep track of the last failure BEFORE running the test */
+ CU_pFailureRecord pLastFailure = f_last_failure;
+ CU_ErrorCode result = CUE_SUCCESS;
CU_ErrorCode result2;
assert(NULL != pSuite);
assert(NULL != pRunSummary);
+ nStartFailures = pRunSummary->nFailureRecords;
+
f_pCurTest = NULL;
f_pCurSuite = pSuite;
- CU_set_error(result = CUE_SUCCESS);
- /* call the suite initialization function, if any */
- if ((NULL != pSuite->pInitializeFunc) && (0 != (*pSuite->pInitializeFunc)())) {
- if (NULL != f_pSuiteInitFailureMessageHandler) {
- (*f_pSuiteInitFailureMessageHandler)(pSuite);
- }
- pRunSummary->nSuitesFailed++;
- add_failure(&f_failure_list, &f_run_summary,
- 0, "Suite Initialization failed - Suite Skipped", "CUnit System", pSuite, NULL);
- CU_set_error(result = CUE_SINIT_FAILED);
+ /* run handler for suite start, if any */
+ if (NULL != f_pSuiteStartMessageHandler) {
+ (*f_pSuiteStartMessageHandler)(pSuite);
}
- /* reach here if no suite initialization, or if it succeeded */
- else {
- pTest = pSuite->pTest;
- while ((NULL != pTest) && ((CUE_SUCCESS == result) || (CU_get_error_action() == CUEA_IGNORE))) {
- result2 = run_single_test(pTest, pRunSummary);
- result = (CUE_SUCCESS == result) ? result2 : result;
- pTest = pTest->pNext;
- }
- pRunSummary->nSuitesRun++;
- /* call the suite cleanup function, if any */
- if ((NULL != pSuite->pCleanupFunc) && (0 != (*pSuite->pCleanupFunc)())) {
- if (NULL != f_pSuiteCleanupFailureMessageHandler) {
- (*f_pSuiteCleanupFailureMessageHandler)(pSuite);
+ /* run suite if it's active */
+ if (CU_FALSE != pSuite->fActive) {
+
+ /* run the suite initialization function, if any */
+ if ((NULL != pSuite->pInitializeFunc) && (0 != (*pSuite->pInitializeFunc)())) {
+ /* init function had an error - call handler, if any */
+ if (NULL != f_pSuiteInitFailureMessageHandler) {
+ (*f_pSuiteInitFailureMessageHandler)(pSuite);
}
pRunSummary->nSuitesFailed++;
- add_failure(&f_failure_list, &f_run_summary,
- 0, "Suite cleanup failed.", "CUnit System", pSuite, pTest);
- CU_set_error(CUE_SCLEAN_FAILED);
- result = (CUE_SUCCESS == result) ? CUE_SCLEAN_FAILED : result;
+ add_failure(&f_failure_list, &f_run_summary, CUF_SuiteInitFailed, 0,
+ _("Suite Initialization failed - Suite Skipped"),
+ _("CUnit System"), pSuite, NULL);
+ result = CUE_SINIT_FAILED;
+ }
+
+ /* reach here if no suite initialization, or if it succeeded */
+ else {
+ pTest = pSuite->pTest;
+ while ((NULL != pTest) && ((CUE_SUCCESS == result) || (CU_get_error_action() == CUEA_IGNORE))) {
+ if (CU_FALSE != pTest->fActive) {
+ result2 = run_single_test(pTest, pRunSummary);
+ result = (CUE_SUCCESS == result) ? result2 : result;
+ }
+ else {
+ f_run_summary.nTestsInactive++;
+ if (CU_FALSE != f_failure_on_inactive) {
+ add_failure(&f_failure_list, &f_run_summary, CUF_TestInactive,
+ 0, _("Test inactive"), _("CUnit System"), pSuite, pTest);
+ result = CUE_TEST_INACTIVE;
+ }
+ }
+ pTest = pTest->pNext;
+ }
+ pRunSummary->nSuitesRun++;
+
+ /* call the suite cleanup function, if any */
+ if ((NULL != pSuite->pCleanupFunc) && (0 != (*pSuite->pCleanupFunc)())) {
+ if (NULL != f_pSuiteCleanupFailureMessageHandler) {
+ (*f_pSuiteCleanupFailureMessageHandler)(pSuite);
+ }
+ pRunSummary->nSuitesFailed++;
+ add_failure(&f_failure_list, &f_run_summary, CUF_SuiteCleanupFailed,
+ 0, _("Suite cleanup failed."), _("CUnit System"), pSuite, NULL);
+ result = (CUE_SUCCESS == result) ? CUE_SCLEAN_FAILED : result;
+ }
+ }
+ }
+
+ /* otherwise record inactive suite and failure if appropriate */
+ else {
+ f_run_summary.nSuitesInactive++;
+ if (CU_FALSE != f_failure_on_inactive) {
+ add_failure(&f_failure_list, &f_run_summary, CUF_SuiteInactive,
+ 0, _("Suite inactive"), _("CUnit System"), pSuite, NULL);
+ result = CUE_SUITE_INACTIVE;
+ }
+ }
+
+ /* if additional failures have occurred... */
+ if (pRunSummary->nFailureRecords > nStartFailures) {
+ if (NULL != pLastFailure) {
+ pLastFailure = pLastFailure->pNext; /* was a previous failure, so go to next one */
+ }
+ else {
+ pLastFailure = f_failure_list; /* no previous failure - go to 1st one */
}
}
+ else {
+ pLastFailure = NULL; /* no additional failure - set to NULL */
+ }
+
+ /* run handler for suite completion, if any */
+ if (NULL != f_pSuiteCompleteMessageHandler) {
+ (*f_pSuiteCompleteMessageHandler)(pSuite, pLastFailure);
+ }
f_pCurSuite = NULL;
return result;
}
/*------------------------------------------------------------------------*/
-/** Run a specific test.
- * Internal function to run a test case. This includes
- * calling any handler to be run before executing the test,
- * running the test's function (if any), and calling any
- * handler to be run after executing a test.
+/**
+ * Runs a specific test.
+ * Internal function to run a test case. This includes calling
+ * any handler to be run before executing the test, running the
+ * test's function (if any), and calling any handler to be run
+ * after executing a test. Suite initialization and cleanup functions
+ * are not called by this function. A current suite must be set and
+ * active (checked by assertion).
+ *
* @param pTest The test to be run (non-NULL).
* @param pRunSummary The CU_RunSummary to receive the results (non-NULL).
* @return A CU_ErrorCode indicating the status of the run.
* @see CU_run_test() for public interface function.
* @see CU_run_all_tests() for running all suites.
*/
-CU_ErrorCode run_single_test(CU_pTest pTest, CU_pRunSummary pRunSummary)
+static CU_ErrorCode run_single_test(CU_pTest pTest, CU_pRunSummary pRunSummary)
{
volatile unsigned int nStartFailures;
/* keep track of the last failure BEFORE running the test */
volatile CU_pFailureRecord pLastFailure = f_last_failure;
jmp_buf buf;
+ CU_ErrorCode result = CUE_SUCCESS;
assert(NULL != f_pCurSuite);
+ assert(CU_FALSE != f_pCurSuite->fActive);
assert(NULL != pTest);
assert(NULL != pRunSummary);
- nStartFailures = pRunSummary->nAssertsFailed;
+ nStartFailures = pRunSummary->nFailureRecords;
- CU_set_error(CUE_SUCCESS);
f_pCurTest = pTest;
if (NULL != f_pTestStartMessageHandler) {
(*f_pTestStartMessageHandler)(f_pCurTest, f_pCurSuite);
}
- /* set jmp_buf and run test */
- pTest->pJumpBuf = &buf;
- if (0 == setjmp(buf)) {
- if (NULL != pTest->pTestFunc) {
- (*pTest->pTestFunc)();
+ /* run test if it is active */
+ if (CU_FALSE != pTest->fActive) {
+
+ /* set jmp_buf and run test */
+ pTest->pJumpBuf = &buf;
+ if (0 == setjmp(buf)) {
+ if (NULL != pTest->pTestFunc) {
+ (*pTest->pTestFunc)();
+ }
}
- }
- pRunSummary->nTestsRun++;
+ pRunSummary->nTestsRun++;
+ }
+ else {
+ f_run_summary.nTestsInactive++;
+ if (CU_FALSE != f_failure_on_inactive) {
+ add_failure(&f_failure_list, &f_run_summary, CUF_TestInactive,
+ 0, _("Test inactive"), _("CUnit System"), f_pCurSuite, f_pCurTest);
+ }
+ result = CUE_TEST_INACTIVE;
+ }
- /* if additional assertions have failed... */
- if (pRunSummary->nAssertsFailed > nStartFailures) {
+ /* if additional failures have occurred... */
+ if (pRunSummary->nFailureRecords > nStartFailures) {
pRunSummary->nTestsFailed++;
if (NULL != pLastFailure) {
- pLastFailure = pLastFailure->pNext; /* was a failure before - go to next one */
+ pLastFailure = pLastFailure->pNext; /* was a previous failure, so go to next one */
}
else {
pLastFailure = f_failure_list; /* no previous failure - go to 1st one */
@@ -842,7 +1007,7 @@
pTest->pJumpBuf = NULL;
f_pCurTest = NULL;
- return CU_get_error();
+ return result;
}
/** @} */
@@ -850,14 +1015,18 @@
#ifdef CUNIT_BUILD_TESTS
#include "test_cunit.h"
+/** Types of framework events tracked by test system. */
typedef enum TET {
- TEST_START = 1,
+ SUITE_START = 1,
+ TEST_START,
TEST_COMPLETE,
+ SUITE_COMPLETE,
ALL_TESTS_COMPLETE,
SUITE_INIT_FAILED,
SUITE_CLEANUP_FAILED
} TestEventType;
+/** Test event structure for recording details of a framework event. */
typedef struct TE {
TestEventType type;
CU_pSuite pSuite;
@@ -869,19 +1038,24 @@
static int f_nTestEvents = 0;
static pTestEvent f_pFirstEvent = NULL;
+/** Creates & stores a test event record having the specified details. */
static void add_test_event(TestEventType type, CU_pSuite psuite,
CU_pTest ptest, CU_pFailureRecord pfailure)
{
pTestEvent pNewEvent = (pTestEvent)malloc(sizeof(TestEvent));
- pTestEvent pNextEvent = NULL;
+ pTestEvent pNextEvent = f_pFirstEvent;
+ if (NULL == pNewEvent) {
+ fprintf(stderr, "Memory allocation failed in add_test_event().");
+ exit(1);
+ }
+
pNewEvent->type = type;
pNewEvent->pSuite = psuite;
pNewEvent->pTest = ptest;
pNewEvent->pFailure = pfailure;
pNewEvent->pNext = NULL;
- pNextEvent = f_pFirstEvent;
if (pNextEvent) {
while (pNextEvent->pNext) {
pNextEvent = pNextEvent->pNext;
@@ -894,6 +1068,7 @@
++f_nTestEvents;
}
+/** Deallocates all test event data. */
static void clear_test_events(void)
{
pTestEvent pCurrentEvent = f_pFirstEvent;
@@ -909,6 +1084,15 @@
f_nTestEvents = 0;
}
+static void suite_start_handler(const CU_pSuite pSuite)
+{
+ TEST(CU_is_test_running());
+ TEST(pSuite == CU_get_current_suite());
+ TEST(NULL == CU_get_current_test());
+
+ add_test_event(SUITE_START, pSuite, NULL, NULL);
+}
+
static void test_start_handler(const CU_pTest pTest, const CU_pSuite pSuite)
{
TEST(CU_is_test_running());
@@ -928,6 +1112,16 @@
add_test_event(TEST_COMPLETE, pSuite, pTest, pFailure);
}
+static void suite_complete_handler(const CU_pSuite pSuite,
+ const CU_pFailureRecord pFailure)
+{
+ TEST(CU_is_test_running());
+ TEST(pSuite == CU_get_current_suite());
+ TEST(NULL == CU_get_current_test());
+
+ add_test_event(SUITE_COMPLETE, pSuite, NULL, pFailure);
+}
+
static void test_all_complete_handler(const CU_pFailureRecord pFailure)
{
TEST(!CU_is_test_running());
@@ -951,23 +1145,224 @@
add_test_event(SUITE_CLEANUP_FAILED, pSuite, NULL, NULL);
}
-void test_succeed(void) { CU_TEST(CU_TRUE); }
-void test_fail(void) { CU_TEST(CU_FALSE); }
-int suite_succeed(void) { return 0; }
-int suite_fail(void) { return 1; }
+/**
+ * Centralize test result testing - we're going to do it a lot!
+ * This is messy since we want to report the calling location upon failure.
+ *
+ * Via calling test functions tests:
+ * CU_get_number_of_suites_run()
+ * CU_get_number_of_suites_failed()
+ * CU_get_number_of_tests_run()
+ * CU_get_number_of_tests_failed()
+ * CU_get_number_of_asserts()
+ * CU_get_number_of_successes()
+ * CU_get_number_of_failures()
+ * CU_get_number_of_failure_records()
+ * CU_get_run_summary()
+ */
+static void do_test_results(unsigned int nSuitesRun,
+ unsigned int nSuitesFailed,
+ unsigned int nSuitesInactive,
+ unsigned int nTestsRun,
+ unsigned int nTestsFailed,
+ unsigned int nTestsInactive,
+ unsigned int nAsserts,
+ unsigned int nSuccesses,
+ unsigned int nFailures,
+ unsigned int nFailureRecords,
+ const char *file,
+ unsigned int line)
+{
+ char msg[500];
+ CU_pRunSummary pRunSummary = NULL;
+
+ if (nSuitesRun == CU_get_number_of_suites_run()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_suites_run() (called from %s:%u)",
+ nSuitesRun, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ if (nSuitesInactive == CU_get_number_of_suites_inactive()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_suites_inactive() (called from %s:%u)",
+ nSuitesInactive, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ if (nSuitesFailed == CU_get_number_of_suites_failed()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_suites_failed() (called from %s:%u)",
+ nSuitesFailed, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ if (nTestsRun == CU_get_number_of_tests_run()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_tests_run() (called from %s:%u)",
+ nTestsRun, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ if (nTestsFailed == CU_get_number_of_tests_failed()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_tests_failed() (called from %s:%u)",
+ nTestsFailed, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ if (nTestsInactive == CU_get_number_of_tests_inactive()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_tests_inactive() (called from %s:%u)",
+ nTestsInactive, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ if (nAsserts == CU_get_number_of_asserts()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_asserts() (called from %s:%u)",
+ nAsserts, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ if (nSuccesses == CU_get_number_of_successes()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_successes() (called from %s:%u)",
+ nSuccesses, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ if (nFailures == CU_get_number_of_failures()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_failures() (called from %s:%u)",
+ nFailures, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ if (nFailureRecords == CU_get_number_of_failure_records()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_failure_records() (called from %s:%u)",
+ nFailureRecords, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ pRunSummary = CU_get_run_summary();
+
+ if (pRunSummary->nSuitesRun == CU_get_number_of_suites_run()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_suites_run() (called from %s:%u)",
+ pRunSummary->nSuitesRun, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ if (pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_suites_failed() (called from %s:%u)",
+ pRunSummary->nSuitesFailed, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ if (pRunSummary->nTestsRun == CU_get_number_of_tests_run()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_tests_run() (called from %s:%u)",
+ pRunSummary->nTestsRun, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ if (pRunSummary->nTestsFailed == CU_get_number_of_tests_failed()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_tests_failed() (called from %s:%u)",
+ pRunSummary->nTestsFailed, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ if (pRunSummary->nAsserts == CU_get_number_of_asserts()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_asserts() (called from %s:%u)",
+ pRunSummary->nAsserts, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ if (pRunSummary->nAssertsFailed == CU_get_number_of_failures()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_failures() (called from %s:%u)",
+ pRunSummary->nAssertsFailed, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+
+ if (pRunSummary->nFailureRecords == CU_get_number_of_failure_records()) {
+ PASS();
+ } else {
+ snprintf(msg, 499, "%u == CU_get_number_of_failure_records() (called from %s:%u)",
+ pRunSummary->nFailureRecords, file, line);
+ msg[499] = '\0';
+ FAIL(msg);
+ }
+}
+
+#define test_results(nSuitesRun, nSuitesFailed, nSuitesInactive, nTestsRun, nTestsFailed, \
+ nTestsInactive, nAsserts, nSuccesses, nFailures, nFailureRecords) \
+ do_test_results(nSuitesRun, nSuitesFailed, nSuitesInactive, nTestsRun, nTestsFailed, \
+ nTestsInactive, nAsserts, nSuccesses, nFailures, nFailureRecords, \
+ __FILE__, __LINE__)
+
+static void test_succeed(void) { CU_TEST(CU_TRUE); }
+static void test_fail(void) { CU_TEST(CU_FALSE); }
+static int suite_succeed(void) { return 0; }
+static int suite_fail(void) { return 1; }
/*-------------------------------------------------*/
/* tests:
- * CU_set_test_start_handler()
- * CU_set_test_complete_handler()
- * CU_set_all_test_complete_handler()
- * CU_set_suite_init_failure_handler()
- * CU_set_suite_cleanup_failure_handler()
- * CU_get_test_start_handler()
- * CU_get_test_complete_handler()
- * CU_get_all_test_complete_handler()
- * CU_get_suite_init_failure_handler()
- * CU_get_suite_cleanup_failure_handler()
+ * CU_set_suite_start_handler()
+ * CU_set_test_start_handler()
+ * CU_set_test_complete_handler()
+ * CU_set_suite_complete_handler()
+ * CU_set_all_test_complete_handler()
+ * CU_set_suite_init_failure_handler()
+ * CU_set_suite_cleanup_failure_handler()
+ * CU_get_suite_start_handler()
+ * CU_get_test_start_handler()
+ * CU_get_test_complete_handler()
+ * CU_get_suite_complete_handler()
+ * CU_get_all_test_complete_handler()
+ * CU_get_suite_init_failure_handler()
+ * CU_get_suite_cleanup_failure_handler()
+ * CU_is_test_running()
+ * via handlers tests:
+ * CU_get_current_suite()
+ * CU_get_current_test()
*/
static void test_message_handlers(void)
{
@@ -980,13 +1375,14 @@
CU_pTest pTest4 = NULL;
CU_pTest pTest5 = NULL;
pTestEvent pEvent = NULL;
- CU_pRunSummary pRunSummary = NULL;
TEST(!CU_is_test_running());
/* handlers should be NULL on startup */
+ TEST(NULL == CU_get_suite_start_handler());
TEST(NULL == CU_get_test_start_handler());
TEST(NULL == CU_get_test_complete_handler());
+ TEST(NULL == CU_get_suite_complete_handler());
TEST(NULL == CU_get_all_test_complete_handler());
TEST(NULL == CU_get_suite_init_failure_handler());
TEST(NULL == CU_get_suite_cleanup_failure_handler());
@@ -1010,33 +1406,22 @@
TEST(0 == f_nTestEvents);
TEST(NULL == f_pFirstEvent);
- TEST(2 == CU_get_number_of_suites_run());
- TEST(2 == CU_get_number_of_suites_failed());
- TEST(4 == CU_get_number_of_tests_run());
- TEST(2 == CU_get_number_of_tests_failed());
- TEST(4 == CU_get_number_of_asserts());
- TEST(2 == CU_get_number_of_successes());
- TEST(2 == CU_get_number_of_failures());
- TEST(4 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(2,2,0,4,2,0,4,2,2,4);
/* set handlers to local functions */
- CU_set_test_start_handler(test_start_handler);
- CU_set_test_complete_handler(test_complete_handler);
- CU_set_all_test_complete_handler(test_all_complete_handler);
- CU_set_suite_init_failure_handler(suite_init_failure_handler);
- CU_set_suite_cleanup_failure_handler(suite_cleanup_failure_handler);
+ CU_set_suite_start_handler(&suite_start_handler);
+ CU_set_test_start_handler(&test_start_handler);
+ CU_set_test_complete_handler(&test_complete_handler);
+ CU_set_suite_complete_handler(&suite_complete_handler);
+ CU_set_all_test_complete_handler(&test_all_complete_handler);
+ CU_set_suite_init_failure_handler(&suite_init_failure_handler);
+ CU_set_suite_cleanup_failure_handler(&suite_cleanup_failure_handler);
/* confirm handlers set properly */
+ TEST(suite_start_handler == CU_get_suite_start_handler());
TEST(test_start_handler == CU_get_test_start_handler());
TEST(test_complete_handler == CU_get_test_complete_handler());
+ TEST(suite_complete_handler == CU_get_suite_complete_handler());
TEST(test_all_complete_handler == CU_get_all_test_complete_handler());
TEST(suite_init_failure_handler == CU_get_suite_init_failure_handler());
TEST(suite_cleanup_failure_handler == CU_get_suite_cleanup_failure_handler());
@@ -1045,9 +1430,15 @@
clear_test_events();
CU_run_all_tests();
- TEST(11 == f_nTestEvents);
- if (11 == f_nTestEvents) {
+ TEST(17 == f_nTestEvents);
+ if (17 == f_nTestEvents) {
pEvent = f_pFirstEvent;
+ TEST(SUITE_START == pEvent->type);
+ TEST(pSuite1 == pEvent->pSuite);
+ TEST(NULL == pEvent->pTest);
+ TEST(NULL == pEvent->pFailure);
+
+ pEvent = pEvent->pNext;
TEST(TEST_START == pEvent->type);
TEST(pSuite1 == pEvent->pSuite);
TEST(pTest1 == pEvent->pTest);
@@ -1084,12 +1475,36 @@
TEST(NULL == pEvent->pFailure);
pEvent = pEvent->pNext;
+ TEST(SUITE_COMPLETE == pEvent->type);
+ TEST(pSuite1 == pEvent->pSuite);
+ TEST(NULL == pEvent->pTest);
+ TEST(NULL != pEvent->pFailure);
+
+ pEvent = pEvent->pNext;
+ TEST(SUITE_START == pEvent->type);
+ TEST(pSuite2 == pEvent->pSuite);
+ TEST(NULL == pEvent->pTest);
+ TEST(NULL == pEvent->pFailure);
+
+ pEvent = pEvent->pNext;
TEST(SUITE_INIT_FAILED == pEvent->type);
TEST(pSuite2 == pEvent->pSuite);
TEST(NULL == pEvent->pTest);
TEST(NULL == pEvent->pFailure);
pEvent = pEvent->pNext;
+ TEST(SUITE_COMPLETE == pEvent->type);
+ TEST(pSuite2 == pEvent->pSuite);
+ TEST(NULL == pEvent->pTest);
+ TEST(NULL != pEvent->pFailure);
+
+ pEvent = pEvent->pNext;
+ TEST(SUITE_START == pEvent->type);
+ TEST(pSuite3 == pEvent->pSuite);
+ TEST(NULL == pEvent->pTest);
+ TEST(NULL == pEvent->pFailure);
+
+ pEvent = pEvent->pNext;
TEST(TEST_START == pEvent->type);
TEST(pSuite3 == pEvent->pSuite);
TEST(pTest5 == pEvent->pTest);
@@ -1108,6 +1523,12 @@
TEST(NULL == pEvent->pFailure);
pEvent = pEvent->pNext;
+ TEST(SUITE_COMPLETE == pEvent->type);
+ TEST(pSuite3 == pEvent->pSuite);
+ TEST(NULL == pEvent->pTest);
+ TEST(NULL != pEvent->pFailure);
+
+ pEvent = pEvent->pNext;
TEST(ALL_TESTS_COMPLETE == pEvent->type);
TEST(NULL == pEvent->pSuite);
TEST(NULL == pEvent->pTest);
@@ -1121,32 +1542,21 @@
TEST(pEvent->pFailure == CU_get_failure_list());
}
- TEST(2 == CU_get_number_of_suites_run());
- TEST(2 == CU_get_number_of_suites_failed());
- TEST(4 == CU_get_number_of_tests_run());
- TEST(2 == CU_get_number_of_tests_failed());
- TEST(4 == CU_get_number_of_asserts());
- TEST(2 == CU_get_number_of_successes());
- TEST(2 == CU_get_number_of_failures());
- TEST(4 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(2,2,0,4,2,0,4,2,2,4);
/* clear handlers and run again */
+ CU_set_suite_start_handler(NULL);
CU_set_test_start_handler(NULL);
CU_set_test_complete_handler(NULL);
+ CU_set_suite_complete_handler(NULL);
CU_set_all_test_complete_handler(NULL);
CU_set_suite_init_failure_handler(NULL);
CU_set_suite_cleanup_failure_handler(NULL);
+ TEST(NULL == CU_get_suite_start_handler());
TEST(NULL == CU_get_test_start_handler());
TEST(NULL == CU_get_test_complete_handler());
+ TEST(NULL == CU_get_suite_complete_handler());
TEST(NULL == CU_get_all_test_complete_handler());
TEST(NULL == CU_get_suite_init_failure_handler());
TEST(NULL == CU_get_suite_cleanup_failure_handler());
@@ -1156,22 +1566,7 @@
TEST(0 == f_nTestEvents);
TEST(NULL == f_pFirstEvent);
- TEST(2 == CU_get_number_of_suites_run());
- TEST(2 == CU_get_number_of_suites_failed());
- TEST(4 == CU_get_number_of_tests_run());
- TEST(2 == CU_get_number_of_tests_failed());
- TEST(4 == CU_get_number_of_asserts());
- TEST(2 == CU_get_number_of_successes());
- TEST(2 == CU_get_number_of_failures());
- TEST(4 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(2,2,0,4,2,0,4,2,2,4);
CU_cleanup_registry();
clear_test_events();
@@ -1186,15 +1581,126 @@
f_exit_called = CU_TRUE;
}
+
/*-------------------------------------------------*/
-static void test_CU_run_all_tests(void)
+static void test_CU_fail_on_inactive(void)
{
CU_pSuite pSuite1 = NULL;
CU_pSuite pSuite2 = NULL;
- CU_pSuite pSuite3 = NULL;
- CU_pSuite pSuite4 = NULL;
- CU_pRunSummary pRunSummary = NULL;
-
+ CU_pTest pTest1 = NULL;
+ CU_pTest pTest2 = NULL;
+ CU_pTest pTest3 = NULL;
+ CU_pTest pTest4 = NULL;
+
+ CU_set_error_action(CUEA_IGNORE);
+ CU_initialize_registry();
+
+ /* register some suites and tests */
+ CU_initialize_registry();
+ pSuite1 = CU_add_suite("suite1", NULL, NULL);
+ pTest1 = CU_add_test(pSuite1, "test1", test_succeed);
+ pTest2 = CU_add_test(pSuite1, "test2", test_fail);
+ pSuite2 = CU_add_suite("suite2", suite_fail, NULL);
+ pTest3 = CU_add_test(pSuite2, "test3", test_succeed);
+ pTest4 = CU_add_test(pSuite2, "test4", test_succeed);
+
+ /* test initial conditions */
+ TEST(CU_TRUE == CU_get_fail_on_inactive());
+ TEST(CU_TRUE == pSuite1->fActive);
+ TEST(CU_TRUE == pSuite2->fActive);
+ TEST(CU_TRUE == pTest1->fActive);
+ TEST(CU_TRUE == pTest2->fActive);
+ TEST(CU_TRUE == pTest3->fActive);
+ TEST(CU_TRUE == pTest4->fActive);
+
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CU_TRUE == CU_get_fail_on_inactive());
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* all suites/tests active */
+ test_results(1,1,0,2,1,0,2,1,1,2);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CU_FALSE == CU_get_fail_on_inactive());
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests());
+ test_results(1,1,0,2,1,0,2,1,1,2);
+
+ CU_set_suite_active(pSuite1, CU_FALSE);
+ CU_set_suite_active(pSuite2, CU_FALSE);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_SUITE_INACTIVE == CU_run_all_tests()); /* all suites inactive */
+ test_results(0,0,2,0,0,0,0,0,0,2);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SUCCESS == CU_run_all_tests());
+ test_results(0,0,2,0,0,0,0,0,0,0);
+ CU_set_suite_active(pSuite1, CU_TRUE);
+ CU_set_suite_active(pSuite2, CU_TRUE);
+
+ CU_set_suite_active(pSuite2, CU_FALSE);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_SUITE_INACTIVE == CU_run_all_tests()); /* some suites inactive */
+ test_results(1,0,1,2,1,0,2,1,1,2);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SUCCESS == CU_run_all_tests());
+ test_results(1,0,1,2,1,0,2,1,1,1);
+ CU_set_suite_active(pSuite2, CU_TRUE);
+
+ CU_set_test_active(pTest1, CU_FALSE);
+ CU_set_test_active(pTest2, CU_FALSE);
+ CU_set_test_active(pTest3, CU_FALSE);
+ CU_set_test_active(pTest4, CU_FALSE);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_all_tests()); /* all tests inactive */
+ test_results(1,1,0,0,0,2,0,0,0,3);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests());
+ test_results(1,1,0,0,0,2,0,0,0,1);
+ CU_set_test_active(pTest1, CU_TRUE);
+ CU_set_test_active(pTest2, CU_TRUE);
+ CU_set_test_active(pTest3, CU_TRUE);
+ CU_set_test_active(pTest4, CU_TRUE);
+
+ CU_set_test_active(pTest2, CU_FALSE);
+ CU_set_test_active(pTest4, CU_FALSE);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_all_tests()); /* some tests inactive */
+ test_results(1,1,0,1,0,1,1,1,0,2);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests());
+ test_results(1,1,0,1,0,1,1,1,0,1);
+ CU_set_test_active(pTest2, CU_TRUE);
+ CU_set_test_active(pTest4, CU_TRUE);
+
+ CU_set_suite_active(pSuite2, CU_FALSE);
+ CU_set_test_active(pTest1, CU_FALSE);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_all_tests()); /* some suites & tests inactive */
+ test_results(1,0,1,1,1,1,1,0,1,3);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SUCCESS == CU_run_all_tests());
+ test_results(1,0,1,1,1,1,1,0,1,1);
+ CU_set_suite_active(pSuite2, CU_TRUE);
+ CU_set_test_active(pTest1, CU_TRUE);
+
+ /* clean up */
+ CU_cleanup_registry();
+}
+
+/*-------------------------------------------------*/
+static void test_CU_run_all_tests(void)
+{
+ CU_pSuite pSuite1 = NULL;
+ CU_pSuite pSuite2 = NULL;
+ CU_pSuite pSuite3 = NULL;
+ CU_pSuite pSuite4 = NULL;
+ CU_pTest pTest1 = NULL;
+ CU_pTest pTest2 = NULL;
+ CU_pTest pTest3 = NULL;
+ CU_pTest pTest4 = NULL;
+ CU_pTest pTest5 = NULL;
+ CU_pTest pTest6 = NULL;
+ CU_pTest pTest7 = NULL;
+ CU_pTest pTest8 = NULL;
+ CU_pTest pTest9 = NULL;
+ CU_pTest pTest10 = NULL;
+
/* error - uninitialized registry (CUEA_IGNORE) */
CU_cleanup_registry();
CU_set_error_action(CUEA_IGNORE);
@@ -1218,131 +1724,349 @@
TEST(CU_TRUE == f_exit_called);
f_exit_called = CU_FALSE;
- /* run with no tests registered */
- CU_set_error_action(CUEA_IGNORE);
+ /* run with no suites or tests registered */
CU_initialize_registry();
- clear_test_events();
+
+ CU_set_error_action(CUEA_IGNORE);
TEST(CUE_SUCCESS == CU_run_all_tests());
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(0 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(0 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(0 == CU_get_number_of_failure_records());
- TEST(NULL == CU_get_failure_list());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,0,0,0,0,0,0,0,0,0);
/* register some suites and tests */
CU_initialize_registry();
pSuite1 = CU_add_suite("suite1", NULL, NULL);
- CU_add_test(pSuite1, "test1", test_succeed);
- CU_add_test(pSuite1, "test2", test_fail);
- CU_add_test(pSuite1, "test3", test_succeed);
- CU_add_test(pSuite1, "test4", test_fail);
- CU_add_test(pSuite1, "test5", test_succeed);
+ pTest1 = CU_add_test(pSuite1, "test1", test_succeed);
+ pTest2 = CU_add_test(pSuite1, "test2", test_fail);
+ pTest3 = CU_add_test(pSuite1, "test1", test_succeed); /* duplicate test name OK */
+ pTest4 = CU_add_test(pSuite1, "test4", test_fail);
+ pTest5 = CU_add_test(pSuite1, "test1", test_succeed); /* duplicate test name OK */
pSuite2 = CU_add_suite("suite2", suite_fail, NULL);
- CU_add_test(pSuite2, "test6", test_succeed);
- CU_add_test(pSuite2, "test7", test_succeed);
- pSuite3 = CU_add_suite("suite3", NULL, NULL);
- CU_add_test(pSuite3, "test8", test_fail);
- CU_add_test(pSuite3, "test9", test_succeed);
+ pTest6 = CU_add_test(pSuite2, "test6", test_succeed);
+ pTest7 = CU_add_test(pSuite2, "test7", test_succeed);
+ pSuite3 = CU_add_suite("suite1", NULL, NULL); /* duplicate suite name OK */
+ pTest8 = CU_add_test(pSuite3, "test8", test_fail);
+ pTest9 = CU_add_test(pSuite3, "test9", test_succeed);
pSuite4 = CU_add_suite("suite4", NULL, suite_fail);
- CU_add_test(pSuite4, "test10", test_succeed);
+ pTest10 = CU_add_test(pSuite4, "test10", test_succeed);
- TEST_FATAL(CUE_SUCCESS == CU_get_error());
+ TEST_FATAL(4 == CU_get_registry()->uiNumberOfSuites);
+ TEST_FATAL(10 == CU_get_registry()->uiNumberOfTests);
/* run all tests (CUEA_IGNORE) */
- clear_test_events();
CU_set_error_action(CUEA_IGNORE);
- TEST(CUE_SINIT_FAILED == CU_run_all_tests());
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* all suites/tests active */
+ test_results(3,2,0,8,3,0,8,5,3,5);
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(3 == CU_get_number_of_suites_run());
- TEST(2 == CU_get_number_of_suites_failed());
- TEST(8 == CU_get_number_of_tests_run());
- TEST(3 == CU_get_number_of_tests_failed());
- TEST(8 == CU_get_number_of_asserts());
- TEST(5 == CU_get_number_of_successes());
- TEST(3 == CU_get_number_of_failures());
- TEST(5 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ CU_set_suite_active(pSuite1, CU_FALSE);
+ CU_set_suite_active(pSuite2, CU_FALSE);
+ CU_set_suite_active(pSuite3, CU_FALSE);
+ CU_set_suite_active(pSuite4, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SUCCESS == CU_run_all_tests()); /* suites inactive */
+ test_results(0,0,4,0,0,0,0,0,0,0);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_SUITE_INACTIVE == CU_run_all_tests());
+ test_results(0,0,4,0,0,0,0,0,0,4);
+
+ CU_set_suite_active(pSuite1, CU_FALSE);
+ CU_set_suite_active(pSuite2, CU_TRUE);
+ CU_set_suite_active(pSuite3, CU_TRUE);
+ CU_set_suite_active(pSuite4, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* some suites inactive */
+ test_results(1,1,2,2,1,0,2,1,1,2);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_SUITE_INACTIVE == CU_run_all_tests());
+ test_results(1,1,2,2,1,0,2,1,1,4);
+
+ CU_set_suite_active(pSuite1, CU_TRUE);
+ CU_set_suite_active(pSuite2, CU_TRUE);
+ CU_set_suite_active(pSuite3, CU_TRUE);
+ CU_set_suite_active(pSuite4, CU_TRUE);
+
+ CU_set_test_active(pTest1, CU_FALSE);
+ CU_set_test_active(pTest2, CU_FALSE);
+ CU_set_test_active(pTest3, CU_FALSE);
+ CU_set_test_active(pTest4, CU_FALSE);
+ CU_set_test_active(pTest5, CU_FALSE);
+ CU_set_test_active(pTest6, CU_FALSE);
+ CU_set_test_active(pTest7, CU_FALSE);
+ CU_set_test_active(pTest8, CU_FALSE);
+ CU_set_test_active(pTest9, CU_FALSE);
+ CU_set_test_active(pTest10, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* no tests active */
+ test_results(3,2,0,0,0,8,0,0,0,2);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_all_tests());
+ test_results(3,2,0,0,0,8,0,0,0,10);
+
+ CU_set_test_active(pTest1, CU_TRUE);
+ CU_set_test_active(pTest2, CU_FALSE);
+ CU_set_test_active(pTest3, CU_TRUE);
+ CU_set_test_active(pTest4, CU_FALSE);
+ CU_set_test_active(pTest5, CU_TRUE);
+ CU_set_test_active(pTest6, CU_FALSE);
+ CU_set_test_active(pTest7, CU_TRUE);
+ CU_set_test_active(pTest8, CU_FALSE);
+ CU_set_test_active(pTest9, CU_TRUE);
+ CU_set_test_active(pTest10, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* some tests active */
+ test_results(3,2,0,4,0,4,4,4,0,2);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_all_tests());
+ test_results(3,2,0,4,0,4,4,4,0,6);
+
+ CU_set_test_active(pTest1, CU_TRUE);
+ CU_set_test_active(pTest2, CU_TRUE);
+ CU_set_test_active(pTest3, CU_TRUE);
+ CU_set_test_active(pTest4, CU_TRUE);
+ CU_set_test_active(pTest5, CU_TRUE);
+ CU_set_test_active(pTest6, CU_TRUE);
+ CU_set_test_active(pTest7, CU_TRUE);
+ CU_set_test_active(pTest8, CU_TRUE);
+ CU_set_test_active(pTest9, CU_TRUE);
+ CU_set_test_active(pTest10, CU_TRUE);
+
+ CU_set_suite_initfunc(pSuite1, &suite_fail);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* change a suite init function */
+ CU_set_suite_initfunc(pSuite1, NULL);
+ test_results(2,3,0,3,1,0,3,2,1,4);
+
+ CU_set_suite_cleanupfunc(pSuite4, NULL);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* change a suite cleanup function */
+ CU_set_suite_cleanupfunc(pSuite4, &suite_fail);
+ test_results(3,1,0,8,3,0,8,5,3,4);
+
+ CU_set_test_func(pTest2, &test_succeed);
+ CU_set_test_func(pTest4, &test_succeed);
+ CU_set_test_func(pTest8, &test_succeed);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* change a test function */
+ CU_set_test_func(pTest2, &test_fail);
+ CU_set_test_func(pTest4, &test_fail);
+ CU_set_test_func(pTest8, &test_fail);
+ test_results(3,2,0,8,0,0,8,8,0,2);
/* run all tests (CUEA_FAIL) */
- clear_test_events();
CU_set_error_action(CUEA_FAIL);
- TEST(CUE_SINIT_FAILED == CU_run_all_tests());
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* all suites active */
+ test_results(1,1,0,5,2,0,5,3,2,3);
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(1 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(5 == CU_get_number_of_tests_run());
- TEST(2 == CU_get_number_of_tests_failed());
- TEST(5 == CU_get_number_of_asserts());
- TEST(3 == CU_get_number_of_successes());
- TEST(2 == CU_get_number_of_failures());
- TEST(3 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ CU_set_suite_active(pSuite1, CU_TRUE);
+ CU_set_suite_active(pSuite2, CU_FALSE);
+ CU_set_suite_active(pSuite3, CU_FALSE);
+ CU_set_suite_active(pSuite4, CU_TRUE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SCLEAN_FAILED == CU_run_all_tests()); /* some suites inactive */
+ test_results(2,1,2,6,2,0,6,4,2,3);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_SUITE_INACTIVE == CU_run_all_tests());
+ test_results(1,0,1,5,2,0,5,3,2,3);
+
+ CU_set_suite_active(pSuite1, CU_TRUE);
+ CU_set_suite_active(pSuite2, CU_TRUE);
+ CU_set_suite_active(pSuite3, CU_TRUE);
+ CU_set_suite_active(pSuite4, CU_TRUE);
+
+ CU_set_test_active(pTest1, CU_FALSE);
+ CU_set_test_active(pTest2, CU_FALSE);
+ CU_set_test_active(pTest3, CU_FALSE);
+ CU_set_test_active(pTest4, CU_FALSE);
+ CU_set_test_active(pTest5, CU_FALSE);
+ CU_set_test_active(pTest6, CU_FALSE);
+ CU_set_test_active(pTest7, CU_FALSE);
+ CU_set_test_active(pTest8, CU_FALSE);
+ CU_set_test_active(pTest9, CU_FALSE);
+ CU_set_test_active(pTest10, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* no tests active */
+ test_results(1,1,0,0,0,5,0,0,0,1);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_all_tests());
+ test_results(1,0,0,0,0,1,0,0,0,1);
+
+ CU_set_test_active(pTest1, CU_FALSE);
+ CU_set_test_active(pTest2, CU_TRUE);
+ CU_set_test_active(pTest3, CU_FALSE);
+ CU_set_test_active(pTest4, CU_TRUE);
+ CU_set_test_active(pTest5, CU_FALSE);
+ CU_set_test_active(pTest6, CU_TRUE);
+ CU_set_test_active(pTest7, CU_FALSE);
+ CU_set_test_active(pTest8, CU_TRUE);
+ CU_set_test_active(pTest9, CU_FALSE);
+ CU_set_test_active(pTest10, CU_TRUE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* some tests active */
+ test_results(1,1,0,2,2,3,2,0,2,3);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_all_tests());
+ test_results(1,0,0,0,0,1,0,0,0,1);
+
+ CU_set_test_active(pTest1, CU_TRUE);
+ CU_set_test_active(pTest2, CU_TRUE);
+ CU_set_test_active(pTest3, CU_TRUE);
+ CU_set_test_active(pTest4, CU_TRUE);
+ CU_set_test_active(pTest5, CU_TRUE);
+ CU_set_test_active(pTest6, CU_TRUE);
+ CU_set_test_active(pTest7, CU_TRUE);
+ CU_set_test_active(pTest8, CU_TRUE);
+ CU_set_test_active(pTest9, CU_TRUE);
+ CU_set_test_active(pTest10, CU_TRUE);
+
+ CU_set_suite_initfunc(pSuite2, NULL);
+ TEST(CUE_SCLEAN_FAILED == CU_run_all_tests()); /* change a suite init function */
+ CU_set_suite_initfunc(pSuite2, &suite_fail);
+ test_results(4,1,0,10,3,0,10,7,3,4);
+
+ CU_set_suite_cleanupfunc(pSuite1, &suite_fail);
+ TEST(CUE_SCLEAN_FAILED == CU_run_all_tests()); /* change a suite cleanup function */
+ CU_set_suite_cleanupfunc(pSuite1, NULL);
+ test_results(1,1,0,5,2,0,5,3,2,3);
+
+ CU_set_test_func(pTest1, &test_fail);
+ CU_set_test_func(pTest3, &test_fail);
+ CU_set_test_func(pTest5, &test_fail);
+ CU_set_test_func(pTest9, &test_fail);
+ CU_set_test_func(pTest10, &test_fail);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* change a test function */
+ CU_set_test_func(pTest1, &test_succeed);
+ CU_set_test_func(pTest3, &test_succeed);
+ CU_set_test_func(pTest5, &test_succeed);
+ CU_set_test_func(pTest9, &test_succeed);
+ CU_set_test_func(pTest10, &test_succeed);
+ test_results(1,1,0,5,5,0,5,0,5,6);
/* run all tests (CUEA_ABORT) */
- clear_test_events();
+ f_exit_called = CU_FALSE;
CU_set_error_action(CUEA_ABORT);
+ CU_set_suite_active(pSuite1, CU_TRUE);
+ CU_set_suite_active(pSuite2, CU_TRUE);
+ CU_set_suite_active(pSuite3, CU_TRUE);
+ CU_set_suite_active(pSuite4, CU_TRUE);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* all suites active */
+ TEST(CU_TRUE == f_exit_called);
+ test_results(1,1,0,5,2,0,5,3,2,3);
+ CU_set_suite_active(pSuite1, CU_FALSE);
+ CU_set_suite_active(pSuite2, CU_FALSE);
+ CU_set_suite_active(pSuite3, CU_FALSE);
+ CU_set_suite_active(pSuite4, CU_FALSE);
f_exit_called = CU_FALSE;
- TEST(CUE_SINIT_FAILED == CU_run_all_tests());
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SUCCESS == CU_run_all_tests()); /* no suites active, so no abort() */
+ TEST(CU_FALSE == f_exit_called);
+ test_results(0,0,4,0,0,0,0,0,0,0);
+ f_exit_called = CU_FALSE;
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_SUITE_INACTIVE == CU_run_all_tests());
TEST(CU_TRUE == f_exit_called);
+ test_results(0,0,1,0,0,0,0,0,0,1);
+
+ CU_set_suite_active(pSuite1, CU_TRUE);
+ CU_set_suite_active(pSuite2, CU_FALSE);
+ CU_set_suite_active(pSuite3, CU_TRUE);
+ CU_set_suite_active(pSuite4, CU_TRUE);
f_exit_called = CU_FALSE;
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SCLEAN_FAILED == CU_run_all_tests()); /* some suites active */
+ TEST(CU_TRUE == f_exit_called);
+ test_results(3,1,1,8,3,0,8,5,3,4);
+ f_exit_called = CU_FALSE;
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_SUITE_INACTIVE == CU_run_all_tests());
+ TEST(CU_TRUE == f_exit_called);
+ test_results(1,0,1,5,2,0,5,3,2,3);
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(1 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(5 == CU_get_number_of_tests_run());
- TEST(2 == CU_get_number_of_tests_failed());
- TEST(5 == CU_get_number_of_asserts());
- TEST(3 == CU_get_number_of_successes());
- TEST(2 == CU_get_number_of_failures());
- TEST(3 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ CU_set_suite_active(pSuite1, CU_TRUE);
+ CU_set_suite_active(pSuite2, CU_TRUE);
+ CU_set_suite_active(pSuite3, CU_TRUE);
+ CU_set_suite_active(pSuite4, CU_TRUE);
+
+ CU_set_test_active(pTest1, CU_FALSE);
+ CU_set_test_active(pTest2, CU_FALSE);
+ CU_set_test_active(pTest3, CU_FALSE);
+ CU_set_test_active(pTest4, CU_FALSE);
+ CU_set_test_active(pTest5, CU_FALSE);
+ CU_set_test_active(pTest6, CU_FALSE);
+ CU_set_test_active(pTest7, CU_FALSE);
+ CU_set_test_active(pTest8, CU_FALSE);
+ CU_set_test_active(pTest9, CU_FALSE);
+ CU_set_test_active(pTest10, CU_FALSE);
+ f_exit_called = CU_FALSE;
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* no tests active */
+ TEST(CU_TRUE == f_exit_called);
+ test_results(1,1,0,0,0,5,0,0,0,1);
+ f_exit_called = CU_FALSE;
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_all_tests());
+ TEST(CU_TRUE == f_exit_called);
+ test_results(1,0,0,0,0,1,0,0,0,1);
+
+ CU_set_test_active(pTest1, CU_FALSE);
+ CU_set_test_active(pTest2, CU_TRUE);
+ CU_set_test_active(pTest3, CU_FALSE);
+ CU_set_test_active(pTest4, CU_TRUE);
+ CU_set_test_active(pTest5, CU_FALSE);
+ CU_set_test_active(pTest6, CU_TRUE);
+ CU_set_test_active(pTest7, CU_FALSE);
+ CU_set_test_active(pTest8, CU_TRUE);
+ CU_set_test_active(pTest9, CU_FALSE);
+ CU_set_test_active(pTest10, CU_TRUE);
+ f_exit_called = CU_FALSE;
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* some tests active */
+ TEST(CU_TRUE == f_exit_called);
+ test_results(1,1,0,2,2,3,2,0,2,3);
+ f_exit_called = CU_FALSE;
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_all_tests());
+ TEST(CU_TRUE == f_exit_called);
+ test_results(1,0,0,0,0,1,0,0,0,1);
+
+ CU_set_test_active(pTest1, CU_TRUE);
+ CU_set_test_active(pTest2, CU_TRUE);
+ CU_set_test_active(pTest3, CU_TRUE);
+ CU_set_test_active(pTest4, CU_TRUE);
+ CU_set_test_active(pTest5, CU_TRUE);
+ CU_set_test_active(pTest6, CU_TRUE);
+ CU_set_test_active(pTest7, CU_TRUE);
+ CU_set_test_active(pTest8, CU_TRUE);
+ CU_set_test_active(pTest9, CU_TRUE);
+ CU_set_test_active(pTest10, CU_TRUE);
+
+ f_exit_called = CU_FALSE;
+ CU_set_suite_initfunc(pSuite1, &suite_fail);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* change a suite init function */
+ CU_set_suite_initfunc(pSuite1, NULL);
+ TEST(CU_TRUE == f_exit_called);
+ test_results(0,1,0,0,0,0,0,0,0,1);
+
+ f_exit_called = CU_FALSE;
+ CU_set_suite_cleanupfunc(pSuite1, &suite_fail);
+ TEST(CUE_SCLEAN_FAILED == CU_run_all_tests()); /* change a suite cleanup function */
+ CU_set_suite_cleanupfunc(pSuite1, NULL);
+ TEST(CU_TRUE == f_exit_called);
+ test_results(1,1,0,5,2,0,5,3,2,3);
+
+ f_exit_called = CU_FALSE;
+ CU_set_test_func(pTest1, &test_fail);
+ CU_set_test_func(pTest3, &test_fail);
+ CU_set_test_func(pTest5, &test_fail);
+ CU_set_test_func(pTest9, &test_fail);
+ CU_set_test_func(pTest10, &test_fail);
+ TEST(CUE_SINIT_FAILED == CU_run_all_tests()); /* change a test function */
+ CU_set_test_func(pTest1, &test_succeed);
+ CU_set_test_func(pTest3, &test_succeed);
+ CU_set_test_func(pTest5, &test_succeed);
+ CU_set_test_func(pTest9, &test_succeed);
+ CU_set_test_func(pTest10, &test_succeed);
+ TEST(CU_TRUE == f_exit_called);
+ test_results(1,1,0,5,5,0,5,0,5,6);
/* clean up after testing */
CU_set_error_action(CUEA_IGNORE);
CU_cleanup_registry();
- clear_test_events();
}
/*-------------------------------------------------*/
@@ -1352,7 +2076,15 @@
CU_pSuite pSuite2 = NULL;
CU_pSuite pSuite3 = NULL;
CU_pSuite pSuite4 = NULL;
- CU_pRunSummary pRunSummary = NULL;
+ CU_pTest pTest1 = NULL;
+ CU_pTest pTest2 = NULL;
+ CU_pTest pTest3 = NULL;
+ CU_pTest pTest4 = NULL;
+ CU_pTest pTest5 = NULL;
+ CU_pTest pTest6 = NULL;
+ CU_pTest pTest7 = NULL;
+ CU_pTest pTest8 = NULL;
+ CU_pTest pTest9 = NULL;
/* error - NULL suite (CUEA_IGNORE) */
CU_set_error_action(CUEA_IGNORE);
@@ -1377,298 +2109,241 @@
/* register some suites and tests */
CU_initialize_registry();
pSuite1 = CU_add_suite("suite1", NULL, NULL);
- CU_add_test(pSuite1, "test1", test_succeed);
- CU_add_test(pSuite1, "test2", test_fail);
- CU_add_test(pSuite1, "test3", test_succeed);
- CU_add_test(pSuite1, "test4", test_fail);
- CU_add_test(pSuite1, "test5", test_succeed);
- pSuite2 = CU_add_suite("suite2", suite_fail, NULL);
- CU_add_test(pSuite2, "test6", test_succeed);
- CU_add_test(pSuite2, "test7", test_succeed);
+ pTest1 = CU_add_test(pSuite1, "test1", test_succeed);
+ pTest2 = CU_add_test(pSuite1, "test2", test_fail);
+ pTest3 = CU_add_test(pSuite1, "test3", test_succeed);
+ pTest4 = CU_add_test(pSuite1, "test4", test_fail);
+ pTest5 = CU_add_test(pSuite1, "test5", test_succeed);
+ pSuite2 = CU_add_suite("suite1", suite_fail, NULL); /* duplicate suite name OK */
+ pTest6 = CU_add_test(pSuite2, "test6", test_succeed);
+ pTest7 = CU_add_test(pSuite2, "test7", test_succeed);
pSuite3 = CU_add_suite("suite3", NULL, suite_fail);
- CU_add_test(pSuite3, "test8", test_fail);
- CU_add_test(pSuite3, "test9", test_succeed);
+ pTest8 = CU_add_test(pSuite3, "test8", test_fail);
+ pTest9 = CU_add_test(pSuite3, "test8", test_succeed); /* duplicate test name OK */
pSuite4 = CU_add_suite("suite4", NULL, NULL);
- TEST_FATAL(CUE_SUCCESS == CU_get_error());
+ TEST_FATAL(4 == CU_get_registry()->uiNumberOfSuites);
+ TEST_FATAL(9 == CU_get_registry()->uiNumberOfTests);
/* run each suite (CUEA_IGNORE) */
- clear_test_events();
CU_set_error_action(CUEA_IGNORE);
- TEST(CUE_SUCCESS == CU_run_suite(pSuite1));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(1 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(5 == CU_get_number_of_tests_run());
- TEST(2 == CU_get_number_of_tests_failed());
- TEST(5 == CU_get_number_of_asserts());
- TEST(3 == CU_get_number_of_successes());
- TEST(2 == CU_get_number_of_failures());
- TEST(2 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ TEST(CUE_SUCCESS == CU_run_suite(pSuite1)); /* suites/tests active */
+ test_results(1,0,0,5,2,0,5,3,2,2);
TEST(CUE_SINIT_FAILED == CU_run_suite(pSuite2));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(0 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(0 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,1,0,0,0,0,0,0,0,1);
TEST(CUE_SCLEAN_FAILED == CU_run_suite(pSuite3));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(1 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(2 == CU_get_number_of_tests_run());
- TEST(1 == CU_get_number_of_tests_failed());
- TEST(2 == CU_get_number_of_asserts());
- TEST(1 == CU_get_number_of_successes());
- TEST(1 == CU_get_number_of_failures());
- TEST(2 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(1,1,0,2,1,0,2,1,1,2);
TEST(CUE_SUCCESS == CU_run_suite(pSuite4));
+ test_results(1,0,0,0,0,0,0,0,0,0);
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(0 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(0 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(0 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ CU_set_suite_active(pSuite3, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SUCCESS == CU_run_suite(pSuite3)); /* suite inactive */
+ test_results(0,0,1,0,0,0,0,0,0,0);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_SUITE_INACTIVE == CU_run_suite(pSuite3));
+ test_results(0,0,1,0,0,0,0,0,0,1);
+ CU_set_suite_active(pSuite3, CU_TRUE);
+
+ CU_set_test_active(pTest1, CU_FALSE);
+ CU_set_test_active(pTest2, CU_FALSE);
+ CU_set_test_active(pTest3, CU_FALSE);
+ CU_set_test_active(pTest4, CU_FALSE);
+ CU_set_test_active(pTest5, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SUCCESS == CU_run_suite(pSuite1)); /* all tests inactive */
+ test_results(1,0,0,0,0,5,0,0,0,0);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_suite(pSuite1));
+ test_results(1,0,0,0,0,5,0,0,0,5);
+
+ CU_set_test_active(pTest1, CU_TRUE);
+ CU_set_test_active(pTest2, CU_FALSE);
+ CU_set_test_active(pTest3, CU_TRUE);
+ CU_set_test_active(pTest4, CU_FALSE);
+ CU_set_test_active(pTest5, CU_TRUE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SUCCESS == CU_run_suite(pSuite1)); /* some tests inactive */
+ test_results(1,0,0,3,0,2,3,3,0,0);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_suite(pSuite1));
+ test_results(1,0,0,3,0,2,3,3,0,2);
+ CU_set_test_active(pTest2, CU_TRUE);
+ CU_set_test_active(pTest4, CU_TRUE);
+
+ CU_set_suite_initfunc(pSuite1, &suite_fail);
+ TEST(CUE_SINIT_FAILED == CU_run_suite(pSuite1)); /* change a suite init function */
+ CU_set_suite_initfunc(pSuite1, NULL);
+ test_results(0,1,0,0,0,0,0,0,0,1);
+
+ CU_set_suite_cleanupfunc(pSuite1, &suite_fail);
+ TEST(CUE_SCLEAN_FAILED == CU_run_suite(pSuite1)); /* change a suite cleanup function */
+ CU_set_suite_cleanupfunc(pSuite1, NULL);
+ test_results(1,1,0,5,2,0,5,3,2,3);
+
+ CU_set_test_func(pTest1, &test_fail);
+ CU_set_test_func(pTest3, &test_fail);
+ CU_set_test_func(pTest5, &test_fail);
+ TEST(CUE_SUCCESS == CU_run_suite(pSuite1)); /* change a test function */
+ CU_set_test_func(pTest1, &test_succeed);
+ CU_set_test_func(pTest3, &test_succeed);
+ CU_set_test_func(pTest5, &test_succeed);
+ test_results(1,0,0,5,5,0,5,0,5,5);
/* run each suite (CUEA_FAIL) */
- clear_test_events();
CU_set_error_action(CUEA_FAIL);
- TEST(CUE_SUCCESS == CU_run_suite(pSuite1));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(1 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(5 == CU_get_number_of_tests_run());
- TEST(2 == CU_get_number_of_tests_failed());
- TEST(5 == CU_get_number_of_asserts());
- TEST(3 == CU_get_number_of_successes());
- TEST(2 == CU_get_number_of_failures());
- TEST(2 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ TEST(CUE_SUCCESS == CU_run_suite(pSuite1)); /* suite active */
+ test_results(1,0,0,5,2,0,5,3,2,2);
TEST(CUE_SINIT_FAILED == CU_run_suite(pSuite2));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(0 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(0 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,1,0,0,0,0,0,0,0,1);
TEST(CUE_SCLEAN_FAILED == CU_run_suite(pSuite3));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(1 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(2 == CU_get_number_of_tests_run());
- TEST(1 == CU_get_number_of_tests_failed());
- TEST(2 == CU_get_number_of_asserts());
- TEST(1 == CU_get_number_of_successes());
- TEST(1 == CU_get_number_of_failures());
- TEST(2 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(1,1,0,2,1,0,2,1,1,2);
TEST(CUE_SUCCESS == CU_run_suite(pSuite4));
+ test_results(1,0,0,0,0,0,0,0,0,0);
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(0 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(0 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(0 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ CU_set_suite_active(pSuite1, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SUCCESS == CU_run_suite(pSuite1)); /* suite inactive */
+ test_results(0,0,1,0,0,0,0,0,0,0);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_SUITE_INACTIVE == CU_run_suite(pSuite1));
+ test_results(0,0,1,0,0,0,0,0,0,1);
+ CU_set_suite_active(pSuite1, CU_TRUE);
+
+ CU_set_test_active(pTest8, CU_FALSE);
+ CU_set_test_active(pTest9, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SCLEAN_FAILED == CU_run_suite(pSuite3)); /* all tests inactive */
+ test_results(1,1,0,0,0,2,0,0,0,1);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_suite(pSuite3));
+ test_results(1,1,0,0,0,1,0,0,0,2);
+
+ CU_set_test_active(pTest8, CU_TRUE);
+ CU_set_test_active(pTest9, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SCLEAN_FAILED == CU_run_suite(pSuite3)); /* some tests inactive */
+ test_results(1,1,0,1,1,1,1,0,1,2);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_suite(pSuite3));
+ test_results(1,1,0,1,1,1,1,0,1,3);
+ CU_set_test_active(pTest9, CU_TRUE);
+
+ CU_set_suite_initfunc(pSuite2, NULL);
+ TEST(CUE_SUCCESS == CU_run_suite(pSuite2)); /* change a suite init function */
+ CU_set_suite_initfunc(pSuite2, &suite_fail);
+ test_results(1,0,0,2,0,0,2,2,0,0);
+
+ CU_set_suite_cleanupfunc(pSuite1, &suite_fail);
+ TEST(CUE_SCLEAN_FAILED == CU_run_suite(pSuite1)); /* change a suite cleanup function */
+ CU_set_suite_cleanupfunc(pSuite1, NULL);
+ test_results(1,1,0,5,2,0,5,3,2,3);
+
+ CU_set_test_func(pTest2, &test_succeed);
+ CU_set_test_func(pTest4, &test_succeed);
+ TEST(CUE_SUCCESS == CU_run_suite(pSuite1)); /* change a test function */
+ CU_set_test_func(pTest2, &test_fail);
+ CU_set_test_func(pTest4, &test_fail);
+ test_results(1,0,0,5,0,0,5,5,0,0);
/* run each suite (CUEA_ABORT) */
- clear_test_events();
CU_set_error_action(CUEA_ABORT);
f_exit_called = CU_FALSE;
- TEST(CUE_SUCCESS == CU_run_suite(pSuite1));
+ TEST(CUE_SUCCESS == CU_run_suite(pSuite1)); /* suite active */
TEST(CU_FALSE == f_exit_called);
- f_exit_called = CU_FALSE;
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(1 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(5 == CU_get_number_of_tests_run());
- TEST(2 == CU_get_number_of_tests_failed());
- TEST(5 == CU_get_number_of_asserts());
- TEST(3 == CU_get_number_of_successes());
- TEST(2 == CU_get_number_of_failures());
- TEST(2 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(1,0,0,5,2,0,5,3,2,2);
+ f_exit_called = CU_FALSE;
TEST(CUE_SINIT_FAILED == CU_run_suite(pSuite2));
TEST(CU_TRUE == f_exit_called);
f_exit_called = CU_FALSE;
+ test_results(0,1,0,0,0,0,0,0,0,1);
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(0 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(0 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
-
+ f_exit_called = CU_FALSE;
TEST(CUE_SCLEAN_FAILED == CU_run_suite(pSuite3));
TEST(CU_TRUE == f_exit_called);
- f_exit_called = CU_FALSE;
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(1 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(2 == CU_get_number_of_tests_run());
- TEST(1 == CU_get_number_of_tests_failed());
- TEST(2 == CU_get_number_of_asserts());
- TEST(1 == CU_get_number_of_successes());
- TEST(1 == CU_get_number_of_failures());
- TEST(2 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(1,1,0,2,1,0,2,1,1,2);
+ f_exit_called = CU_FALSE;
TEST(CUE_SUCCESS == CU_run_suite(pSuite4));
TEST(CU_FALSE == f_exit_called);
+ test_results(1,0,0,0,0,0,0,0,0,0);
+
+ CU_set_suite_active(pSuite2, CU_FALSE);
+ f_exit_called = CU_FALSE;
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SUCCESS == CU_run_suite(pSuite2)); /* suite inactive, but not a failure */
+ TEST(CU_FALSE == f_exit_called);
+ test_results(0,0,1,0,0,0,0,0,0,0);
f_exit_called = CU_FALSE;
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_SUITE_INACTIVE == CU_run_suite(pSuite2));
+ TEST(CU_TRUE == f_exit_called);
+ test_results(0,0,1,0,0,0,0,0,0,1);
+ CU_set_suite_active(pSuite2, CU_TRUE);
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(0 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(0 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(0 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ CU_set_test_active(pTest8, CU_FALSE);
+ CU_set_test_active(pTest9, CU_FALSE);
+ f_exit_called = CU_FALSE;
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SCLEAN_FAILED == CU_run_suite(pSuite3)); /* all tests inactive */
+ TEST(CU_TRUE == f_exit_called);
+ test_results(1,1,0,0,0,2,0,0,0,1);
+ f_exit_called = CU_FALSE;
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_suite(pSuite3));
+ TEST(CU_TRUE == f_exit_called);
+ test_results(1,1,0,0,0,1,0,0,0,2);
+
+ CU_set_test_active(pTest8, CU_FALSE);
+ CU_set_test_active(pTest9, CU_TRUE);
+ f_exit_called = CU_FALSE;
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SCLEAN_FAILED == CU_run_suite(pSuite3)); /* some tests inactive */
+ TEST(CU_TRUE == f_exit_called);
+ test_results(1,1,0,1,0,1,1,1,0,1);
+ f_exit_called = CU_FALSE;
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_suite(pSuite3));
+ TEST(CU_TRUE == f_exit_called);
+ test_results(1,1,0,0,0,1,0,0,0,2);
+ CU_set_test_active(pTest8, CU_TRUE);
+
+ f_exit_called = CU_FALSE;
+ CU_set_suite_initfunc(pSuite1, &suite_fail);
+ TEST(CUE_SINIT_FAILED == CU_run_suite(pSuite1)); /* change a suite init function */
+ CU_set_suite_initfunc(pSuite1, NULL);
+ TEST(CU_TRUE == f_exit_called);
+ test_results(0,1,0,0,0,0,0,0,0,1);
+
+ f_exit_called = CU_FALSE;
+ CU_set_suite_cleanupfunc(pSuite1, &suite_fail);
+ TEST(CUE_SCLEAN_FAILED == CU_run_suite(pSuite1)); /* change a suite cleanup function */
+ CU_set_suite_cleanupfunc(pSuite1, NULL);
+ TEST(CU_TRUE == f_exit_called);
+ test_results(1,1,0,5,2,0,5,3,2,3);
+
+ f_exit_called = CU_FALSE;
+ CU_set_test_func(pTest8, &test_succeed);
+ CU_set_test_func(pTest9, &test_fail);
+ TEST(CUE_SCLEAN_FAILED == CU_run_suite(pSuite3)); /* change a test function */
+ CU_set_test_func(pTest8, &test_fail);
+ CU_set_test_func(pTest9, &test_succeed);
+ TEST(CU_TRUE == f_exit_called);
+ test_results(1,1,0,2,1,0,2,1,1,2);
/* clean up after testing */
CU_set_error_action(CUEA_IGNORE);
CU_cleanup_registry();
- clear_test_events();
}
/*-------------------------------------------------*/
@@ -1686,7 +2361,6 @@
CU_pTest pTest7 = NULL;
CU_pTest pTest8 = NULL;
CU_pTest pTest9 = NULL;
- CU_pRunSummary pRunSummary = NULL;
/* register some suites and tests */
CU_initialize_registry();
@@ -1699,11 +2373,12 @@
pSuite2 = CU_add_suite("suite2", suite_fail, NULL);
pTest6 = CU_add_test(pSuite2, "test6", test_succeed);
pTest7 = CU_add_test(pSuite2, "test7", test_succeed);
- pSuite3 = CU_add_suite("suite3", NULL, suite_fail);
+ pSuite3 = CU_add_suite("suite2", NULL, suite_fail); /* duplicate suite name OK */
pTest8 = CU_add_test(pSuite3, "test8", test_fail);
- pTest9 = CU_add_test(pSuite3, "test9", test_succeed);
+ pTest9 = CU_add_test(pSuite3, "test8", test_succeed); /* duplicate test name OK */
- TEST_FATAL(CUE_SUCCESS == CU_get_error());
+ TEST_FATAL(3 == CU_get_registry()->uiNumberOfSuites);
+ TEST_FATAL(9 == CU_get_registry()->uiNumberOfTests);
/* error - NULL suite (CUEA_IGNORE) */
CU_set_error_action(CUEA_IGNORE);
@@ -1766,682 +2441,236 @@
f_exit_called = CU_FALSE;
/* run each test (CUEA_IGNORE) */
- clear_test_events();
CU_set_error_action(CUEA_IGNORE);
- TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest1));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(1 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(0 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest1)); /* all suite/tests active */
+ test_results(0,0,0,1,0,0,1,1,0,0);
TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest2));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(1 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(1 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,0,0,1,1,0,1,0,1,1);
TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest3));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(1 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(0 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,0,0,1,0,0,1,1,0,0);
TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest4));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(1 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(1 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,0,0,1,1,0,1,0,1,1);
TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest5));
+ test_results(0,0,0,1,0,0,1,1,0,0);
+
+ TEST(CUE_SINIT_FAILED == CU_run_test(pSuite2, pTest6));
+ test_results(0,1,0,0,0,0,0,0,0,1);
+
+ TEST(CUE_SINIT_FAILED == CU_run_test(pSuite2, pTest7));
+ test_results(0,1,0,0,0,0,0,0,0,1);
+
+ TEST(CUE_SCLEAN_FAILED == CU_run_test(pSuite3, pTest8));
+ test_results(0,1,0,1,1,0,1,0,1,2);
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(1 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(0 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
-
- TEST(CUE_SINIT_FAILED == CU_run_test(pSuite2, pTest6));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(0 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(0 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
-
- TEST(CUE_SINIT_FAILED == CU_run_test(pSuite2, pTest7));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(0 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(0 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
-
- TEST(CUE_SCLEAN_FAILED == CU_run_test(pSuite3, pTest8));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(1 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(1 == CU_get_number_of_failures());
- TEST(2 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
-
TEST(CUE_SCLEAN_FAILED == CU_run_test(pSuite3, pTest9));
+ test_results(0,1,0,1,0,0,1,1,0,1);
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(1 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ CU_set_suite_active(pSuite1, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SUITE_INACTIVE == CU_run_test(pSuite1, pTest1)); /* suite inactive */
+ test_results(0,0,1,0,0,0,0,0,0,0);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_SUITE_INACTIVE == CU_run_test(pSuite1, pTest1));
+ test_results(0,0,1,0,0,0,0,0,0,1);
+ CU_set_suite_active(pSuite1, CU_TRUE);
+
+ CU_set_test_active(pTest1, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_TEST_INACTIVE == CU_run_test(pSuite1, pTest1)); /* test inactive */
+ test_results(0,0,0,0,0,1,0,0,0,0);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_TEST_INACTIVE == CU_run_test(pSuite1, pTest1));
+ test_results(0,0,0,0,1,1,0,0,0,1);
+ CU_set_test_active(pTest1, CU_TRUE);
+
+ CU_set_suite_initfunc(pSuite1, &suite_fail);
+ TEST(CUE_SINIT_FAILED == CU_run_test(pSuite1, pTest1)); /* change a suite init function */
+ CU_set_suite_initfunc(pSuite1, NULL);
+ test_results(0,1,0,0,0,0,0,0,0,1);
+
+ CU_set_suite_cleanupfunc(pSuite1, &suite_fail);
+ TEST(CUE_SCLEAN_FAILED == CU_run_test(pSuite1, pTest1)); /* change a suite cleanup function */
+ CU_set_suite_cleanupfunc(pSuite1, NULL);
+ test_results(0,1,0,1,0,0,1,1,0,1);
+
+ CU_set_test_func(pTest8, &test_succeed);
+ TEST(CUE_SCLEAN_FAILED == CU_run_test(pSuite3, pTest8)); /* change a test function */
+ CU_set_test_func(pTest8, &test_fail);
+ test_results(0,1,0,1,0,0,1,1,0,1);
/* run each test (CUEA_FAIL) */
- clear_test_events();
CU_set_error_action(CUEA_FAIL);
- TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest1));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(1 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(0 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest1)); /* suite/test active */
+ test_results(0,0,0,1,0,0,1,1,0,0);
TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest2));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(1 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(1 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,0,0,1,1,0,1,0,1,1);
TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest3));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(1 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(0 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,0,0,1,0,0,1,1,0,0);
TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest4));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(1 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(1 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,0,0,1,1,0,1,0,1,1);
TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest5));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(1 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(0 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,0,0,1,0,0,1,1,0,0);
TEST(CUE_SINIT_FAILED == CU_run_test(pSuite2, pTest6));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(0 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(0 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,1,0,0,0,0,0,0,0,1);
TEST(CUE_SINIT_FAILED == CU_run_test(pSuite2, pTest7));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(0 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(0 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,1,0,0,0,0,0,0,0,1);
TEST(CUE_SCLEAN_FAILED == CU_run_test(pSuite3, pTest8));
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(1 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(1 == CU_get_number_of_failures());
- TEST(2 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,1,0,1,1,0,1,0,1,2);
TEST(CUE_SCLEAN_FAILED == CU_run_test(pSuite3, pTest9));
+ test_results(0,1,0,1,0,0,1,1,0,1);
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(1 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ CU_set_suite_active(pSuite2, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SUITE_INACTIVE == CU_run_test(pSuite2, pTest7)); /* suite inactive */
+ test_results(0,0,1,0,0,0,0,0,0,0);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_SUITE_INACTIVE == CU_run_test(pSuite2, pTest7));
+ test_results(0,0,1,0,0,0,0,0,0,1);
+ CU_set_suite_active(pSuite2, CU_TRUE);
+
+ CU_set_test_active(pTest7, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ TEST(CUE_SINIT_FAILED == CU_run_test(pSuite2, pTest7)); /* test inactive */
+ test_results(0,1,0,0,0,0,0,0,0,1);
+ CU_set_fail_on_inactive(CU_TRUE);
+ TEST(CUE_SINIT_FAILED == CU_run_test(pSuite2, pTest7));
+ test_results(0,1,0,0,0,0,0,0,0,1);
+ CU_set_test_active(pTest7, CU_TRUE);
+
+ CU_set_suite_initfunc(pSuite2, NULL);
+ TEST(CUE_SUCCESS == CU_run_test(pSuite2, pTest6)); /* change a suite init function */
+ CU_set_suite_initfunc(pSuite2, &suite_fail);
+ test_results(0,0,0,1,0,0,1,1,0,0);
+
+ CU_set_suite_cleanupfunc(pSuite3, NULL);
+ TEST(CUE_SUCCESS == CU_run_test(pSuite3, pTest8)); /* change a suite cleanup function */
+ CU_set_suite_cleanupfunc(pSuite3, &suite_fail);
+ test_results(0,0,0,1,1,0,1,0,1,1);
+
+ CU_set_test_func(pTest8, &test_succeed);
+ TEST(CUE_SCLEAN_FAILED == CU_run_test(pSuite3, pTest8)); /* change a test function */
+ CU_set_test_func(pTest8, &test_fail);
+ test_results(0,1,0,1,0,0,1,1,0,1);
/* run each test (CUEA_ABORT) */
- clear_test_events();
CU_set_error_action(CUEA_ABORT);
- f_exit_called = CU_FALSE;
+ f_exit_called = CU_FALSE;
TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest1));
TEST(CU_FALSE == f_exit_called);
- f_exit_called = CU_FALSE;
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(1 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(0 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,0,0,1,0,0,1,1,0,0);
+ f_exit_called = CU_FALSE;
TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest2));
TEST(CU_FALSE == f_exit_called);
- f_exit_called = CU_FALSE;
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(1 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(1 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,0,0,1,1,0,1,0,1,1);
+ f_exit_called = CU_FALSE;
TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest3));
TEST(CU_FALSE == f_exit_called);
- f_exit_called = CU_FALSE;
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(1 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(0 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,0,0,1,0,0,1,1,0,0);
+ f_exit_called = CU_FALSE;
TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest4));
TEST(CU_FALSE == f_exit_called);
- f_exit_called = CU_FALSE;
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(1 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(1 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,0,0,1,1,0,1,0,1,1);
+ f_exit_called = CU_FALSE;
TEST(CUE_SUCCESS == CU_run_test(pSuite1, pTest5));
TEST(CU_FALSE == f_exit_called);
- f_exit_called = CU_FALSE;
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(0 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(1 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(0 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,0,0,1,0,0,1,1,0,0);
+ f_exit_called = CU_FALSE;
TEST(CUE_SINIT_FAILED == CU_run_test(pSuite2, pTest6));
TEST(CU_TRUE == f_exit_called);
- f_exit_called = CU_FALSE;
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(0 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(0 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,1,0,0,0,0,0,0,0,1);
+ f_exit_called = CU_FALSE;
TEST(CUE_SINIT_FAILED == CU_run_test(pSuite2, pTest7));
TEST(CU_TRUE == f_exit_called);
- f_exit_called = CU_FALSE;
-
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(0 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(0 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ test_results(0,1,0,0,0,0,0,0,0,1);
+ f_exit_called = CU_FALSE;
TEST(CUE_SCLEAN_FAILED == CU_run_test(pSuite3, pTest8));
TEST(CU_TRUE == f_exit_called);
+ test_results(0,1,0,1,1,0,1,0,1,2);
+
f_exit_called = CU_FALSE;
+ TEST(CUE_SCLEAN_FAILED == CU_run_test(pSuite3, pTest9));
+ TEST(CU_TRUE == f_exit_called);
+ test_results(0,1,0,1,0,0,1,1,0,1);
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(1 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(0 == CU_get_number_of_successes());
- TEST(1 == CU_get_number_of_failures());
- TEST(2 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ CU_set_suite_active(pSuite2, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ f_exit_called = CU_FALSE;
+ TEST(CUE_SUITE_INACTIVE == CU_run_test(pSuite2, pTest6)); /* suite inactive */
+ TEST(CU_TRUE == f_exit_called);
+ test_results(0,0,1,0,0,0,0,0,0,0);
+ CU_set_fail_on_inactive(CU_TRUE);
+ f_exit_called = CU_FALSE;
+ TEST(CUE_SUITE_INACTIVE == CU_run_test(pSuite2, pTest6));
+ TEST(CU_TRUE == f_exit_called);
+ test_results(0,0,1,0,0,0,0,0,0,1);
+ CU_set_suite_active(pSuite2, CU_TRUE);
- TEST(CUE_SCLEAN_FAILED == CU_run_test(pSuite3, pTest9));
+ CU_set_test_active(pTest6, CU_FALSE);
+ CU_set_fail_on_inactive(CU_FALSE);
+ f_exit_called = CU_FALSE;
+ TEST(CUE_SINIT_FAILED == CU_run_test(pSuite2, pTest6)); /* test inactive */
TEST(CU_TRUE == f_exit_called);
+ test_results(0,1,0,0,0,0,0,0,0,1);
+ CU_set_fail_on_inactive(CU_TRUE);
f_exit_called = CU_FALSE;
+ TEST(CUE_SINIT_FAILED == CU_run_test(pSuite2, pTest6));
+ TEST(CU_TRUE == f_exit_called);
+ test_results(0,1,0,0,0,0,0,0,0,1);
+ CU_set_test_active(pTest6, CU_TRUE);
- TEST(0 == f_nTestEvents);
- TEST(NULL == f_pFirstEvent);
- TEST(0 == CU_get_number_of_suites_run());
- TEST(1 == CU_get_number_of_suites_failed());
- TEST(1 == CU_get_number_of_tests_run());
- TEST(0 == CU_get_number_of_tests_failed());
- TEST(1 == CU_get_number_of_asserts());
- TEST(1 == CU_get_number_of_successes());
- TEST(0 == CU_get_number_of_failures());
- TEST(1 == CU_get_number_of_failure_records());
- pRunSummary = CU_get_run_summary();
- TEST(pRunSummary->nSuitesRun == CU_get_number_of_suites_run());
- TEST(pRunSummary->nSuitesFailed == CU_get_number_of_suites_failed());
- TEST(pRunSummary->nTestsRun == CU_get_number_of_tests_run());
- TEST(pRunSummary->nTestsFailed == CU_get_number_of_tests_failed());
- TEST(pRunSummary->nAsserts == CU_get_number_of_asserts());
- TEST(pRunSummary->nAssertsFailed == CU_get_number_of_failures());
- TEST(pRunSummary->nFailureRecords == CU_get_number_of_failure_records());
+ f_exit_called = CU_FALSE;
+ CU_set_suite_initfunc(pSuite2, NULL);
+ TEST(CUE_SUCCESS == CU_run_test(pSuite2, pTest6)); /* change a suite init function */
+ CU_set_suite_initfunc(pSuite2, &suite_fail);
+ TEST(CU_FALSE == f_exit_called);
+ test_results(0,0,0,1,0,0,1,1,0,0);
+
+ f_exit_called = CU_FALSE;
+ CU_set_suite_cleanupfunc(pSuite1, &suite_fail);
+ TEST(CUE_SCLEAN_FAILED == CU_run_test(pSuite1, pTest1)); /* change a suite cleanup function */
+ CU_set_suite_cleanupfunc(pSuite1, NULL);
+ TEST(CU_TRUE == f_exit_called);
+ test_results(0,1,0,1,0,0,1,1,0,1);
+
+ f_exit_called = CU_FALSE;
+ CU_set_test_func(pTest8, &test_succeed);
+ TEST(CUE_SCLEAN_FAILED == CU_run_test(pSuite3, pTest8)); /* change a test function */
+ CU_set_test_func(pTest8, &test_fail);
+ TEST(CU_TRUE == f_exit_called);
+ test_results(0,1,0,1,0,0,1,1,0,1);
/* clean up after testing */
CU_set_error_action(CUEA_IGNORE);
CU_cleanup_registry();
- clear_test_events();
-}
-
-/*-------------------------------------------------*/
-static void test_CU_get_number_of_suites_run(void)
-{
- /* tested adequately in other tests */
-}
-
-/*-------------------------------------------------*/
-static void test_CU_get_number_of_suites_failed(void)
-{
- /* tested adequately in other tests */
-}
-
-/*-------------------------------------------------*/
-static void test_CU_get_number_of_tests_run(void)
-{
- /* tested adequately in other tests */
-}
-
-/*-------------------------------------------------*/
-static void test_CU_get_number_of_tests_failed(void)
-{
- /* tested adequately in other tests */
-}
-
-/*-------------------------------------------------*/
-static void test_CU_get_number_of_asserts(void)
-{
- /* tested adequately in other tests */
-}
-
-/*-------------------------------------------------*/
-static void test_CU_get_number_of_successes(void)
-{
- /* tested adequately in other tests */
-}
-
-/*-------------------------------------------------*/
-static void test_CU_get_number_of_failures(void)
-{
- /* tested adequately in other tests */
-}
-
-/*-------------------------------------------------*/
-static void test_CU_get_failure_list(void)
-{
- /* tested adequately in other tests */
-}
-
-/*-------------------------------------------------*/
-static void test_CU_get_run_summary(void)
-{
- /* tested adequately in other tests */
-}
-
-/*-------------------------------------------------*/
-static void test_CU_get_current_suite(void)
-{
- /* tested adequately in other tests */
-}
-
-/*-------------------------------------------------*/
-static void test_CU_get_current_test(void)
-{
- /* tested adequately in other tests */
-}
-
-/*-------------------------------------------------*/
-static void test_CU_is_test_running(void)
-{
- /* tested adequately in other tests */
}
/*-------------------------------------------------*/
+/* tests CU_assertImplementation()
+ * CU_get_failure_list()
+ * CU_clear_previous_results()
+ */
static void test_CU_assertImplementation(void)
{
CU_Test dummy_test;
@@ -2560,36 +2789,6 @@
}
/*-------------------------------------------------*/
-static void test_CU_clear_previous_results(void)
-{
- /* covered by test_CU_assertImplementation() */
-}
-
-/*-------------------------------------------------*/
-static void test_clear_previous_results(void)
-{
- /* covered by test_CU_clear_previous_result() */
-}
-
-/*-------------------------------------------------*/
-static void test_cleanup_failure_list(void)
-{
- /* covered by test_clear_previous_result() */
-}
-
-/*-------------------------------------------------*/
-static void test_run_single_suite(void)
-{
- /* covered by test_CU_run_suite() */
-}
-
-/*-------------------------------------------------*/
-static void test_run_single_test(void)
-{
- /* covered by test_CU_run_test() */
-}
-
-/*-------------------------------------------------*/
static void test_add_failure(void)
{
CU_Test test1;
@@ -2598,17 +2797,17 @@
CU_pFailureRecord pFailure2 = NULL;
CU_pFailureRecord pFailure3 = NULL;
CU_pFailureRecord pFailure4 = NULL;
- CU_RunSummary run_summary = {0, 0, 0, 0, 0, 0, 0};
+ CU_RunSummary run_summary = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
/* test under memory exhaustion */
test_cunit_deactivate_malloc();
- add_failure(&pFailure1, &run_summary, 100, "condition 0", "file0.c", &suite1, &test1);
+ add_failure(&pFailure1, &run_summary, CUF_AssertFailed, 100, "condition 0", "file0.c", &suite1, &test1);
TEST(NULL == pFailure1);
TEST(0 == run_summary.nFailureRecords);
test_cunit_activate_malloc();
/* normal operation */
- add_failure(&pFailure1, &run_summary, 101, "condition 1", "file1.c", &suite1, &test1);
+ add_failure(&pFailure1, &run_summary, CUF_AssertFailed, 101, "condition 1", "file1.c", &suite1, &test1);
TEST(1 == run_summary.nFailureRecords);
if (TEST(NULL != pFailure1)) {
TEST(101 == pFailure1->uiLineNumber);
@@ -2623,7 +2822,7 @@
TEST(test_cunit_get_n_allocations(pFailure1) != test_cunit_get_n_deallocations(pFailure1));
}
- add_failure(&pFailure1, &run_summary, 102, "condition 2", "file2.c", NULL, &test1);
+ add_failure(&pFailure1, &run_summary, CUF_AssertFailed, 102, "condition 2", "file2.c", NULL, &test1);
TEST(2 == run_summary.nFailureRecords);
if (TEST(NULL != pFailure1)) {
TEST(101 == pFailure1->uiLineNumber);
@@ -2668,28 +2867,11 @@
test_cunit_start_tests("TestRun.c");
test_message_handlers();
-
+ test_CU_fail_on_inactive();
test_CU_run_all_tests();
test_CU_run_suite();
test_CU_run_test();
- test_CU_get_number_of_suites_run();
- test_CU_get_number_of_suites_failed();
- test_CU_get_number_of_tests_run();
- test_CU_get_number_of_tests_failed();
- test_CU_get_number_of_asserts();
- test_CU_get_number_of_successes();
- test_CU_get_number_of_failures();
- test_CU_get_failure_list();
- test_CU_get_run_summary();
- test_CU_get_current_suite();
- test_CU_get_current_test();
- test_CU_is_test_running();
- test_CU_clear_previous_results();
test_CU_assertImplementation();
- test_clear_previous_results();
- test_cleanup_failure_list();
- test_run_single_suite();
- test_run_single_test();
test_add_failure();
test_cunit_end_tests();
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Framework/Util.c cunit-2.1-2.dfsg/CUnit/Sources/Framework/Util.c
--- cunit-2.1-0.dfsg/CUnit/Sources/Framework/Util.c 2006-01-30 03:52:34.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Framework/Util.c 2007-03-14 02:27:19.000000000 +0000
@@ -1,7 +1,7 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004,2005,2006 Anil Kumar, Jerry St.Clair
+ * Copyright (C) 2001 Anil Kumar
+ * Copyright (C) 2004-2006 Anil Kumar, Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -29,6 +29,11 @@
* characters into escaped character for XML/HTML usage. (AK)
*
* 16-Jul-2004 New interface, doxygen comments. (JDS)
+ *
+ * 17-Apr-2006 Added CU_translated_strlen() and CU_number_width().
+ * Fixed off-by-1 error in CU_translate_special_characters(),
+ * modifying implementation & results in some cases. User can
+ * now tell if conversion failed. (JDS)
*/
/** @file
@@ -48,74 +53,65 @@
#include "TestDB.h"
#include "Util.h"
-/** Structure containing mappings of special characters to
- * xml entity codes.
+
+/*------------------------------------------------------------------------*/
+/**
+ * Structure containing mappings of special characters to xml entity codes.
+ * special_char's in the CU_bindings array will be translated during calls
+ * to CU_translate_special_characters(). Add additional chars/replacements
+ * or modify existing ones to change the behavior upon translation.
*/
-static const struct {
- char special_char;
- char* replacement;
-} bindings [] = {
+static const struct bindings {
+ const char special_char; /**< Special character. */
+ const char *replacement; /**< Entity code for special character. */
+} CU_bindings [] = {
{'&', "&"},
{'>', ">"},
{'<', "<"}
};
/*------------------------------------------------------------------------*/
-/** Checks whether a character is a special xml character.
+/**
+ * Checks whether a character is a special xml character.
* This function performs a lookup of the specified character in
- * the bindings structure. If it is a special character, its
- * index into the bindings array is returned. If not, -1 is returned.
+ * the CU_bindings structure. If it is a special character, its
+ * index into the CU_bindings array is returned. If not, -1 is returned.
+ *
* @param ch The character to check
- * @return Index into bindings if a special character, -1 otherwise.
+ * @return Index into CU_bindings if a special character, -1 otherwise.
*/
-static int get_index(char ch)
+static int get_index(const char ch)
{
- int length = sizeof(bindings)/sizeof(bindings[0]);
+ int length = sizeof(CU_bindings)/sizeof(CU_bindings[0]);
int counter;
- for (counter = 0; counter < length && bindings[counter].special_char != ch; ++counter) {
+ for (counter = 0; counter < length && CU_bindings[counter].special_char != ch; ++counter) {
;
}
return (counter < length ? counter : -1);
}
-/*------------------------------------------------------------------------*/
-/** Convert special characters in the specified string to
- * xml entity codes. The character-entity mappings are
- * contained in the struct bindings. Note that conversion
- * to entities increases the length of the converted string.
- * The worst case conversion would be a string consisting
- * entirely of entity characters of length CUNIT_MAX_ENTITY_LEN.
- * If szDest does not have enough room to convert an entity,
- * it will not be converted. It is the caller's responsibility
- * to make sure there is sufficient room in szDest to hold the
- * converted string.
- * @param szSrc Source string to convert (non-NULL).
- * @param szDest Location to hold the converted string (non-NULL).
- * @param maxlen Maximum number of characters szDest can hold.
- * @return The number of special characters converted.
- * @todo Consider a function calculating and returning the
- * converted length of a given string.
- */
-int CU_translate_special_characters(const char* szSrc, char* szDest, size_t maxlen)
+size_t CU_translate_special_characters(const char *szSrc, char *szDest, size_t maxlen)
{
- int count = 0;
+/* old implementation
+ size_t count = 0;
size_t src = 0;
size_t dest = 0;
- size_t length = strlen(szSrc);
+ size_t length = 0;
int conv_index;
assert(NULL != szSrc);
assert(NULL != szDest);
+ length = strlen(szSrc);
memset(szDest, 0, maxlen);
while ((dest < maxlen) && (src < length)) {
if ((-1 != (conv_index = get_index(szSrc[src]))) &&
- ((dest + (int)strlen(bindings[conv_index].replacement)) <= maxlen)) {
- strcat(szDest, bindings[conv_index].replacement);
- dest += (int)strlen(bindings[conv_index].replacement);
+ ((dest + strlen(CU_bindings[conv_index].replacement)) < maxlen)) {
+ strcat(szDest, CU_bindings[conv_index].replacement);
+ dest += strlen(CU_bindings[conv_index].replacement);
++count;
} else {
szDest[dest++] = szSrc[src];
@@ -125,15 +121,67 @@
}
return count;
+*/
+ size_t count = 0;
+ size_t repl_len;
+ int conv_index;
+ char *dest_start = szDest;
+
+ assert(NULL != szSrc);
+ assert(NULL != szDest);
+
+ /* only process if destination buffer not 0-length */
+ if (maxlen > 0) {
+
+ while ((maxlen > 0) && (*szSrc != '\0')) {
+ conv_index = get_index(*szSrc);
+ if (-1 != conv_index) {
+ if (maxlen > (repl_len = strlen(CU_bindings[conv_index].replacement))) {
+ memcpy(szDest, CU_bindings[conv_index].replacement, repl_len);
+ szDest += repl_len;
+ maxlen -= repl_len;
+ ++count;
+ } else {
+ maxlen = 0; /* ran out of room - abort conversion */
+ break;
+ }
+ } else {
+ *szDest++ = *szSrc;
+ --maxlen;
+ }
+ ++szSrc;
+ }
+
+ if (0 == maxlen) {
+ *dest_start = '\0'; /* ran out of room - return empty string in szDest */
+ count = 0;
+ } else {
+ *szDest = '\0'; /* had room - make sure szDest has a terminating \0 */
+ }
+ }
+ return count;
+}
+
+/*------------------------------------------------------------------------*/
+size_t CU_translated_strlen(const char* szSrc)
+{
+ size_t count = 0;
+ int conv_index;
+
+ assert(NULL != szSrc);
+
+ while (*szSrc != '\0') {
+ if (-1 != (conv_index = get_index(*szSrc))) {
+ count += strlen(CU_bindings[conv_index].replacement);
+ } else {
+ ++count;
+ }
+ ++szSrc;
+ }
+ return count;
}
/*------------------------------------------------------------------------*/
-/** Case-insensitive string comparison. Neither string pointer
- * can be NULL (checked by asssertion).
- * @param szSrc 1st string to compare (non-NULL).
- * @param szDest 2nd string to compare (non-NULL).
- * @return 0 if the strings are equal, non-zero otherwise.
- */
int CU_compare_strings(const char* szSrc, const char* szDest)
{
assert(NULL != szSrc);
@@ -148,9 +196,6 @@
}
/*------------------------------------------------------------------------*/
-/** Trim leading and trailing whitespace from the specified string.
- * @param szString The string to trim.
- */
void CU_trim(char* szString)
{
CU_trim_left(szString);
@@ -158,9 +203,6 @@
}
/*------------------------------------------------------------------------*/
-/** Trim leading whitespace from the specified string.
- * @param szString The string to trim.
- */
void CU_trim_left(char* szString)
{
int nOffset = 0;
@@ -182,9 +224,6 @@
}
/*------------------------------------------------------------------------*/
-/** Trim trailing whitespace from the specified string.
- * @param szString The string to trim.
- */
void CU_trim_right(char* szString)
{
size_t nLength;
@@ -202,137 +241,184 @@
*(szSrc + nLength) = '\0';
}
+/*------------------------------------------------------------------------*/
+size_t CU_number_width(int number)
+{
+ char buf[33];
+
+ snprintf(buf, 33, "%d", number);
+ buf[32] = '\0';
+ return (strlen(buf));
+}
+
/** @} */
#ifdef CUNIT_BUILD_TESTS
#include "test_cunit.h"
-#define MAX_LEN 100
+/* Keep BUF_LEN even or trouble ensues below... */
+#define BUF_LEN 1000
+#define MAX_LEN BUF_LEN/2
static void test_CU_translate_special_characters(void)
{
- int nchars;
- char dest[MAX_LEN];
-
+ char dest_buf[BUF_LEN];
+ char *dest = dest_buf + MAX_LEN;
+ char ref_buf[BUF_LEN];
+ const int mask_char = 0x01; /* char written to buffer */
+
+ /* set up reference buffer for testing of translated strings */
+ memset(ref_buf, mask_char, BUF_LEN);
+
/* empty src */
- strcpy(dest, "random initialized string");
- nchars = CU_translate_special_characters("", dest, MAX_LEN);
- TEST(0 == nchars);
- TEST(!strcmp(dest, ""));
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(0 == CU_translate_special_characters("", dest, MAX_LEN));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "\0", 1));
+ TEST(!strncmp((dest+1), ref_buf, MAX_LEN-1));
/* 1 char src */
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("#", dest, 1);
- TEST(0 == nchars);
- TEST(!strcmp(dest, "#"));
-
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("&", dest, 1);
- TEST(0 == nchars);
- TEST(!strcmp(dest, "&"));
-
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("&", dest, 4);
- TEST(0 == nchars);
- TEST(!strcmp(dest, "&"));
-
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("&", dest, 5);
- TEST(1 == nchars);
- TEST(!strcmp(dest, "&"));
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(0 == CU_translate_special_characters("#", dest, 0));
+ TEST(!strncmp(dest_buf, ref_buf, BUF_LEN));
+
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(0 == CU_translate_special_characters("#", dest, 1));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "\0", 1));
+ TEST(!strncmp((dest+1), ref_buf, MAX_LEN-1));
+
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(0 == CU_translate_special_characters("&", dest, 2));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "\0", 1));
+ TEST(!strncmp((dest+2), ref_buf, MAX_LEN-2));
+
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(0 == CU_translate_special_characters("&", dest, 4));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "\0", 1));
+ TEST(!strncmp((dest+4), ref_buf, MAX_LEN-4));
+
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(0 == CU_translate_special_characters("&", dest, 5));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "\0", 1));
+ TEST(!strncmp((dest+5), ref_buf, MAX_LEN-5));
+
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(1 == CU_translate_special_characters("&", dest, 6));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "&\0", 6));
+ TEST(!strncmp((dest+6), ref_buf, MAX_LEN-6));
/* maxlen=0 */
+ memset(dest_buf, mask_char, BUF_LEN);
strcpy(dest, "random initialized string");
- nchars = CU_translate_special_characters("some <", dest, 0);
- TEST(0 == nchars);
+ TEST(0 == CU_translate_special_characters("some <", dest, 0));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
TEST(!strcmp(dest, "random initialized string"));
+ TEST(!strncmp(dest+strlen(dest)+1, ref_buf, MAX_LEN-strlen(dest)-1));
/* maxlen < len(converted szSrc) */
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("some <", dest, 1);
- TEST(0 == nchars);
- TEST(!strcmp(dest, "s"));
-
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("some <", dest, 6);
- TEST(0 == nchars);
- TEST(!strcmp(dest, "some <"));
-
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("some <", dest, 9);
- TEST(1 == nchars);
- TEST(!strcmp(dest, "some <"));
-
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("some <", dest, 10);
- TEST(1 == nchars);
- TEST(!strcmp(dest, "some <<"));
-
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("some <", dest, 13);
- TEST(2 == nchars);
- TEST(!strcmp(dest, "some <<"));
-
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("some <", dest, 14);
- TEST(2 == nchars);
- TEST(!strcmp(dest, "some <<s"));
-
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("some <", dest, 21);
- TEST(2 == nchars);
- TEST(!strcmp(dest, "some <<string &"));
-
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("some <", dest, 22);
- TEST(2 == nchars);
- TEST(!strcmp(dest, "some <<string & "));
-
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("some <", dest, 23);
- TEST(2 == nchars);
- TEST(!strcmp(dest, "some <<string & a"));
-
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("some <", dest, 24);
- TEST(2 == nchars);
- TEST(!strcmp(dest, "some <<string & an"));
-
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("some <", dest, 25);
- TEST(3 == nchars);
- TEST(!strcmp(dest, "some <<string &"));
-
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("some <", dest, 26);
- TEST(3 == nchars);
- TEST(!strcmp(dest, "some <<string & "));
-
- /* maxlen == len(converted szSrc) */
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("some <", dest, 37);
- TEST(4 == nchars);
- TEST(!strcmp(dest, "some <<string & another>"));
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(0 == CU_translate_special_characters("some <", dest, 1));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "\0", 1));
+ TEST(!strncmp((dest+1), ref_buf, MAX_LEN-1));
+
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(0 == CU_translate_special_characters("some <", dest, 2));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "\0", 1));
+ TEST(!strncmp((dest+2), ref_buf, MAX_LEN-2));
+
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(0 == CU_translate_special_characters("some <", dest, 5));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "\0", 1));
+ TEST(!strncmp((dest+5), ref_buf, MAX_LEN-5));
+
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(0 == CU_translate_special_characters("some <", dest, 10));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "\0", 1));
+ TEST(!strncmp((dest+10), ref_buf, MAX_LEN-10));
+
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(0 == CU_translate_special_characters("some <", dest, 20));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "\0", 1));
+ TEST(!strncmp((dest+20), ref_buf, MAX_LEN-20));
+
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(0 == CU_translate_special_characters("some <", dest, 24));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "\0", 1));
+ TEST(!strncmp((dest+24), ref_buf, MAX_LEN-24));
+
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(0 == CU_translate_special_characters("some <", dest, 25));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "\0", 1));
+ TEST(!strncmp((dest+25), ref_buf, MAX_LEN-25));
+
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(0 == CU_translate_special_characters("some <", dest, 37));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "\0", 1));
+ TEST(!strncmp((dest+37), ref_buf, MAX_LEN-37));
/* maxlen > len(converted szSrc) */
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("some <", dest, MAX_LEN);
- TEST(4 == nchars);
- TEST(!strcmp(dest, "some <<string & another>"));
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(4 == CU_translate_special_characters("some <", dest, 38));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "some <<string & another>\0", 38));
+ TEST(!strncmp((dest+38), ref_buf, MAX_LEN-38));
+
+ /* maxlen > len(converted szSrc) */
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(4 == CU_translate_special_characters("some <", dest, MAX_LEN));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "some <<string & another>\0", 38));
/* no special characters */
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("some string or another", dest, MAX_LEN);
- TEST(0 == nchars);
- TEST(!strcmp(dest, "some string or another"));
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(0 == CU_translate_special_characters("some string or another", dest, MAX_LEN));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
+ TEST(!strncmp(dest, "some string or another\0", 23));
/* only special characters */
- memset(dest, 0, MAX_LEN);
- nchars = CU_translate_special_characters("<><><<>>&&&", dest, MAX_LEN);
- TEST(11 == nchars);
+ memset(dest_buf, mask_char, BUF_LEN);
+ TEST(11 == CU_translate_special_characters("<><><<>>&&&", dest, MAX_LEN));
+ TEST(!strncmp(dest_buf, ref_buf, MAX_LEN));
TEST(!strcmp(dest, "<><><<>>&&&"));
}
+static void test_CU_translated_strlen(void)
+{
+ /* empty src */
+ TEST(0 == CU_translated_strlen(""));
+
+ /* 1 char src */
+ TEST(1 == CU_translated_strlen("#"));
+ TEST(5 == CU_translated_strlen("&"));
+ TEST(4 == CU_translated_strlen("<"));
+ TEST(4 == CU_translated_strlen(">"));
+ TEST(1 == CU_translated_strlen("?"));
+
+ /* 2 char src */
+ TEST(2 == CU_translated_strlen("#@"));
+ TEST(10 == CU_translated_strlen("&&"));
+ TEST(9 == CU_translated_strlen(">&"));
+
+ /* longer src */
+ TEST(37 == CU_translated_strlen("some <"));
+ TEST(22 == CU_translated_strlen("some string or another"));
+ TEST(47 == CU_translated_strlen("<><><<>>&&&"));
+}
+
static void test_CU_compare_strings(void)
{
TEST(0 == CU_compare_strings("",""));
@@ -493,16 +579,29 @@
TEST(!strcmp(" ~ & ^ ( ^", string));
}
+static void test_CU_number_width(void)
+{
+ TEST(1 == CU_number_width(0));
+ TEST(1 == CU_number_width(1));
+ TEST(2 == CU_number_width(-1));
+ TEST(4 == CU_number_width(2346));
+ TEST(7 == CU_number_width(-257265));
+ TEST(9 == CU_number_width(245723572));
+ TEST(9 == CU_number_width(-45622572));
+}
+
void test_cunit_Util(void)
{
test_cunit_start_tests("Util.c");
test_CU_translate_special_characters();
+ test_CU_translated_strlen();
test_CU_compare_strings();
test_CU_trim();
test_CU_trim_left();
test_CU_trim_right();
+ test_CU_number_width();
test_cunit_end_tests();
}
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Makefile.in cunit-2.1-2.dfsg/CUnit/Sources/Makefile.in
--- cunit-2.1-0.dfsg/CUnit/Sources/Makefile.in 2006-03-22 10:57:14.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Makefile.in 2010-10-15 15:11:41.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,15 +16,12 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -46,17 +44,11 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
libcunit_test_a_AR = $(AR) $(ARFLAGS)
-@ENABLE_TEST_TRUE@am__DEPENDENCIES_1 = Framework/CUError_test.o \
-@ENABLE_TEST_TRUE@ Framework/MyMem_test.o \
-@ENABLE_TEST_TRUE@ Framework/TestDB_test.o \
-@ENABLE_TEST_TRUE@ Framework/TestRun_test.o \
-@ENABLE_TEST_TRUE@ Framework/Util_test.o
-am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
-@ENABLE_TEST_TRUE@libcunit_test_a_DEPENDENCIES = \
-@ENABLE_TEST_TRUE@ $(am__DEPENDENCIES_2)
+@ENABLE_TEST_TRUE@libcunit_test_a_DEPENDENCIES = $(TEST_OBJECTS)
am_libcunit_test_a_OBJECTS =
libcunit_test_a_OBJECTS = $(am_libcunit_test_a_OBJECTS)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -64,51 +56,84 @@
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(libdir)"
-libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
-am__DEPENDENCIES_3 = Framework/CUError.lo Framework/MyMem.lo \
- Framework/TestDB.lo Framework/TestRun.lo Framework/Util.lo
-am__DEPENDENCIES_4 = $(am__DEPENDENCIES_3)
-am__DEPENDENCIES_5 = Automated/Automated.lo
-@ENABLE_AUTOMATED_TRUE@am__DEPENDENCIES_6 = $(am__DEPENDENCIES_5)
-am__DEPENDENCIES_7 = Basic/Basic.lo
-@ENABLE_BASIC_TRUE@am__DEPENDENCIES_8 = $(am__DEPENDENCIES_7)
-am__DEPENDENCIES_9 = Console/Console.lo
-@ENABLE_CONSOLE_TRUE@am__DEPENDENCIES_10 = $(am__DEPENDENCIES_9)
-am__DEPENDENCIES_11 = Curses/Curses.lo
-@ENABLE_CURSES_TRUE@am__DEPENDENCIES_12 = $(am__DEPENDENCIES_11)
-am__DEPENDENCIES_13 = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_6) \
- $(am__DEPENDENCIES_8) $(am__DEPENDENCIES_10) \
- $(am__DEPENDENCIES_12)
-libcunit_la_DEPENDENCIES = $(am__DEPENDENCIES_13)
+libcunit_la_DEPENDENCIES = $(OBJECT_FILES_SHARED)
am_libcunit_la_OBJECTS =
libcunit_la_OBJECTS = $(am_libcunit_la_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+libcunit_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libcunit_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(libcunit_test_a_SOURCES) $(libcunit_la_SOURCES)
DIST_SOURCES = $(libcunit_test_a_SOURCES) $(libcunit_la_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = Framework Automated Basic Console Curses . Test
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -127,40 +152,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -170,35 +182,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -210,28 +227,41 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
BASIC_OBJECTS_SHARED = Basic/Basic.lo
AUTOMATED_OBJECTS_SHARED = Automated/Automated.lo
CONSOLE_OBJECTS_SHARED = Console/Console.lo
@@ -293,14 +323,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Sources/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu CUnit/Sources/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Sources/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu CUnit/Sources/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -318,6 +348,7 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
@@ -327,21 +358,25 @@
$(RANLIB) libcunit_test.a
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
if test -f $$p; then \
- f=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
- $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ list2="$$list2 $$p"; \
else :; fi; \
- done
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- p=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done
clean-libLTLIBRARIES:
@@ -353,7 +388,7 @@
rm -f "$${dir}/so_locations"; \
done
libcunit.la: $(libcunit_la_OBJECTS) $(libcunit_la_DEPENDENCIES)
- $(LINK) -rpath $(libdir) $(libcunit_la_LDFLAGS) $(libcunit_la_OBJECTS) $(libcunit_la_LIBADD) $(LIBS)
+ $(libcunit_la_LINK) -rpath $(libdir) $(libcunit_la_OBJECTS) $(libcunit_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -367,10 +402,6 @@
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
@@ -378,7 +409,7 @@
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -395,16 +426,15 @@
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -430,16 +460,16 @@
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -447,14 +477,14 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
@@ -466,81 +496,101 @@
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
@@ -551,7 +601,7 @@
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(libdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
@@ -573,6 +623,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -585,7 +636,7 @@
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-recursive
@@ -593,18 +644,38 @@
html: html-recursive
+html-am:
+
info: info-recursive
info-am:
install-data-am:
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
install-exec-am: install-libLTLIBRARIES
+install-html: install-html-recursive
+
+install-html-am:
+
install-info: install-info-recursive
+install-info-am:
+
install-man:
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -624,26 +695,28 @@
ps-am:
-uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
+uninstall-am: uninstall-libLTLIBRARIES
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libLTLIBRARIES clean-libtool \
- clean-noinstLIBRARIES clean-recursive ctags ctags-recursive \
- distclean distclean-compile distclean-generic \
- distclean-libtool distclean-recursive distclean-tags distdir \
- dvi dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-libLTLIBRARIES \
- install-man install-strip installcheck installcheck-am \
- installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
- tags tags-recursive uninstall uninstall-am uninstall-info-am \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool clean-noinstLIBRARIES ctags \
+ ctags-recursive distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-libLTLIBRARIES install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-libLTLIBRARIES
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Test/Jamfile cunit-2.1-2.dfsg/CUnit/Sources/Test/Jamfile
--- cunit-2.1-0.dfsg/CUnit/Sources/Test/Jamfile 2006-03-21 01:30:54.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Test/Jamfile 1970-01-01 00:00:00.000000000 +0000
@@ -1,107 +0,0 @@
-#
-# Jamfile to build CUnit - internal testing
-# (see http://www.freetype.org/jam/index.html)
-#
-# Copyright (C) 2004-2006 Jerry St.Clair
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#---------------------------------------------------------------------------
-
-SubDir TOP CUnit Sources Test ;
-
-TEST_PROG = test_cunit ;
-
-SubDirHdrs $(CUNIT_HDR_DIR) ;
-SubDirCcFlags
- -I$(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Test
- -DCUNIT_BUILD_TESTS
- -DCUNIT_DO_NOT_DEFINE_UNLESS_BUILDING_TESTS
- -DMEMTRACE ;
-
-# set location for target, source, and temporary files
-LOCATE_TARGET = $(BUILD_DIR)$(SLASH)CUnit$(SLASH)test ;
-
-SEARCH_SOURCE +=
- $(TOP)$(SLASH)CUnit
- $(TOP)$(SLASH)CUnit$(SLASH)Headers
- $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Framework
- ;
-
-SOURCES =
- test_cunit.c
- CUError.c
- MyMem.c
- TestDB.c
- TestRun.c
- Util.c
- ;
-
-if $(BUILD_AUTOMATED)
-{
- SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Automated ;
- SOURCES += Automated.c ;
-}
-if $(BUILD_BASIC)
-{
- SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Basic ;
- SOURCES += Basic.c ;
-}
-if $(BUILD_CONSOLE)
-{
- SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Console ;
- SOURCES += Console.c ;
-}
-if $(BUILD_CURSES)
-{
- SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Curses ;
- SOURCES += Curses.c ;
-}
-if $(BUILD_WINDOWS)
-{
- SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Win ;
- SOURCES += Win.c ;
-}
-
-# extra symbolic targets for building test program
-DEPENDS test : $(TEST_PROG)$(SUFEXE) ;
-NOTFILE test ;
-
-
-if $(BUILD_TEST)
-{
- Main $(TEST_PROG) : $(SOURCES) ;
- MakeLocate $(TEST_PROG)$(SUFEXE) : $(BUILD_DIR) ;
- LINKLIBS on $(TEST_PROG)$(SUFEXE) = $(SYS_LIBS) ;
-
- if $(NT)
- {
- if ($(BCCROOT) || ($(TOOLSET) = BORLANDC))
- {
- # need to fix Borland to include library location
- LINKFLAGS on $(TEST_PROG)$(SUFEXE) += -L$(STDLIBPATH) -tWC ;
- }
- else if $(MSVCNT) || $(TOOLSET) = VISUALC)
- {
- # VC won't allow use of local exit() without link flag
- LINKFLAGS on $(TEST_PROG)$(SUFEXE) += /FORCE:MULTIPLE ;
- }
- }
-
- if $(INSTALL_TEST_DIR)
- {
- InstallCUnitBin $(INSTALL_TEST_DIR) : $(TEST_PROG)$(SUFEXE) ;
- }
-}
-
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Test/Makefile.in cunit-2.1-2.dfsg/CUnit/Sources/Test/Makefile.in
--- cunit-2.1-0.dfsg/CUnit/Sources/Test/Makefile.in 2006-03-22 10:57:14.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Test/Makefile.in 2010-10-15 15:11:41.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -46,32 +44,35 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(testdir)"
-testPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(test_PROGRAMS)
am__test_cunit_SOURCES_DIST = test_cunit.c
@ENABLE_TEST_TRUE@am_test_cunit_OBJECTS = test_cunit.$(OBJEXT)
test_cunit_OBJECTS = $(am_test_cunit_OBJECTS)
@ENABLE_TEST_TRUE@test_cunit_DEPENDENCIES = ../libcunit_test.a
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+test_cunit_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(test_cunit_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(test_cunit_SOURCES)
DIST_SOURCES = $(am__test_cunit_SOURCES_DIST)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -90,40 +91,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -133,35 +121,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -173,28 +166,41 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
@ENABLE_TEST_TRUE@testdir = ${datadir}/@PACKAGE@/Test
@ENABLE_TEST_TRUE@test_cunit_SOURCES = test_cunit.c
@ENABLE_TEST_TRUE@test_cunit_LDADD = ../libcunit_test.a
@@ -208,14 +214,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Sources/Test/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu CUnit/Sources/Test/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu CUnit/Sources/Test/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu CUnit/Sources/Test/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -233,37 +239,53 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
install-testPROGRAMS: $(test_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(testdir)" || $(mkdir_p) "$(DESTDIR)$(testdir)"
- @list='$(test_PROGRAMS)'; for p in $$list; do \
- p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- if test -f $$p \
- || test -f $$p1 \
- ; then \
- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(testPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(testdir)/$$f'"; \
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(testPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(testdir)/$$f" || exit 1; \
- else :; fi; \
- done
+ test -z "$(testdir)" || $(MKDIR_P) "$(DESTDIR)$(testdir)"
+ @list='$(test_PROGRAMS)'; test -n "$(testdir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(testdir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(testdir)$$dir" || exit $$?; \
+ } \
+ ; done
uninstall-testPROGRAMS:
@$(NORMAL_UNINSTALL)
- @list='$(test_PROGRAMS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f '$(DESTDIR)$(testdir)/$$f'"; \
- rm -f "$(DESTDIR)$(testdir)/$$f"; \
- done
+ @list='$(test_PROGRAMS)'; test -n "$(testdir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(testdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(testdir)" && rm -f $$files
clean-testPROGRAMS:
- @list='$(test_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
+ @list='$(test_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
test_cunit$(EXEEXT): $(test_cunit_OBJECTS) $(test_cunit_DEPENDENCIES)
@rm -f test_cunit$(EXEEXT)
- $(LINK) $(test_cunit_LDFLAGS) $(test_cunit_OBJECTS) $(test_cunit_LDADD) $(LIBS)
+ $(test_cunit_LINK) $(test_cunit_OBJECTS) $(test_cunit_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -274,22 +296,22 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cunit.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -300,82 +322,85 @@
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -384,7 +409,7 @@
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(testdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -406,6 +431,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -419,7 +445,7 @@
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -427,18 +453,38 @@
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am: install-testPROGRAMS
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -459,20 +505,24 @@
ps-am:
-uninstall-am: uninstall-info-am uninstall-testPROGRAMS
+uninstall-am: uninstall-testPROGRAMS
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-testPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
install-strip install-testPROGRAMS installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-info-am \
- uninstall-testPROGRAMS
+ tags uninstall uninstall-am uninstall-testPROGRAMS
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Test/test_cunit.c cunit-2.1-2.dfsg/CUnit/Sources/Test/test_cunit.c
--- cunit-2.1-0.dfsg/CUnit/Sources/Test/test_cunit.c 2006-01-30 03:53:56.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Test/test_cunit.c 2006-05-19 21:57:27.000000000 +0000
@@ -1,6 +1,6 @@
/*
* CUnit - A Unit testing framework library for C.
- * Copyright (C) 2004,2005,2006 Jerry St.Clair
+ * Copyright (C) 2004-2006 Jerry St.Clair
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -21,6 +21,8 @@
* Support for unit tests of CUnit framework
*
* 12-Aug-2004 Initial implementation. (JDS)
+ *
+ * 02-May-2006 Added internationalization hooks. (JDS)
*/
/** @file
@@ -39,6 +41,7 @@
#include "CUnit.h"
#include "MyMem.h"
#include "Util.h"
+#include "CUnit_intl.h"
#include "test_cunit.h"
static unsigned int f_nTests = 0;
@@ -56,7 +59,7 @@
setbuf(stdout, NULL);
test_cunit_initialize();
- fprintf(stdout, "\nTesting CUnit internals...");
+ fprintf(stdout, "\n%s", _("Testing CUnit internals..."));
/* individual module test functions go here */
test_cunit_CUError();
@@ -73,14 +76,14 @@
void test_cunit_start_tests(const char* strName)
{
- fprintf(stdout, "\n\ttesting %s ...", strName);
+ fprintf(stdout, _("\n testing %s ... "), strName);
f_nTests_stored = f_nTests;
f_nFails_stored = f_nFailures;
}
void test_cunit_end_tests(void)
{
- fprintf(stdout, "\b\b\b - %d assertions, %d failures",
+ fprintf(stdout, _("%d assertions, %d failures"),
f_nTests - f_nTests_stored,
f_nFailures - f_nFails_stored);
}
@@ -116,14 +119,22 @@
{
fprintf(stdout,
"\n\n---------------------------"
- "\nCUnit Internal Test Results"
+ "\n%s"
"\n---------------------------"
- "\n Total Number of Assertions: %d"
- "\n Successes: %d"
- "\n Failures: %d"
- "\n\nTotal test time = %8.3f seconds.\n",
- f_nTests, f_nTests-f_nFailures, f_nFailures,
- ((double)clock() - (double)f_start_time)/(double)CLOCKS_PER_SEC);
+ "\n %s%d"
+ "\n %s%d"
+ "\n %s%d"
+ "\n\n%s%8.3f%s\n",
+ _("CUnit Internal Test Results"),
+ _("Total Number of Assertions: "),
+ f_nTests,
+ _("Successes: "),
+ f_nTests-f_nFailures,
+ _("Failures: "),
+ f_nFailures,
+ _("Total test time = "),
+ ((double)clock() - (double)f_start_time)/(double)CLOCKS_PER_SEC,
+ _(" seconds."));
}
CU_BOOL test_cunit_assert_impl(CU_BOOL value,
@@ -134,7 +145,7 @@
test_cunit_add_test();
if (CU_FALSE == value) {
test_cunit_add_failure();
- printf("\nTEST FAILED: File '%s', Line %d, Condition '%s.'\n",
+ printf(_("\nTEST FAILED: File '%s', Line %d, Condition '%s.'\n"),
file, line, condition);
}
return value;
diff -Nru cunit-2.1-0.dfsg/CUnit/Sources/Test/test_cunit.h cunit-2.1-2.dfsg/CUnit/Sources/Test/test_cunit.h
--- cunit-2.1-0.dfsg/CUnit/Sources/Test/test_cunit.h 2006-01-30 03:53:56.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit/Sources/Test/test_cunit.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,99 +0,0 @@
-/*
- * CUnit - A Unit testing framework library for C.
- * Copyright (C) 2004,2005,2006 Jerry St.Clair
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
- * Unit test for CUnit framework
- *
- * 12-Aug-2004 Initial implementation. (JDS)
- */
-
-/** @file
- * Interface for CUnit internal testing functions.
- * Because the CUnit framework cannot be modified during a test
- * run, CUnit cannot be used directly to test itself. That is,
- * individual functions could set up and initiate CUnit test runs,
- * but the functions themselves cannot be run as CUnit test functions.
- *
- * The approach taken here is to set up a mimimal test framework to
- * keep track of logical tests. The various unit test functions are
- * then free to use the CUnit framework as needed.
- */
-/** @addtogroup Internal
- @{
-*/
-
-#ifndef CUNIT_TEST_CUNIT_H_SEEN
-#define CUNIT_TEST_CUNIT_H_SEEN
-
-#include "CUnit.h"
-
-#ifdef CUNIT_BUILD_TESTS
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** Notify the test system that a set of tests is starting.
- * Optional - for reporting purposes only.
- * @param strName Name to use to designate this set of tests.
- */
-void test_cunit_start_tests(const char* strName);
-
-/** Notify the test system that a set of tests is complete.
- * Optional - for reporting purposes only.
- */
-void test_cunit_end_tests(void);
-
-void test_cunit_add_test(void); /**< Register running a test (assertion). */
-void test_cunit_add_failure(void); /**< Register failure of a test. */
-unsigned int test_cunit_test_count(void); /**< Retrieve the number of tests run. */
-unsigned int test_cunit_failure_count(void); /**< Retrieve the number of failed tests. */
-
-/** Implementation of test assertion. */
-CU_BOOL test_cunit_assert_impl(CU_BOOL value,
- const char* condition,
- const char* file,
- unsigned int line);
-
-/** Test a logical condition.
- * Use of this macro allows clients to register a tested
- * assertion with automatic recordkeeping and reporting
- * of failures and run counts. The return value is a CU_BOOL
- * having the same value as the logical condition tested.
- * As such, it may be used in logial expressions itself.
- */
-#define TEST(x) test_cunit_assert_impl((x), #x, __FILE__, __LINE__)
-
-/** Test a logical condition with return on failure.
- * This macro is the same as the TEST() macro, except that it
- * issues a return
statement on failure.
- * It should not be used as a logical condition itself.
- */
-#define TEST_FATAL(x) if (!test_cunit_assert_impl((x), #x, __FILE__, __LINE__)) return
-
-/** Record a failure. */
-#define FAIL(x) test_cunit_assert_impl(CU_FALSE, #x, __FILE__, __LINE__)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CUNIT_BUILD_TESTS */
-
-#endif /* CUNIT_TEST_CUNIT_H_SEEN */
diff -Nru cunit-2.1-0.dfsg/CUnit.dsw cunit-2.1-2.dfsg/CUnit.dsw
--- cunit-2.1-0.dfsg/CUnit.dsw 2004-10-01 02:38:06.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit.dsw 1970-01-01 00:00:00.000000000 +0000
@@ -1,74 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "CUnit"=".\CUnit\CUnit.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "AutomatedTest"=".\EXAMPLES\AutomatedTest\AutomatedTest.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name CUnit
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "BasicTest"=".\EXAMPLES\BasicTest\BasicTest.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name CUnit
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "ConsoleTest"=".\Examples\ConsoleTest\ConsoleTest.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name CUnit
- End Project Dependency
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff -Nru cunit-2.1-0.dfsg/CUnit.spec.in cunit-2.1-2.dfsg/CUnit.spec.in
--- cunit-2.1-0.dfsg/CUnit.spec.in 2006-03-21 01:30:40.000000000 +0000
+++ cunit-2.1-2.dfsg/CUnit.spec.in 2006-05-20 13:19:13.000000000 +0000
@@ -37,6 +37,7 @@
%{_prefix}/include/CUnit/Console.h
%{_prefix}/include/CUnit/CUError.h
%{_prefix}/include/CUnit/CUnit.h
+%{_prefix}/include/CUnit/CUnit_intl.h
%{_prefix}/include/CUnit/CUCurses.h
%{_prefix}/include/CUnit/MyMem.h
%{_prefix}/include/CUnit/TestDB.h
@@ -62,12 +63,13 @@
%{_prefix}/doc/@PACKAGE@/headers/Console.h
%{_prefix}/doc/@PACKAGE@/headers/CUError.h
%{_prefix}/doc/@PACKAGE@/headers/CUnit.h
+%{_prefix}/doc/@PACKAGE@/headers/CUnit_intl.h
%{_prefix}/doc/@PACKAGE@/headers/CUCurses.h
%{_prefix}/doc/@PACKAGE@/headers/MyMem.h
%{_prefix}/doc/@PACKAGE@/headers/TestDB.h
%{_prefix}/doc/@PACKAGE@/headers/TestRun.h
%{_prefix}/doc/@PACKAGE@/headers/Util.h
-%{_prefix}/doc/@PACKAGE@/headers/Win.h
+%{_prefix}/doc/@PACKAGE@/headers/Win.h
########## Manpage Files
%{_prefix}/man/man3/CUnit.3*
diff -Nru cunit-2.1-0.dfsg/ChangeLog cunit-2.1-2.dfsg/ChangeLog
--- cunit-2.1-0.dfsg/ChangeLog 2006-03-21 01:30:40.000000000 +0000
+++ cunit-2.1-2.dfsg/ChangeLog 2010-10-14 08:35:41.000000000 +0000
@@ -1,3 +1,37 @@
+* Tue Oct 14 2010 Martin Gerhardy
+ - release 2.1.1
+
+* Wed Oct 13 2010 Martin Gerhardy
+ - fixed bug #2976958
+ - fixed other const related warnings
+
+* Wed May 10 2006 Jerry St.Clair
+ - modified dtd and xsl files to support inactive suites/tests.
+ - instrumented entire framework/interfaces for gettext
+ (not activated yet, just instrumented source).
+
+* Sun Apr 30 2006 Jerry St.Clair
+ - Added ability to deactivate suite/tests dynamically.
+ - Removed constraint that suite/test names be unique.
+ - Added lookup functions to TestDB.[ch]
+ - Changed test run behavior so suite is run even if it has
+ no tests - user may expect init & cleanup functions to
+ be run as long as suite is active.
+ - Modified console: suites/tests selected by number,
+ inactive tests/suites reported, added help function,
+ added option menu.
+ - Modified curses: suites/tests selected by number,
+ inactive tests/suites reported, added help function,
+ added option menu.
+ - Modified automated: inactive suites/tests reported.
+ - Modified docs and internal unit tests for these changes.
+ - Moved doxygen comments for public functions to headers.
+ This will make them more accessible to clients without
+ having to generate doxygen docs.
+
+* Wed Mar 22 2006 Jerry St.Clair
+ - release 2.1.0
+
* Sat Mar 17 2006 Jerry St.Clair
- Finalized upgrade of configure.in, Makefile.am.
- Upgraded Jamfile set to build shared library on Linux.
diff -Nru cunit-2.1-0.dfsg/Doxyfile cunit-2.1-2.dfsg/Doxyfile
--- cunit-2.1-0.dfsg/Doxyfile 2005-05-02 11:37:04.000000000 +0000
+++ cunit-2.1-2.dfsg/Doxyfile 1970-01-01 00:00:00.000000000 +0000
@@ -1,215 +0,0 @@
-# Doxyfile 1.3.9.1
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = "CUnit Programmers Reference"
-PROJECT_NUMBER = 2.0-2
-OUTPUT_DIRECTORY = ./doc
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = NO
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF =
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = YES
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP = YES
-INHERIT_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = YES
-OPTIMIZE_OUTPUT_JAVA = NO
-SUBGROUPING = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = NO
-EXTRACT_PRIVATE = YES
-EXTRACT_STATIC = YES
-EXTRACT_LOCAL_CLASSES = YES
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = YES
-SHOW_DIRECTORIES = YES
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = ./CUnit
-FILE_PATTERNS = *.c \
- *.h
-RECURSIVE = YES
-EXCLUDE = ./CUnit/Sources/Win
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-VERBATIM_HEADERS = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = html
-HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = NO
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT = latex
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT = rtf
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT = man
-MAN_EXTENSION = .3
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
-XML_PROGRAMLISTING = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED = USE_DEPRECATED_CUNIT_NAMES
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = YES
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = NO
-CLASS_GRAPH = NO
-COLLABORATION_GRAPH = YES
-UML_LOOK = NO
-TEMPLATE_RELATIONS = NO
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-CALL_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-DOT_IMAGE_FORMAT = png
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
-MAX_DOT_GRAPH_DEPTH = 0
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
diff -Nru cunit-2.1-0.dfsg/Examples/AutomatedTest/AutomatedTest_v1.c cunit-2.1-2.dfsg/Examples/AutomatedTest/AutomatedTest_v1.c
--- cunit-2.1-0.dfsg/Examples/AutomatedTest/AutomatedTest_v1.c 2004-10-01 02:19:08.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/AutomatedTest/AutomatedTest_v1.c 1970-01-01 00:00:00.000000000 +0000
@@ -1,253 +0,0 @@
-/*
- * CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include
-#include
-#include
-
-#include "Automated.h"
-
-int success_init(void) { return 0; }
-int success_clean(void) { return 0; }
-
-void testSuccess1(void) { ASSERT(1); }
-void testSuccess2(void) { ASSERT(1); }
-void testSuccess3(void) { ASSERT(1); }
-
-int group_failure_init(void) { return 1;}
-int group_failure_clean(void) { return 1; }
-
-void testGroupFailure1(void) { ASSERT(0); }
-void testGroupFailure2(void) { ASSERT(2); }
-
-void testfailure1(void) { ASSERT(12 <= 10); }
-void testfailure2(void) { ASSERT(2); }
-void testfailure3(void) { ASSERT(3); }
-
-void test1(void)
-{
- ASSERT((char *)2 != "THis is positive test.");
- ASSERT((char *)2 == "THis is negative test. test 1");
-}
-
-void test2(void)
-{
- ASSERT((char *)2 != "THis is positive test.");
- ASSERT((char *)3 == "THis is negative test. test 2");
-}
-
-void testSuccessSimpleAssert(void)
-{
- ASSERT(1) ;
- ASSERT(!0) ;
-}
-
-void testSuccessAssertTrue(void)
-{
- ASSERT_TRUE(TRUE) ;
- ASSERT_TRUE(!FALSE) ;
-}
-
-void testSuccessAssertFalse(void)
-{
- ASSERT_FALSE(FALSE) ;
- ASSERT_FALSE(!TRUE) ;
-}
-
-void testSuccessAssertEqual(void)
-{
- ASSERT_EQUAL(10, 10) ;
- ASSERT_EQUAL(0, 0) ;
- ASSERT_EQUAL(0, -0) ;
- ASSERT_EQUAL(-12, -12) ;
-}
-
-void testSuccessAssertNotEqual(void)
-{
- ASSERT_NOT_EQUAL(10, 11) ;
- ASSERT_NOT_EQUAL(0, -1) ;
- ASSERT_NOT_EQUAL(-12, -11) ;
-}
-
-void testSuccessAssertPtrEqual(void)
-{
- ASSERT_PTR_EQUAL((void*)0x100, (void*)0x100) ;
-}
-
-void testSuccessAssertPtrNotEqual(void)
-{
- ASSERT_PTR_NOT_EQUAL((void*)0x100, (void*)0x101) ;
-}
-
-void testSuccessAssertPtrNull(void)
-{
- ASSERT_PTR_NULL(NULL) ;
- ASSERT_PTR_NULL(0x0) ;
-}
-
-void testSuccessAssertPtrNotNull(void)
-{
- ASSERT_PTR_NOT_NULL((void*)0x23) ;
-}
-
-void testSuccessAssertStringEqual(void)
-{
- char str1[] = "test" ;
- char str2[] = "test" ;
-
- ASSERT_STRING_EQUAL(str1, str2) ;
-}
-
-void testSuccessAssertStringNotEqual(void)
-{
- char str1[] = "test" ;
- char str2[] = "testtsg" ;
-
- ASSERT_STRING_NOT_EQUAL(str1, str2) ;
-}
-
-void testSuccessAssertNStringEqual(void)
-{
- char str1[] = "test" ;
- char str2[] = "testgfsg" ;
-
- ASSERT_NSTRING_EQUAL(str1, str2, strlen(str1)) ;
- ASSERT_NSTRING_EQUAL(str1, str1, strlen(str1)) ;
- ASSERT_NSTRING_EQUAL(str1, str1, strlen(str1) + 1) ;
-}
-
-void testSuccessAssertNStringNotEqual(void)
-{
- char str1[] = "test" ;
- char str2[] = "teet" ;
- char str3[] = "testgfsg" ;
-
- ASSERT_NSTRING_NOT_EQUAL(str1, str2, 3) ;
- ASSERT_NSTRING_NOT_EQUAL(str1, str3, strlen(str1) + 1) ;
-}
-
-void testSuccessAssertDoubleEqual(void)
-{
- ASSERT_DOUBLE_EQUAL(10, 10.0001, 0.0001) ;
- ASSERT_DOUBLE_EQUAL(10, 10.0001, -0.0001) ;
- ASSERT_DOUBLE_EQUAL(-10, -10.0001, 0.0001) ;
- ASSERT_DOUBLE_EQUAL(-10, -10.0001, -0.0001) ;
-}
-
-void testSuccessAssertDoubleNotEqual(void)
-{
- ASSERT_DOUBLE_NOT_EQUAL(10, 10.001, 0.0001) ;
- ASSERT_DOUBLE_NOT_EQUAL(10, 10.001, -0.0001) ;
- ASSERT_DOUBLE_NOT_EQUAL(-10, -10.001, 0.0001) ;
- ASSERT_DOUBLE_NOT_EQUAL(-10, -10.001, -0.0001) ;
-}
-
-void AddTests(void)
-{
- PTestGroup pGroup = NULL;
- PTestCase pTest = NULL;
-
- pGroup = add_test_group("Sucess", success_init, success_clean);
- pTest = add_test_case(pGroup, "testSuccess1", testSuccess1);
- pTest = add_test_case(pGroup, "testSuccess2", testSuccess2);
- pTest = add_test_case(pGroup, "testSuccess3", testSuccess3);
-
- pGroup = add_test_group("failure", NULL, NULL);
- pTest = add_test_case(pGroup, "testfailure1", testfailure1);
- pTest = add_test_case(pGroup, "testfailure2", testfailure2);
- pTest = add_test_case(pGroup, "testfailure3", testfailure3);
-
- pGroup = add_test_group("group_failure", group_failure_init, group_failure_clean);
- pTest = add_test_case(pGroup, "testGroupFailure1", testGroupFailure1);
- pTest = add_test_case(pGroup, "testGroupFailure2", testGroupFailure2);
-}
-
-void AddAssertTests(void)
-{
- PTestGroup pGroup = NULL;
- PTestCase pTest = NULL;
-
- pGroup = add_test_group("TestSimpleAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessSimpleAssert", testSuccessSimpleAssert);
-
- pGroup = add_test_group("TestBooleanAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertTrue", testSuccessAssertTrue);
- pTest = add_test_case(pGroup, "testSuccessAssertFalse", testSuccessAssertFalse);
-
- pGroup = add_test_group("TestEqualityAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertEqual", testSuccessAssertEqual);
- pTest = add_test_case(pGroup, "testSuccessAssertNotEqual", testSuccessAssertNotEqual);
-
- pGroup = add_test_group("TestPointerAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertPtrEqual", testSuccessAssertPtrEqual);
- pTest = add_test_case(pGroup, "testSuccessAssertPtrNotEqual", testSuccessAssertPtrNotEqual);
-
- pGroup = add_test_group("TestNullnessAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertPtrNull", testSuccessAssertPtrNull);
- pTest = add_test_case(pGroup, "testSuccessAssertPtrNotNull", testSuccessAssertPtrNotNull);
-
- pGroup = add_test_group("TestStringAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertStringEqual", testSuccessAssertStringEqual);
- pTest = add_test_case(pGroup, "testSuccessAssertStringNotEqual", testSuccessAssertStringNotEqual);
-
- pGroup = add_test_group("TestNStringAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertNStringEqual", testSuccessAssertNStringEqual);
- pTest = add_test_case(pGroup, "testSuccessAssertNStringNotEqual", testSuccessAssertNStringNotEqual);
-
- pGroup = add_test_group("TestDoubleAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertDoubleEqual", testSuccessAssertDoubleEqual);
- pTest = add_test_case(pGroup, "testSuccessAssertDoubleNotEqual", testSuccessAssertDoubleNotEqual);
-}
-
-
-int main(int argc, char* argv[])
-{
- setvbuf(stdout, NULL, _IONBF, 0);
-
- if (argc > 1) {
- BOOL Run = FALSE ;
-
- set_output_filename("TestAutomated");
- if (initialize_registry()) {
- printf("\nInitialize of test Registry failed.");
- }
-
- if (!strcmp("--test", argv[1])) {
- Run = TRUE ;
- AddTests();
- }
- else if (!strcmp("--atest", argv[1])) {
- Run = TRUE ;
- AddAssertTests();
- }
- else if (!strcmp("--alltest", argv[1])) {
- Run = TRUE ;
- AddTests();
- AddAssertTests();
- }
-
- if (TRUE == Run) {
- automated_run_tests();
- }
-
- cleanup_registry();
- }
-
- return 0;
-}
diff -Nru cunit-2.1-0.dfsg/Examples/AutomatedTest/Jamfile cunit-2.1-2.dfsg/Examples/AutomatedTest/Jamfile
--- cunit-2.1-0.dfsg/Examples/AutomatedTest/Jamfile 2006-03-21 01:30:56.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/AutomatedTest/Jamfile 1970-01-01 00:00:00.000000000 +0000
@@ -1,64 +0,0 @@
-#
-# Jamfile to build CUnit - Examples/AutomatedTest
-# (see http://www.freetype.org/jam/index.html)
-#
-# Copyright (C) 2004-2006 Jerry St.Clair
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#---------------------------------------------------------------------------
-
-SubDir TOP Examples AutomatedTest ;
-
-if $(BUILD_EXAMPLES) && $(BUILD_AUTOMATED)
-{
- SubDirHdrs $(CUNIT_HDR_DIR) $(EXAMPLES_DIR) ;
-
- # set location for target, source, and temporary files
- LOCATE_TARGET = $(BUILD_DIR)$(SLASH)Examples$(SLASH)AutomatedTest ;
- SEARCH_SOURCE += $(EXAMPLES_DIR) ;
-
- Main AutomatedTest : AutomatedTest.c ExampleTests.c ;
- LinkLibraries AutomatedTest$(SUFEXE) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
- LINKLIBS on AutomatedTest$(SUFEXE) += $(SYS_LIBS) ;
-
- if $(USE_DEPRECATED_NAMES)
- {
- Main AutomatedTest_v1 : AutomatedTest_v1.c ;
- LinkLibraries AutomatedTest_v1$(SUFEXE) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
- LINKLIBS on AutomatedTest_v1$(SUFEXE) += $(SYS_LIBS) ;
-
- ObjectCcFlags AutomatedTest_v1.c : $(USE_DEPRECATED_NAMES) ;
- }
-
- if $(NT) && ($(BCCROOT) || ($(TOOLSET) = BORLANDC))
- {
- # need to fix Borland to include library location
- LINKFLAGS on AutomatedTest$(SUFEXE) += -L$(STDLIBPATH) -tWC ;
- if $(USE_DEPRECATED_NAMES)
- { LINKFLAGS on AutomatedTest_v1$(SUFEXE) += -L$(STDLIBPATH) -tWC ; }
- }
-
- MakeLocate AutomatedTest$(SUFEXE) : $(BUILD_DIR) ;
- if $(USE_DEPRECATED_NAMES)
- { MakeLocate AutomatedTest_v1$(SUFEXE) : $(BUILD_DIR) ; }
-
- if $(INSTALL_EXAM_DIR)
- {
- InstallCUnitBin $(INSTALL_EXAM_DIR)$(SLASH)Automated : AutomatedTest$(SUFEXE) ;
- InstallCUnitFile $(INSTALL_EXAM_DIR)$(SLASH)Automated : README ;
- if $(USE_DEPRECATED_NAMES)
- { InstallCUnitBin $(INSTALL_EXAM_DIR)$(SLASH)Automated : AutomatedTest_v1$(SUFEXE) ; }
- }
-}
\ No newline at end of file
diff -Nru cunit-2.1-0.dfsg/Examples/AutomatedTest/Makefile.am cunit-2.1-2.dfsg/Examples/AutomatedTest/Makefile.am
--- cunit-2.1-0.dfsg/Examples/AutomatedTest/Makefile.am 2006-03-21 01:30:56.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/AutomatedTest/Makefile.am 2010-10-14 08:43:09.000000000 +0000
@@ -7,7 +7,7 @@
example_PROGRAMS = AutomatedTest
-AutomatedTest_SOURCES = AutomatedTest.c AutomatedTest.h
+AutomatedTest_SOURCES = AutomatedTest.c
AutomatedTest_LDADD = -lcunit -lcunitexamples
AutomatedTest_LDFLAGS = -L.. -lm
INCLUDES = -I..
diff -Nru cunit-2.1-0.dfsg/Examples/AutomatedTest/Makefile.in cunit-2.1-2.dfsg/Examples/AutomatedTest/Makefile.in
--- cunit-2.1-0.dfsg/Examples/AutomatedTest/Makefile.in 2006-03-22 10:57:15.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/AutomatedTest/Makefile.in 2010-10-15 15:11:41.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,15 +16,12 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,7 @@
@ENABLE_AUTOMATED_TRUE@@ENABLE_EXAMPLES_TRUE@example_PROGRAMS = AutomatedTest$(EXEEXT)
@ENABLE_AUTOMATED_TRUE@@ENABLE_CURSES_TRUE@@ENABLE_EXAMPLES_TRUE@am__append_1 = -l$(CURSES_LIB)
subdir = Examples/AutomatedTest
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -48,25 +46,30 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(exampledir)"
-examplePROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(example_PROGRAMS)
-am__AutomatedTest_SOURCES_DIST = AutomatedTest.c AutomatedTest.h
+am__AutomatedTest_SOURCES_DIST = AutomatedTest.c
@ENABLE_AUTOMATED_TRUE@@ENABLE_EXAMPLES_TRUE@am_AutomatedTest_OBJECTS = AutomatedTest.$(OBJEXT)
AutomatedTest_OBJECTS = $(am_AutomatedTest_OBJECTS)
am__DEPENDENCIES_1 =
@ENABLE_AUTOMATED_TRUE@@ENABLE_EXAMPLES_TRUE@AutomatedTest_DEPENDENCIES = $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+AutomatedTest_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AutomatedTest_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(AutomatedTest_SOURCES)
DIST_SOURCES = $(am__AutomatedTest_SOURCES_DIST)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -74,15 +77,27 @@
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-exampleDATA_INSTALL = $(INSTALL_DATA)
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
DATA = $(example_DATA)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -101,40 +116,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -144,35 +146,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -184,30 +191,43 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
exampledir = ${datadir}/@PACKAGE@/Examples/Automated
-@ENABLE_AUTOMATED_TRUE@@ENABLE_EXAMPLES_TRUE@AutomatedTest_SOURCES = AutomatedTest.c AutomatedTest.h
+@ENABLE_AUTOMATED_TRUE@@ENABLE_EXAMPLES_TRUE@AutomatedTest_SOURCES = AutomatedTest.c
@ENABLE_AUTOMATED_TRUE@@ENABLE_EXAMPLES_TRUE@AutomatedTest_LDADD = \
@ENABLE_AUTOMATED_TRUE@@ENABLE_EXAMPLES_TRUE@ -lcunit \
@ENABLE_AUTOMATED_TRUE@@ENABLE_EXAMPLES_TRUE@ -lcunitexamples \
@@ -223,14 +243,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Examples/AutomatedTest/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu Examples/AutomatedTest/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Examples/AutomatedTest/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Examples/AutomatedTest/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -248,37 +268,53 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
install-examplePROGRAMS: $(example_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(exampledir)" || $(mkdir_p) "$(DESTDIR)$(exampledir)"
- @list='$(example_PROGRAMS)'; for p in $$list; do \
- p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- if test -f $$p \
- || test -f $$p1 \
- ; then \
- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(examplePROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(exampledir)/$$f'"; \
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(examplePROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(exampledir)/$$f" || exit 1; \
- else :; fi; \
- done
+ test -z "$(exampledir)" || $(MKDIR_P) "$(DESTDIR)$(exampledir)"
+ @list='$(example_PROGRAMS)'; test -n "$(exampledir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(exampledir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(exampledir)$$dir" || exit $$?; \
+ } \
+ ; done
uninstall-examplePROGRAMS:
@$(NORMAL_UNINSTALL)
- @list='$(example_PROGRAMS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f '$(DESTDIR)$(exampledir)/$$f'"; \
- rm -f "$(DESTDIR)$(exampledir)/$$f"; \
- done
+ @list='$(example_PROGRAMS)'; test -n "$(exampledir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(exampledir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(exampledir)" && rm -f $$files
clean-examplePROGRAMS:
- @list='$(example_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
+ @list='$(example_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
AutomatedTest$(EXEEXT): $(AutomatedTest_OBJECTS) $(AutomatedTest_DEPENDENCIES)
@rm -f AutomatedTest$(EXEEXT)
- $(LINK) $(AutomatedTest_LDFLAGS) $(AutomatedTest_OBJECTS) $(AutomatedTest_LDADD) $(LIBS)
+ $(AutomatedTest_LINK) $(AutomatedTest_OBJECTS) $(AutomatedTest_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -289,22 +325,22 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AutomatedTest.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -314,100 +350,106 @@
clean-libtool:
-rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
install-exampleDATA: $(example_DATA)
@$(NORMAL_INSTALL)
- test -z "$(exampledir)" || $(mkdir_p) "$(DESTDIR)$(exampledir)"
- @list='$(example_DATA)'; for p in $$list; do \
+ test -z "$(exampledir)" || $(MKDIR_P) "$(DESTDIR)$(exampledir)"
+ @list='$(example_DATA)'; test -n "$(exampledir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(exampleDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(exampledir)/$$f'"; \
- $(exampleDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(exampledir)/$$f"; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(exampledir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(exampledir)" || exit $$?; \
done
uninstall-exampleDATA:
@$(NORMAL_UNINSTALL)
- @list='$(example_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(exampledir)/$$f'"; \
- rm -f "$(DESTDIR)$(exampledir)/$$f"; \
- done
+ @list='$(example_DATA)'; test -n "$(exampledir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(exampledir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(exampledir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -416,7 +458,7 @@
all-am: Makefile $(PROGRAMS) $(DATA)
installdirs:
for dir in "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(exampledir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -438,6 +480,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -451,7 +494,7 @@
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -459,18 +502,38 @@
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am: install-exampleDATA install-examplePROGRAMS
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -491,22 +554,25 @@
ps-am:
-uninstall-am: uninstall-exampleDATA uninstall-examplePROGRAMS \
- uninstall-info-am
+uninstall-am: uninstall-exampleDATA uninstall-examplePROGRAMS
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean \
clean-examplePROGRAMS clean-generic clean-libtool ctags \
distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-exampleDATA install-examplePROGRAMS \
- install-exec install-exec-am install-info install-info-am \
- install-man install-strip installcheck installcheck-am \
+ install-data-am install-dvi install-dvi-am install-exampleDATA \
+ install-examplePROGRAMS install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-exampleDATA uninstall-examplePROGRAMS \
- uninstall-info-am
+ uninstall-am uninstall-exampleDATA uninstall-examplePROGRAMS
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -Nru cunit-2.1-0.dfsg/Examples/BasicTest/Jamfile cunit-2.1-2.dfsg/Examples/BasicTest/Jamfile
--- cunit-2.1-0.dfsg/Examples/BasicTest/Jamfile 2006-03-21 01:30:56.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/BasicTest/Jamfile 1970-01-01 00:00:00.000000000 +0000
@@ -1,49 +0,0 @@
-#
-# Jamfile to build CUnit - Examples/BasicTest
-# (see http://www.freetype.org/jam/index.html)
-#
-# Copyright (C) 2004-2006 Jerry St.Clair
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#---------------------------------------------------------------------------
-
-SubDir TOP Examples BasicTest ;
-
-if $(BUILD_EXAMPLES) && $(BUILD_BASIC)
-{
- SubDirHdrs $(CUNIT_HDR_DIR) $(EXAMPLES_DIR) ;
-
- # set location for target, source, and temporary files
- LOCATE_TARGET = $(BUILD_DIR)$(SLASH)Examples$(SLASH)BasicTest ;
- SEARCH_SOURCE += $(EXAMPLES_DIR) ;
-
- Main BasicTest : BasicTest.c ExampleTests.c ;
- LinkLibraries BasicTest$(SUFEXE) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
- LINKLIBS on BasicTest$(SUFEXE) += $(SYS_LIBS) ;
-
- if $(NT) && ($(BCCROOT) || ($(TOOLSET) = BORLANDC))
- {
- # need to fix Borland to include library location
- LINKFLAGS on BasicTest$(SUFEXE) += -L$(STDLIBPATH) -tWC ;
- }
-
- MakeLocate BasicTest$(SUFEXE) : $(BUILD_DIR) ;
-
- if $(INSTALL_EXAM_DIR)
- {
- InstallCUnitBin $(INSTALL_EXAM_DIR)$(SLASH)Basic : BasicTest$(SUFEXE) ;
- InstallCUnitFile $(INSTALL_EXAM_DIR)$(SLASH)Basic : README ;
- }
-}
diff -Nru cunit-2.1-0.dfsg/Examples/BasicTest/Makefile.am cunit-2.1-2.dfsg/Examples/BasicTest/Makefile.am
--- cunit-2.1-0.dfsg/Examples/BasicTest/Makefile.am 2006-03-21 01:30:56.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/BasicTest/Makefile.am 2010-10-14 08:39:59.000000000 +0000
@@ -7,7 +7,7 @@
example_PROGRAMS = BasicTest
-BasicTest_SOURCES = BasicTest.c BasicTest.h
+BasicTest_SOURCES = BasicTest.c
BasicTest_LDADD = -lcunit -lcunitexamples
BasicTest_LDFLAGS = -L.. -lm
INCLUDES = -I..
diff -Nru cunit-2.1-0.dfsg/Examples/BasicTest/Makefile.in cunit-2.1-2.dfsg/Examples/BasicTest/Makefile.in
--- cunit-2.1-0.dfsg/Examples/BasicTest/Makefile.in 2006-03-22 10:57:15.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/BasicTest/Makefile.in 2010-10-15 15:11:41.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,15 +16,12 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -41,7 +39,7 @@
@ENABLE_BASIC_TRUE@@ENABLE_EXAMPLES_TRUE@ BasicTest$(EXEEXT)
@ENABLE_BASIC_TRUE@@ENABLE_CURSES_TRUE@@ENABLE_EXAMPLES_TRUE@am__append_1 = -l$(CURSES_LIB)
subdir = Examples/BasicTest
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -49,26 +47,31 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(exampledir)"
-examplePROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(example_PROGRAMS)
-am__BasicTest_SOURCES_DIST = BasicTest.c BasicTest.h
+am__BasicTest_SOURCES_DIST = BasicTest.c
@ENABLE_BASIC_TRUE@@ENABLE_EXAMPLES_TRUE@am_BasicTest_OBJECTS = \
@ENABLE_BASIC_TRUE@@ENABLE_EXAMPLES_TRUE@ BasicTest.$(OBJEXT)
BasicTest_OBJECTS = $(am_BasicTest_OBJECTS)
am__DEPENDENCIES_1 =
@ENABLE_BASIC_TRUE@@ENABLE_EXAMPLES_TRUE@BasicTest_DEPENDENCIES = $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+BasicTest_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(BasicTest_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(BasicTest_SOURCES)
DIST_SOURCES = $(am__BasicTest_SOURCES_DIST)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -76,15 +79,27 @@
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-exampleDATA_INSTALL = $(INSTALL_DATA)
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
DATA = $(example_DATA)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -103,40 +118,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -146,35 +148,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -186,30 +193,43 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
exampledir = ${datadir}/@PACKAGE@/Examples/Basic
-@ENABLE_BASIC_TRUE@@ENABLE_EXAMPLES_TRUE@BasicTest_SOURCES = BasicTest.c BasicTest.h
+@ENABLE_BASIC_TRUE@@ENABLE_EXAMPLES_TRUE@BasicTest_SOURCES = BasicTest.c
@ENABLE_BASIC_TRUE@@ENABLE_EXAMPLES_TRUE@BasicTest_LDADD = -lcunit \
@ENABLE_BASIC_TRUE@@ENABLE_EXAMPLES_TRUE@ -lcunitexamples \
@ENABLE_BASIC_TRUE@@ENABLE_EXAMPLES_TRUE@ $(am__append_1)
@@ -224,14 +244,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Examples/BasicTest/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu Examples/BasicTest/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Examples/BasicTest/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Examples/BasicTest/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -249,37 +269,53 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
install-examplePROGRAMS: $(example_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(exampledir)" || $(mkdir_p) "$(DESTDIR)$(exampledir)"
- @list='$(example_PROGRAMS)'; for p in $$list; do \
- p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- if test -f $$p \
- || test -f $$p1 \
- ; then \
- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(examplePROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(exampledir)/$$f'"; \
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(examplePROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(exampledir)/$$f" || exit 1; \
- else :; fi; \
- done
+ test -z "$(exampledir)" || $(MKDIR_P) "$(DESTDIR)$(exampledir)"
+ @list='$(example_PROGRAMS)'; test -n "$(exampledir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(exampledir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(exampledir)$$dir" || exit $$?; \
+ } \
+ ; done
uninstall-examplePROGRAMS:
@$(NORMAL_UNINSTALL)
- @list='$(example_PROGRAMS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f '$(DESTDIR)$(exampledir)/$$f'"; \
- rm -f "$(DESTDIR)$(exampledir)/$$f"; \
- done
+ @list='$(example_PROGRAMS)'; test -n "$(exampledir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(exampledir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(exampledir)" && rm -f $$files
clean-examplePROGRAMS:
- @list='$(example_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
+ @list='$(example_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
BasicTest$(EXEEXT): $(BasicTest_OBJECTS) $(BasicTest_DEPENDENCIES)
@rm -f BasicTest$(EXEEXT)
- $(LINK) $(BasicTest_LDFLAGS) $(BasicTest_OBJECTS) $(BasicTest_LDADD) $(LIBS)
+ $(BasicTest_LINK) $(BasicTest_OBJECTS) $(BasicTest_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -290,22 +326,22 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BasicTest.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -315,100 +351,106 @@
clean-libtool:
-rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
install-exampleDATA: $(example_DATA)
@$(NORMAL_INSTALL)
- test -z "$(exampledir)" || $(mkdir_p) "$(DESTDIR)$(exampledir)"
- @list='$(example_DATA)'; for p in $$list; do \
+ test -z "$(exampledir)" || $(MKDIR_P) "$(DESTDIR)$(exampledir)"
+ @list='$(example_DATA)'; test -n "$(exampledir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(exampleDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(exampledir)/$$f'"; \
- $(exampleDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(exampledir)/$$f"; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(exampledir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(exampledir)" || exit $$?; \
done
uninstall-exampleDATA:
@$(NORMAL_UNINSTALL)
- @list='$(example_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(exampledir)/$$f'"; \
- rm -f "$(DESTDIR)$(exampledir)/$$f"; \
- done
+ @list='$(example_DATA)'; test -n "$(exampledir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(exampledir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(exampledir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -417,7 +459,7 @@
all-am: Makefile $(PROGRAMS) $(DATA)
installdirs:
for dir in "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(exampledir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -439,6 +481,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -452,7 +495,7 @@
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -460,18 +503,38 @@
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am: install-exampleDATA install-examplePROGRAMS
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -492,22 +555,25 @@
ps-am:
-uninstall-am: uninstall-exampleDATA uninstall-examplePROGRAMS \
- uninstall-info-am
+uninstall-am: uninstall-exampleDATA uninstall-examplePROGRAMS
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean \
clean-examplePROGRAMS clean-generic clean-libtool ctags \
distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-exampleDATA install-examplePROGRAMS \
- install-exec install-exec-am install-info install-info-am \
- install-man install-strip installcheck installcheck-am \
+ install-data-am install-dvi install-dvi-am install-exampleDATA \
+ install-examplePROGRAMS install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-exampleDATA uninstall-examplePROGRAMS \
- uninstall-info-am
+ uninstall-am uninstall-exampleDATA uninstall-examplePROGRAMS
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -Nru cunit-2.1-0.dfsg/Examples/ConsoleTest/ConsoleTest_v1.c cunit-2.1-2.dfsg/Examples/ConsoleTest/ConsoleTest_v1.c
--- cunit-2.1-0.dfsg/Examples/ConsoleTest/ConsoleTest_v1.c 2004-10-01 02:21:58.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/ConsoleTest/ConsoleTest_v1.c 1970-01-01 00:00:00.000000000 +0000
@@ -1,251 +0,0 @@
-/*
- * CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include
-#include
-#include
-
-#include "Console.h"
-
-int success_init(void) { return 0; }
-int success_clean(void) { return 0; }
-
-void testSuccess1(void) { ASSERT(1); }
-void testSuccess2(void) { ASSERT(1); }
-void testSuccess3(void) { ASSERT(1); }
-
-int group_failure_init(void) { return 1;}
-int group_failure_clean(void) { return 1; }
-
-void testGroupFailure1(void) { ASSERT(0); }
-void testGroupFailure2(void) { ASSERT(2); }
-
-void testfailure1(void) { ASSERT(0); }
-void testfailure2(void) { ASSERT(2); }
-void testfailure3(void) { ASSERT(3); }
-
-void test1(void)
-{
- ASSERT((char *)2 != "THis is positive test.");
- ASSERT((char *)2 == "THis is negative test. test 1");
-}
-
-void test2(void)
-{
- ASSERT((char *)2 != "THis is positive test.");
- ASSERT((char *)3 == "THis is negative test. test 2");
-}
-
-void testSuccessSimpleAssert(void)
-{
- ASSERT(1) ;
- ASSERT(!0) ;
-}
-
-void testSuccessAssertTrue(void)
-{
- ASSERT_TRUE(TRUE) ;
- ASSERT_TRUE(!FALSE) ;
-}
-
-void testSuccessAssertFalse(void)
-{
- ASSERT_FALSE(FALSE) ;
- ASSERT_FALSE(!TRUE) ;
-}
-
-void testSuccessAssertEqual(void)
-{
- ASSERT_EQUAL(10, 10) ;
- ASSERT_EQUAL(0, 0) ;
- ASSERT_EQUAL(0, -0) ;
- ASSERT_EQUAL(-12, -12) ;
-}
-
-void testSuccessAssertNotEqual(void)
-{
- ASSERT_NOT_EQUAL(10, 11) ;
- ASSERT_NOT_EQUAL(0, -1) ;
- ASSERT_NOT_EQUAL(-12, -11) ;
-}
-
-void testSuccessAssertPtrEqual(void)
-{
- ASSERT_PTR_EQUAL((void*)0x100, (void*)0x101) ;
-}
-
-void testSuccessAssertPtrNotEqual(void)
-{
- ASSERT_PTR_NOT_EQUAL((void*)0x100, (void*)0x100) ;
-}
-
-void testSuccessAssertPtrNull(void)
-{
- ASSERT_PTR_NULL((void*)0x23) ;
-}
-
-void testSuccessAssertPtrNotNull(void)
-{
- ASSERT_PTR_NOT_NULL(NULL) ;
- ASSERT_PTR_NOT_NULL(0x0) ;
-}
-
-void testSuccessAssertStringEqual(void)
-{
- char str1[] = "test" ;
- char str2[] = "test" ;
-
- ASSERT_STRING_EQUAL(str1, str2) ;
-}
-
-void testSuccessAssertStringNotEqual(void)
-{
- char str1[] = "test" ;
- char str2[] = "testtsg" ;
-
- ASSERT_STRING_NOT_EQUAL(str1, str2) ;
-}
-
-void testSuccessAssertNStringEqual(void)
-{
- char str1[] = "test" ;
- char str2[] = "testgfsg" ;
-
- ASSERT_NSTRING_EQUAL(str1, str2, strlen(str1)) ;
- ASSERT_NSTRING_EQUAL(str1, str1, strlen(str1)) ;
- ASSERT_NSTRING_EQUAL(str1, str1, strlen(str1) + 1) ;
-}
-
-void testSuccessAssertNStringNotEqual(void)
-{
- char str1[] = "test" ;
- char str2[] = "teet" ;
- char str3[] = "testgfsg" ;
-
- ASSERT_NSTRING_NOT_EQUAL(str1, str2, 3) ;
- ASSERT_NSTRING_NOT_EQUAL(str1, str3, strlen(str1) + 1) ;
-}
-
-void testSuccessAssertDoubleEqual(void)
-{
- ASSERT_DOUBLE_EQUAL(10, 10.0001, 0.0001) ;
- ASSERT_DOUBLE_EQUAL(10, 10.0001, -0.0001) ;
- ASSERT_DOUBLE_EQUAL(-10, -10.0001, 0.0001) ;
- ASSERT_DOUBLE_EQUAL(-10, -10.0001, -0.0001) ;
-}
-
-void testSuccessAssertDoubleNotEqual(void)
-{
- ASSERT_DOUBLE_NOT_EQUAL(10, 10.001, 0.0001) ;
- ASSERT_DOUBLE_NOT_EQUAL(10, 10.001, -0.0001) ;
- ASSERT_DOUBLE_NOT_EQUAL(-10, -10.001, 0.0001) ;
- ASSERT_DOUBLE_NOT_EQUAL(-10, -10.001, -0.0001) ;
-}
-
-void AddTests(void)
-{
- PTestGroup pGroup = NULL;
- PTestCase pTest = NULL;
-
- pGroup = add_test_group("Sucess", success_init, success_clean);
- pTest = add_test_case(pGroup, "testSuccess1", testSuccess1);
- pTest = add_test_case(pGroup, "testSuccess2", testSuccess2);
- pTest = add_test_case(pGroup, "testSuccess3", testSuccess3);
-
- pGroup = add_test_group("failure", NULL, NULL);
- pTest = add_test_case(pGroup, "testfailure1", testfailure1);
- pTest = add_test_case(pGroup, "testfailure2", testfailure2);
- pTest = add_test_case(pGroup, "testfailure3", testfailure3);
-
- pGroup = add_test_group("group_failure", group_failure_init, group_failure_clean);
- pTest = add_test_case(pGroup, "testGroupFailure1", testGroupFailure1);
- pTest = add_test_case(pGroup, "testGroupFailure2", testGroupFailure2);
-}
-
-void AddAssertTests(void)
-{
- PTestGroup pGroup = NULL;
- PTestCase pTest = NULL;
-
- pGroup = add_test_group("TestSimpleAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessSimpleAssert", testSuccessSimpleAssert);
-
- pGroup = add_test_group("TestBooleanAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertTrue", testSuccessAssertTrue);
- pTest = add_test_case(pGroup, "testSuccessAssertFalse", testSuccessAssertFalse);
-
- pGroup = add_test_group("TestEqualityAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertEqual", testSuccessAssertEqual);
- pTest = add_test_case(pGroup, "testSuccessAssertNotEqual", testSuccessAssertNotEqual);
-
- pGroup = add_test_group("TestPointerAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertPtrEqual", testSuccessAssertPtrEqual);
- pTest = add_test_case(pGroup, "testSuccessAssertPtrNotEqual", testSuccessAssertPtrNotEqual);
-
- pGroup = add_test_group("TestNullnessAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertPtrNull", testSuccessAssertPtrNull);
- pTest = add_test_case(pGroup, "testSuccessAssertPtrNotNull", testSuccessAssertPtrNotNull);
-
- pGroup = add_test_group("TestStringAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertStringEqual", testSuccessAssertStringEqual);
- pTest = add_test_case(pGroup, "testSuccessAssertStringNotEqual", testSuccessAssertStringNotEqual);
-
- pGroup = add_test_group("TestNStringAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertNStringEqual", testSuccessAssertNStringEqual);
- pTest = add_test_case(pGroup, "testSuccessAssertNStringNotEqual", testSuccessAssertNStringNotEqual);
-
- pGroup = add_test_group("TestDoubleAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertDoubleEqual", testSuccessAssertDoubleEqual);
- pTest = add_test_case(pGroup, "testSuccessAssertDoubleNotEqual", testSuccessAssertDoubleNotEqual);
-}
-
-
-int main(int argc, char* argv[])
-{
- setvbuf(stdout, NULL, _IONBF, 0);
-
- if (argc > 1) {
- BOOL Run = FALSE ;
- if (initialize_registry()) {
- printf("\nInitialize of test Registry failed.");
- }
-
- if (!strcmp("--test", argv[1])) {
- Run = TRUE ;
- AddTests();
- }
- else if (!strcmp("--atest", argv[1])) {
- Run = TRUE ;
- AddAssertTests();
- }
- else if (!strcmp("--alltest", argv[1])) {
- Run = TRUE ;
- AddTests();
- AddAssertTests();
- }
-
- if (TRUE == Run) {
- console_run_tests();
- }
-
- cleanup_registry();
- }
-
- return 0;
-}
diff -Nru cunit-2.1-0.dfsg/Examples/ConsoleTest/Jamfile cunit-2.1-2.dfsg/Examples/ConsoleTest/Jamfile
--- cunit-2.1-0.dfsg/Examples/ConsoleTest/Jamfile 2006-03-21 01:30:56.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/ConsoleTest/Jamfile 1970-01-01 00:00:00.000000000 +0000
@@ -1,64 +0,0 @@
-#
-# Jamfile to build CUnit - Examples/ConsoleTest
-# (see http://www.freetype.org/jam/index.html)
-#
-# Copyright (C) 2004-2006 Jerry St.Clair
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#---------------------------------------------------------------------------
-
-SubDir TOP Examples ConsoleTest ;
-
-if $(BUILD_EXAMPLES) && $(BUILD_CONSOLE)
-{
- SubDirHdrs $(CUNIT_HDR_DIR) $(EXAMPLES_DIR) ;
-
- # set location for target, source, and temporary files
- LOCATE_TARGET = $(BUILD_DIR)$(SLASH)Examples$(SLASH)ConsoleTest ;
- SEARCH_SOURCE += $(EXAMPLES_DIR) ;
-
- Main ConsoleTest : ConsoleTest.c ExampleTests.c ;
- LinkLibraries ConsoleTest$(SUFEXE) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
- LINKLIBS on ConsoleTest$(SUFEXE) += $(SYS_LIBS) ;
-
- if $(USE_DEPRECATED_NAMES)
- {
- Main ConsoleTest_v1 : ConsoleTest_v1.c ;
- LinkLibraries ConsoleTest_v1$(SUFEXE) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
- LINKLIBS on ConsoleTest_v1$(SUFEXE) += $(SYS_LIBS) ;
-
- ObjectCcFlags ConsoleTest_v1.c : $(USE_DEPRECATED_NAMES) ;
- }
-
- if $(NT) && ($(BCCROOT) || ($(TOOLSET) = BORLANDC))
- {
- # need to fix Borland to include library location
- LINKFLAGS on ConsoleTest$(SUFEXE) += -L$(STDLIBPATH) -tWC ;
- if $(USE_DEPRECATED_NAMES)
- { LINKFLAGS on ConsoleTest_v1$(SUFEXE) += -L$(STDLIBPATH) -tWC ; }
- }
-
- MakeLocate ConsoleTest$(SUFEXE) : $(BUILD_DIR) ;
- if $(USE_DEPRECATED_NAMES)
- { MakeLocate ConsoleTest_v1$(SUFEXE) : $(BUILD_DIR) ; }
-
- if $(INSTALL_EXAM_DIR)
- {
- InstallCUnitBin $(INSTALL_EXAM_DIR)$(SLASH)Console : ConsoleTest$(SUFEXE) ;
- InstallCUnitFile $(INSTALL_EXAM_DIR)$(SLASH)Console : README ;
- if $(USE_DEPRECATED_NAMES)
- { InstallCUnitBin $(INSTALL_EXAM_DIR)$(SLASH)Console : ConsoleTest_v1$(SUFEXE) ; }
- }
-}
diff -Nru cunit-2.1-0.dfsg/Examples/ConsoleTest/Makefile.am cunit-2.1-2.dfsg/Examples/ConsoleTest/Makefile.am
--- cunit-2.1-0.dfsg/Examples/ConsoleTest/Makefile.am 2006-03-21 01:30:56.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/ConsoleTest/Makefile.am 2010-10-14 08:42:08.000000000 +0000
@@ -7,7 +7,7 @@
example_PROGRAMS = ConsoleTest
-ConsoleTest_SOURCES = ConsoleTest.c ConsoleTest.h
+ConsoleTest_SOURCES = ConsoleTest.c
ConsoleTest_LDADD = -lcunit -lcunitexamples
ConsoleTest_LDFLAGS = -L.. -lm
INCLUDES = -I..
diff -Nru cunit-2.1-0.dfsg/Examples/ConsoleTest/Makefile.in cunit-2.1-2.dfsg/Examples/ConsoleTest/Makefile.in
--- cunit-2.1-0.dfsg/Examples/ConsoleTest/Makefile.in 2006-03-22 10:57:15.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/ConsoleTest/Makefile.in 2010-10-15 15:11:42.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,15 +16,12 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,7 @@
@ENABLE_CONSOLE_TRUE@@ENABLE_EXAMPLES_TRUE@example_PROGRAMS = ConsoleTest$(EXEEXT)
@ENABLE_CONSOLE_TRUE@@ENABLE_CURSES_TRUE@@ENABLE_EXAMPLES_TRUE@am__append_1 = -l$(CURSES_LIB)
subdir = Examples/ConsoleTest
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -48,25 +46,30 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(exampledir)"
-examplePROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(example_PROGRAMS)
-am__ConsoleTest_SOURCES_DIST = ConsoleTest.c ConsoleTest.h
+am__ConsoleTest_SOURCES_DIST = ConsoleTest.c
@ENABLE_CONSOLE_TRUE@@ENABLE_EXAMPLES_TRUE@am_ConsoleTest_OBJECTS = ConsoleTest.$(OBJEXT)
ConsoleTest_OBJECTS = $(am_ConsoleTest_OBJECTS)
am__DEPENDENCIES_1 =
@ENABLE_CONSOLE_TRUE@@ENABLE_EXAMPLES_TRUE@ConsoleTest_DEPENDENCIES = $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+ConsoleTest_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(ConsoleTest_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(ConsoleTest_SOURCES)
DIST_SOURCES = $(am__ConsoleTest_SOURCES_DIST)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -74,15 +77,27 @@
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-exampleDATA_INSTALL = $(INSTALL_DATA)
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
DATA = $(example_DATA)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -101,40 +116,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -144,35 +146,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -184,30 +191,43 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
exampledir = ${datadir}/@PACKAGE@/Examples/Console
-@ENABLE_CONSOLE_TRUE@@ENABLE_EXAMPLES_TRUE@ConsoleTest_SOURCES = ConsoleTest.c ConsoleTest.h
+@ENABLE_CONSOLE_TRUE@@ENABLE_EXAMPLES_TRUE@ConsoleTest_SOURCES = ConsoleTest.c
@ENABLE_CONSOLE_TRUE@@ENABLE_EXAMPLES_TRUE@ConsoleTest_LDADD = \
@ENABLE_CONSOLE_TRUE@@ENABLE_EXAMPLES_TRUE@ -lcunit \
@ENABLE_CONSOLE_TRUE@@ENABLE_EXAMPLES_TRUE@ -lcunitexamples \
@@ -223,14 +243,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Examples/ConsoleTest/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu Examples/ConsoleTest/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Examples/ConsoleTest/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Examples/ConsoleTest/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -248,37 +268,53 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
install-examplePROGRAMS: $(example_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(exampledir)" || $(mkdir_p) "$(DESTDIR)$(exampledir)"
- @list='$(example_PROGRAMS)'; for p in $$list; do \
- p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- if test -f $$p \
- || test -f $$p1 \
- ; then \
- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(examplePROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(exampledir)/$$f'"; \
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(examplePROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(exampledir)/$$f" || exit 1; \
- else :; fi; \
- done
+ test -z "$(exampledir)" || $(MKDIR_P) "$(DESTDIR)$(exampledir)"
+ @list='$(example_PROGRAMS)'; test -n "$(exampledir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(exampledir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(exampledir)$$dir" || exit $$?; \
+ } \
+ ; done
uninstall-examplePROGRAMS:
@$(NORMAL_UNINSTALL)
- @list='$(example_PROGRAMS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f '$(DESTDIR)$(exampledir)/$$f'"; \
- rm -f "$(DESTDIR)$(exampledir)/$$f"; \
- done
+ @list='$(example_PROGRAMS)'; test -n "$(exampledir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(exampledir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(exampledir)" && rm -f $$files
clean-examplePROGRAMS:
- @list='$(example_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
+ @list='$(example_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
ConsoleTest$(EXEEXT): $(ConsoleTest_OBJECTS) $(ConsoleTest_DEPENDENCIES)
@rm -f ConsoleTest$(EXEEXT)
- $(LINK) $(ConsoleTest_LDFLAGS) $(ConsoleTest_OBJECTS) $(ConsoleTest_LDADD) $(LIBS)
+ $(ConsoleTest_LINK) $(ConsoleTest_OBJECTS) $(ConsoleTest_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -289,22 +325,22 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ConsoleTest.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -314,100 +350,106 @@
clean-libtool:
-rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
install-exampleDATA: $(example_DATA)
@$(NORMAL_INSTALL)
- test -z "$(exampledir)" || $(mkdir_p) "$(DESTDIR)$(exampledir)"
- @list='$(example_DATA)'; for p in $$list; do \
+ test -z "$(exampledir)" || $(MKDIR_P) "$(DESTDIR)$(exampledir)"
+ @list='$(example_DATA)'; test -n "$(exampledir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(exampleDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(exampledir)/$$f'"; \
- $(exampleDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(exampledir)/$$f"; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(exampledir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(exampledir)" || exit $$?; \
done
uninstall-exampleDATA:
@$(NORMAL_UNINSTALL)
- @list='$(example_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(exampledir)/$$f'"; \
- rm -f "$(DESTDIR)$(exampledir)/$$f"; \
- done
+ @list='$(example_DATA)'; test -n "$(exampledir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(exampledir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(exampledir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -416,7 +458,7 @@
all-am: Makefile $(PROGRAMS) $(DATA)
installdirs:
for dir in "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(exampledir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -438,6 +480,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -451,7 +494,7 @@
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -459,18 +502,38 @@
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am: install-exampleDATA install-examplePROGRAMS
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -491,22 +554,25 @@
ps-am:
-uninstall-am: uninstall-exampleDATA uninstall-examplePROGRAMS \
- uninstall-info-am
+uninstall-am: uninstall-exampleDATA uninstall-examplePROGRAMS
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean \
clean-examplePROGRAMS clean-generic clean-libtool ctags \
distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-exampleDATA install-examplePROGRAMS \
- install-exec install-exec-am install-info install-info-am \
- install-man install-strip installcheck installcheck-am \
+ install-data-am install-dvi install-dvi-am install-exampleDATA \
+ install-examplePROGRAMS install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-exampleDATA uninstall-examplePROGRAMS \
- uninstall-info-am
+ uninstall-am uninstall-exampleDATA uninstall-examplePROGRAMS
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -Nru cunit-2.1-0.dfsg/Examples/CursesTest/CursesTest_v1.c cunit-2.1-2.dfsg/Examples/CursesTest/CursesTest_v1.c
--- cunit-2.1-0.dfsg/Examples/CursesTest/CursesTest_v1.c 2005-04-23 01:04:46.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/CursesTest/CursesTest_v1.c 1970-01-01 00:00:00.000000000 +0000
@@ -1,254 +0,0 @@
-/*
- * CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include
-#include
-#include
-
-#include "CUCurses.h"
-
-int success_init(void) { return 0; }
-int success_clean(void) { return 0; }
-
-void testSuccess1(void) { ASSERT(1); }
-void testSuccess2(void) { ASSERT(1); }
-void testSuccess3(void) { ASSERT(1); }
-
-void testfailure1(void) { ASSERT(0); }
-void testfailure2(void) { ASSERT(2); }
-void testfailure3(void) { ASSERT(3); }
-
-int group_failure_init(void) { return 1;}
-int group_failure_clean(void) { return 1; }
-
-void testGroupFailure1(void) { ASSERT(0); }
-void testGroupFailure2(void) { ASSERT(2); }
-
-int init(void) { return 0; }
-int clean(void) { return 0; }
-
-void test1(void)
-{
- ASSERT((char *)2 != "THis is positive test.");
- ASSERT((char *)2 == "THis is negative test. test 1");
-}
-
-void test2(void)
-{
- ASSERT((char *)2 != "THis is positive test.");
- ASSERT((char *)3 == "THis is negative test. test 2");
-}
-
-void testSuccessSimpleAssert(void)
-{
- ASSERT(1) ;
- ASSERT(!0) ;
-}
-
-void testSuccessAssertTrue(void)
-{
- ASSERT_TRUE(TRUE) ;
- ASSERT_TRUE(!FALSE) ;
-}
-
-void testSuccessAssertFalse(void)
-{
- ASSERT_FALSE(FALSE) ;
- ASSERT_FALSE(!TRUE) ;
-}
-
-void testSuccessAssertEqual(void)
-{
- ASSERT_EQUAL(10, 10) ;
- ASSERT_EQUAL(0, 0) ;
- ASSERT_EQUAL(0, -0) ;
- ASSERT_EQUAL(-12, -12) ;
-}
-
-void testSuccessAssertNotEqual(void)
-{
- ASSERT_NOT_EQUAL(10, 11) ;
- ASSERT_NOT_EQUAL(0, -1) ;
- ASSERT_NOT_EQUAL(-12, -11) ;
-}
-
-void testSuccessAssertPtrEqual(void)
-{
- ASSERT_PTR_EQUAL((void*)0x100, (void*)0x101) ;
-}
-
-void testSuccessAssertPtrNotEqual(void)
-{
- ASSERT_PTR_NOT_EQUAL((void*)0x100, (void*)0x100) ;
-}
-
-void testSuccessAssertPtrNull(void)
-{
- ASSERT_PTR_NULL((void*)0x23) ;
-}
-
-void testSuccessAssertPtrNotNull(void)
-{
- ASSERT_PTR_NOT_NULL(NULL) ;
- ASSERT_PTR_NOT_NULL(0x0) ;
-}
-
-void testSuccessAssertStringEqual(void)
-{
- char str1[] = "test" ;
- char str2[] = "test" ;
-
- ASSERT_STRING_EQUAL(str1, str2) ;
-}
-
-void testSuccessAssertStringNotEqual(void)
-{
- char str1[] = "test" ;
- char str2[] = "testtsg" ;
-
- ASSERT_STRING_NOT_EQUAL(str1, str2) ;
-}
-
-void testSuccessAssertNStringEqual(void)
-{
- char str1[] = "test" ;
- char str2[] = "testgfsg" ;
-
- ASSERT_NSTRING_EQUAL(str1, str2, strlen(str1)) ;
- ASSERT_NSTRING_EQUAL(str1, str1, strlen(str1)) ;
- ASSERT_NSTRING_EQUAL(str1, str1, strlen(str1) + 1) ;
-}
-
-void testSuccessAssertNStringNotEqual(void)
-{
- char str1[] = "test" ;
- char str2[] = "teet" ;
- char str3[] = "testgfsg" ;
-
- ASSERT_NSTRING_NOT_EQUAL(str1, str2, 3) ;
- ASSERT_NSTRING_NOT_EQUAL(str1, str3, strlen(str1) + 1) ;
-}
-
-void testSuccessAssertDoubleEqual(void)
-{
- ASSERT_DOUBLE_EQUAL(10, 10.0001, 0.0001) ;
- ASSERT_DOUBLE_EQUAL(10, 10.0001, -0.0001) ;
- ASSERT_DOUBLE_EQUAL(-10, -10.0001, 0.0001) ;
- ASSERT_DOUBLE_EQUAL(-10, -10.0001, -0.0001) ;
-}
-
-void testSuccessAssertDoubleNotEqual(void)
-{
- ASSERT_DOUBLE_NOT_EQUAL(10, 10.001, 0.0001) ;
- ASSERT_DOUBLE_NOT_EQUAL(10, 10.001, -0.0001) ;
- ASSERT_DOUBLE_NOT_EQUAL(-10, -10.001, 0.0001) ;
- ASSERT_DOUBLE_NOT_EQUAL(-10, -10.001, -0.0001) ;
-}
-
-void AddTests(void)
-{
- PTestGroup pGroup = NULL;
- PTestCase pTest = NULL;
-
- pGroup = add_test_group("Sucess", success_init, success_clean);
- pTest = add_test_case(pGroup, "testSuccess1", testSuccess1);
- pTest = add_test_case(pGroup, "testSuccess2", testSuccess2);
- pTest = add_test_case(pGroup, "testSuccess3", testSuccess3);
-
- pGroup = add_test_group("failure", NULL, NULL);
- pTest = add_test_case(pGroup, "testfailure1", testfailure1);
- pTest = add_test_case(pGroup, "testfailure2", testfailure2);
- pTest = add_test_case(pGroup, "testfailure3", testfailure3);
-
- pGroup = add_test_group("group_failure", group_failure_init, group_failure_clean);
- pTest = add_test_case(pGroup, "testGroupFailure1", testGroupFailure1);
- pTest = add_test_case(pGroup, "testGroupFailure2", testGroupFailure2);
-}
-
-void AddAssertTests(void)
-{
- PTestGroup pGroup = NULL;
- PTestCase pTest = NULL;
-
- pGroup = add_test_group("TestSimpleAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessSimpleAssert", testSuccessSimpleAssert);
-
- pGroup = add_test_group("TestBooleanAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertTrue", testSuccessAssertTrue);
- pTest = add_test_case(pGroup, "testSuccessAssertFalse", testSuccessAssertFalse);
-
- pGroup = add_test_group("TestEqualityAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertEqual", testSuccessAssertEqual);
- pTest = add_test_case(pGroup, "testSuccessAssertNotEqual", testSuccessAssertNotEqual);
-
- pGroup = add_test_group("TestPointerAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertPtrEqual", testSuccessAssertPtrEqual);
- pTest = add_test_case(pGroup, "testSuccessAssertPtrNotEqual", testSuccessAssertPtrNotEqual);
-
- pGroup = add_test_group("TestNullnessAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertPtrNull", testSuccessAssertPtrNull);
- pTest = add_test_case(pGroup, "testSuccessAssertPtrNotNull", testSuccessAssertPtrNotNull);
-
- pGroup = add_test_group("TestStringAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertStringEqual", testSuccessAssertStringEqual);
- pTest = add_test_case(pGroup, "testSuccessAssertStringNotEqual", testSuccessAssertStringNotEqual);
-
- pGroup = add_test_group("TestNStringAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertNStringEqual", testSuccessAssertNStringEqual);
- pTest = add_test_case(pGroup, "testSuccessAssertNStringNotEqual", testSuccessAssertNStringNotEqual);
-
- pGroup = add_test_group("TestDoubleAssert", NULL, NULL);
- pTest = add_test_case(pGroup, "testSuccessAssertDoubleEqual", testSuccessAssertDoubleEqual);
- pTest = add_test_case(pGroup, "testSuccessAssertDoubleNotEqual", testSuccessAssertDoubleNotEqual);
-}
-
-
-int main(int argc, char* argv[])
-{
- setvbuf(stdout, NULL, _IONBF, 0);
-
- if (argc > 1) {
- BOOL Run = FALSE ;
- if (initialize_registry()) {
- printf("\nInitialize of test Registry failed.");
- }
-
- if (!strcmp("--test", argv[1])) {
- Run = TRUE ;
- AddTests();
- }
- else if (!strcmp("--atest", argv[1])) {
- Run = TRUE ;
- AddAssertTests();
- }
- else if (!strcmp("--alltest", argv[1])) {
- Run = TRUE ;
- AddTests();
- AddAssertTests();
- }
-
- if (TRUE == Run) {
- curses_run_tests();
- }
-
- cleanup_registry();
- }
-
- return 0;
-}
diff -Nru cunit-2.1-0.dfsg/Examples/CursesTest/Jamfile cunit-2.1-2.dfsg/Examples/CursesTest/Jamfile
--- cunit-2.1-0.dfsg/Examples/CursesTest/Jamfile 2006-03-21 01:30:56.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/CursesTest/Jamfile 1970-01-01 00:00:00.000000000 +0000
@@ -1,64 +0,0 @@
-#
-# Jamfile to build CUnit - Examples/CursesTest
-# (see http://www.freetype.org/jam/index.html)
-#
-# Copyright (C) 2004-2006 Jerry St.Clair
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#---------------------------------------------------------------------------
-
-SubDir TOP Examples CursesTest ;
-
-if $(BUILD_EXAMPLES) && $(BUILD_CURSES)
-{
- SubDirHdrs $(CUNIT_HDR_DIR) $(CUNIT_WIN_DIR) ;
-
- # set location for temporary files
- LOCATE_TARGET = $(BUILD_DIR)$(SLASH)Examples$(SLASH)CursesTest ;
- SEARCH_SOURCE += $(EXAMPLES_DIR) ;
-
- Main CursesTest : CursesTest.c ExampleTests.c ;
- LinkLibraries CursesTest$(SUFEXE) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
- LINKLIBS on CursesTest$(SUFEXE) += $(SYS_LIBS) ;
-
- MakeLocate CursesTest$(SUFEXE) : $(BUILD_DIR) ;
- LOCATE on libncurses$(SUFLIB) = $(SYS_LIB_DIR) ;
-
- if $(USE_DEPRECATED_NAMES)
- {
- Main CursesTest_v1 : CursesTest_v1.c ;
- LinkLibraries CursesTest_v1$(SUFEXE) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
- LINKLIBS on CursesTest_v1$(SUFEXE) += $(SYS_LIBS) ;
- MakeLocate CursesTest_v1$(SUFEXE) : $(BUILD_DIR) ;
-
- ObjectCcFlags CursesTest_v1.c : $(USE_DEPRECATED_NAMES) ;
- }
-
- if $(NT) && ($(BCCROOT) || ($(TOOLSET) = BORLANDC))
- {
- # need to fix Borland to include library location
- LINKFLAGS on CursesTest$(SUFEXE) += -L$(STDLIBPATH) -tW ;
- if $(USE_DEPRECATED_NAMES)InstallCunitFile
- { LINKFLAGS on CursesTest_v1$(SUFEXE) += -L$(STDLIBPATH) -tW ; }
- }
-
- if $(INSTALL_EXAM_DIR)
- {
- InstallCUnitBin $(INSTALL_EXAM_DIR)$(SLASH)Curses : CursesTest$(SUFEXE) ;
- InstallCUnitFile $(INSTALL_EXAM_DIR)$(SLASH)Curses : README ;
- if $(USE_DEPRECATED_NAMES)
- { InstallCUnitBin $(INSTALL_EXAM_DIR)$(SLASH)Curses : CursesTest_v1$(SUFEXE) ; }
- }
-}
diff -Nru cunit-2.1-0.dfsg/Examples/CursesTest/Makefile.am cunit-2.1-2.dfsg/Examples/CursesTest/Makefile.am
--- cunit-2.1-0.dfsg/Examples/CursesTest/Makefile.am 2006-03-21 01:30:56.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/CursesTest/Makefile.am 2010-10-14 08:42:37.000000000 +0000
@@ -7,11 +7,14 @@
example_PROGRAMS = CursesTest
-CursesTest_SOURCES = CursesTest.c CursesTest.h
-CursesTest_LDADD = -lcunit -lcunitexamples -lncurses
+CursesTest_SOURCES = CursesTest.c
+CursesTest_LDADD = -lcunit -lcunitexamples
CursesTest_LDFLAGS = -L.. -lm
INCLUDES = -I..
+if ENABLE_CURSES
+CursesTest_LDADD += -l$(CURSES_LIB)
+endif
example_DATA = README
endif
diff -Nru cunit-2.1-0.dfsg/Examples/CursesTest/Makefile.in cunit-2.1-2.dfsg/Examples/CursesTest/Makefile.in
--- cunit-2.1-0.dfsg/Examples/CursesTest/Makefile.in 2006-03-22 10:57:15.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/CursesTest/Makefile.in 2010-10-15 15:11:42.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,15 +16,12 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,7 @@
@ENABLE_CURSES_TRUE@@ENABLE_EXAMPLES_TRUE@example_PROGRAMS = \
@ENABLE_CURSES_TRUE@@ENABLE_EXAMPLES_TRUE@ CursesTest$(EXEEXT)
subdir = Examples/CursesTest
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -48,24 +46,29 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(exampledir)"
-examplePROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(example_PROGRAMS)
-am__CursesTest_SOURCES_DIST = CursesTest.c CursesTest.h
+am__CursesTest_SOURCES_DIST = CursesTest.c
@ENABLE_CURSES_TRUE@@ENABLE_EXAMPLES_TRUE@am_CursesTest_OBJECTS = CursesTest.$(OBJEXT)
CursesTest_OBJECTS = $(am_CursesTest_OBJECTS)
CursesTest_DEPENDENCIES =
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+CursesTest_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(CursesTest_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(CursesTest_SOURCES)
DIST_SOURCES = $(am__CursesTest_SOURCES_DIST)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -73,15 +76,27 @@
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-exampleDATA_INSTALL = $(INSTALL_DATA)
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
DATA = $(example_DATA)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -100,40 +115,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -143,35 +145,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -183,31 +190,46 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
exampledir = ${datadir}/@PACKAGE@/Examples/Curses
-@ENABLE_CURSES_TRUE@@ENABLE_EXAMPLES_TRUE@CursesTest_SOURCES = CursesTest.c CursesTest.h
-@ENABLE_CURSES_TRUE@@ENABLE_EXAMPLES_TRUE@CursesTest_LDADD = -lcunit -lcunitexamples -lncurses
+@ENABLE_CURSES_TRUE@@ENABLE_EXAMPLES_TRUE@CursesTest_SOURCES = CursesTest.c
+@ENABLE_CURSES_TRUE@@ENABLE_EXAMPLES_TRUE@CursesTest_LDADD = -lcunit \
+@ENABLE_CURSES_TRUE@@ENABLE_EXAMPLES_TRUE@ -lcunitexamples \
+@ENABLE_CURSES_TRUE@@ENABLE_EXAMPLES_TRUE@ -l$(CURSES_LIB)
@ENABLE_CURSES_TRUE@@ENABLE_EXAMPLES_TRUE@CursesTest_LDFLAGS = -L.. -lm
@ENABLE_CURSES_TRUE@@ENABLE_EXAMPLES_TRUE@INCLUDES = -I..
@ENABLE_CURSES_TRUE@@ENABLE_EXAMPLES_TRUE@example_DATA = README
@@ -219,14 +241,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Examples/CursesTest/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu Examples/CursesTest/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Examples/CursesTest/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Examples/CursesTest/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -244,37 +266,53 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
install-examplePROGRAMS: $(example_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(exampledir)" || $(mkdir_p) "$(DESTDIR)$(exampledir)"
- @list='$(example_PROGRAMS)'; for p in $$list; do \
- p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- if test -f $$p \
- || test -f $$p1 \
- ; then \
- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(examplePROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(exampledir)/$$f'"; \
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(examplePROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(exampledir)/$$f" || exit 1; \
- else :; fi; \
- done
+ test -z "$(exampledir)" || $(MKDIR_P) "$(DESTDIR)$(exampledir)"
+ @list='$(example_PROGRAMS)'; test -n "$(exampledir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(exampledir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(exampledir)$$dir" || exit $$?; \
+ } \
+ ; done
uninstall-examplePROGRAMS:
@$(NORMAL_UNINSTALL)
- @list='$(example_PROGRAMS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " rm -f '$(DESTDIR)$(exampledir)/$$f'"; \
- rm -f "$(DESTDIR)$(exampledir)/$$f"; \
- done
+ @list='$(example_PROGRAMS)'; test -n "$(exampledir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(exampledir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(exampledir)" && rm -f $$files
clean-examplePROGRAMS:
- @list='$(example_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
+ @list='$(example_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
CursesTest$(EXEEXT): $(CursesTest_OBJECTS) $(CursesTest_DEPENDENCIES)
@rm -f CursesTest$(EXEEXT)
- $(LINK) $(CursesTest_LDFLAGS) $(CursesTest_OBJECTS) $(CursesTest_LDADD) $(LIBS)
+ $(CursesTest_LINK) $(CursesTest_OBJECTS) $(CursesTest_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -285,22 +323,22 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CursesTest.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -310,100 +348,106 @@
clean-libtool:
-rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
install-exampleDATA: $(example_DATA)
@$(NORMAL_INSTALL)
- test -z "$(exampledir)" || $(mkdir_p) "$(DESTDIR)$(exampledir)"
- @list='$(example_DATA)'; for p in $$list; do \
+ test -z "$(exampledir)" || $(MKDIR_P) "$(DESTDIR)$(exampledir)"
+ @list='$(example_DATA)'; test -n "$(exampledir)" || list=; \
+ for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(exampleDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(exampledir)/$$f'"; \
- $(exampleDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(exampledir)/$$f"; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(exampledir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(exampledir)" || exit $$?; \
done
uninstall-exampleDATA:
@$(NORMAL_UNINSTALL)
- @list='$(example_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(exampledir)/$$f'"; \
- rm -f "$(DESTDIR)$(exampledir)/$$f"; \
- done
+ @list='$(example_DATA)'; test -n "$(exampledir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(exampledir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(exampledir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -412,7 +456,7 @@
all-am: Makefile $(PROGRAMS) $(DATA)
installdirs:
for dir in "$(DESTDIR)$(exampledir)" "$(DESTDIR)$(exampledir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -434,6 +478,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -447,7 +492,7 @@
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-am
@@ -455,18 +500,38 @@
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am: install-exampleDATA install-examplePROGRAMS
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man:
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -487,22 +552,25 @@
ps-am:
-uninstall-am: uninstall-exampleDATA uninstall-examplePROGRAMS \
- uninstall-info-am
+uninstall-am: uninstall-exampleDATA uninstall-examplePROGRAMS
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean \
clean-examplePROGRAMS clean-generic clean-libtool ctags \
distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-exampleDATA install-examplePROGRAMS \
- install-exec install-exec-am install-info install-info-am \
- install-man install-strip installcheck installcheck-am \
+ install-data-am install-dvi install-dvi-am install-exampleDATA \
+ install-examplePROGRAMS install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-exampleDATA uninstall-examplePROGRAMS \
- uninstall-info-am
+ uninstall-am uninstall-exampleDATA uninstall-examplePROGRAMS
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -Nru cunit-2.1-0.dfsg/Examples/Demo_fprintf/CUnitExample.c cunit-2.1-2.dfsg/Examples/Demo_fprintf/CUnitExample.c
--- cunit-2.1-0.dfsg/Examples/Demo_fprintf/CUnitExample.c 2005-05-03 02:53:52.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/Demo_fprintf/CUnitExample.c 1970-01-01 00:00:00.000000000 +0000
@@ -1,130 +0,0 @@
-/*
- * Simple example of a CUnit unit test.
- *
- * This program (crudely) demonstrates a very simple "black box"
- * test of the standard library functions fprintf() and fread().
- * It uses suite initialization and cleanup functions to open
- * and close a common temporary file used by the test functions.
- * The test functions then write to and read from the temporary
- * file in the course of testing the library functions.
- *
- * The 2 test functions are added to a single CUnit suite, and
- * then run using the CUnit Basic interface. The output of the
- * program (on CUnit version 2.0-2) is:
- *
- * CUnit : A Unit testing framework for C.
- * http://cunit.sourceforge.net/
- *
- * Suite: Suite_1
- * Test: test of fprintf() ... passed
- * Test: test of fread() ... passed
- *
- * --Run Summary: Type Total Ran Passed Failed
- * suites 1 1 n/a 0
- * tests 2 2 2 0
- * asserts 5 5 5 0
- */
-
-#include
-#include
-#include "CUnit/Basic.h"
-
-/* Pointer to the file used by the tests. */
-static FILE* temp_file = NULL;
-
-/* The suite initialization function.
- * Opens the temporary file used by the tests.
- * Returns zero on success, non-zero otherwise.
- */
-int init_suite1(void)
-{
- if (NULL == (temp_file = fopen("temp.txt", "w+"))) {
- return -1;
- }
- else {
- return 0;
- }
-}
-
-/* The suite cleanup function.
- * Closes the temporary file used by the tests.
- * Returns zero on success, non-zero otherwise.
- */
-int clean_suite1(void)
-{
- if (0 != fclose(temp_file)) {
- return -1;
- }
- else {
- temp_file = NULL;
- return 0;
- }
-}
-
-/* Simple test of fprintf().
- * Writes test data to the temporary file and checks
- * whether the expected number of bytes were written.
- */
-void testFPRINTF(void)
-{
- int i1 = 10;
-
- if (NULL != temp_file) {
- CU_ASSERT(0 == fprintf(temp_file, ""));
- CU_ASSERT(2 == fprintf(temp_file, "Q\n"));
- CU_ASSERT(7 == fprintf(temp_file, "i1 = %d", i1));
- }
-}
-
-/* Simple test of fread().
- * Reads the data previously written by testFPRINTF()
- * and checks whether the expected characters are present.
- * Must be run after testFPRINTF().
- */
-void testFREAD(void)
-{
- unsigned char buffer[20];
-
- if (NULL != temp_file) {
- rewind(temp_file);
- CU_ASSERT(9 == fread(buffer, sizeof(unsigned char), 20, temp_file));
- CU_ASSERT(0 == strncmp(buffer, "Q\ni1 = 10", 9));
- }
-}
-
-/* The main() function for setting up and running the tests.
- * Returns a CUE_SUCCESS on successful running, another
- * CUnit error code on failure.
- */
-int main()
-{
- CU_pSuite pSuite = NULL;
-
- /* initialize the CUnit test registry */
- if (CUE_SUCCESS != CU_initialize_registry())
- return CU_get_error();
-
- /* add a suite to the registry */
- pSuite = CU_add_suite("Suite_1", init_suite1, clean_suite1);
- if (NULL == pSuite) {
- CU_cleanup_registry();
- return CU_get_error();
- }
-
- /* add the tests to the suite */
- /* NOTE - ORDER IS IMPORTANT - MUST TEST fread() AFTER fprintf() */
- if ((NULL == CU_add_test(pSuite, "test of fprintf()", testFPRINTF)) ||
- (NULL == CU_add_test(pSuite, "test of fread()", testFREAD)))
- {
- CU_cleanup_registry();
- return CU_get_error();
- }
-
- /* Run all tests using the console interface */
- CU_basic_set_mode(CU_BRM_VERBOSE);
- CU_basic_run_tests();
- CU_cleanup_registry();
- return CU_get_error();
-}
-
-
diff -Nru cunit-2.1-0.dfsg/Examples/ExampleTests.c cunit-2.1-2.dfsg/Examples/ExampleTests.c
--- cunit-2.1-0.dfsg/Examples/ExampleTests.c 2005-05-08 04:06:24.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/ExampleTests.c 2006-05-19 21:57:27.000000000 +0000
@@ -24,6 +24,7 @@
#include
#include "CUnit.h"
+#include "ExampleTests.h"
/* WARNING - MAINTENANCE NIGHTMARE AHEAD
*
diff -Nru cunit-2.1-0.dfsg/Examples/ExampleTests.h cunit-2.1-2.dfsg/Examples/ExampleTests.h
--- cunit-2.1-0.dfsg/Examples/ExampleTests.h 2006-01-30 03:53:56.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/ExampleTests.h 1970-01-01 00:00:00.000000000 +0000
@@ -1,36 +0,0 @@
-/*
- * CUnit - A Unit testing framework library for C.
- * Copyright (C) 2001 Anil Kumar
- * Copyright (C) 2004 Anil Kumar, Jerry St.Clair
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef CUNIT_EXAMPLETESTS_H_SEEN
-#define CUNIT_EXAMPLETESTS_H_SEEN
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void AddTests(void);
-void print_example_results(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CUNIT_EXAMPLETESTS_H_SEEN */
-
diff -Nru cunit-2.1-0.dfsg/Examples/Jamfile cunit-2.1-2.dfsg/Examples/Jamfile
--- cunit-2.1-0.dfsg/Examples/Jamfile 2006-03-21 01:30:56.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/Jamfile 1970-01-01 00:00:00.000000000 +0000
@@ -1,64 +0,0 @@
-#
-# Jamfile to build CUnit - Examples root Directory
-# (see http://www.freetype.org/jam/index.html)
-#
-# Copyright (C) 2004-2006 Jerry St.Clair
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#---------------------------------------------------------------------------
-
-SubDir TOP Examples ;
-
-if $(BUILD_AUTOMATED)
-{
- DEPENDS examples : AutomatedTest$(SUFEXE) ;
- if $(USE_DEPRECATED_NAMES)
- { DEPENDS examples : AutomatedTest_v1$(SUFEXE) ; }
-}
-if $(BUILD_BASIC)
- { DEPENDS examples : BasicTest$(SUFEXE) ; }
-if $(BUILD_CONSOLE)
-{
- DEPENDS examples : ConsoleTest$(SUFEXE) ;
- if $(USE_DEPRECATED_NAMES)
- { DEPENDS examples : ConsoleTest_v1$(SUFEXE) ; }
-}
-if $(BUILD_CURSES)
-{
- DEPENDS examples : CursesTest$(SUFEXE) ;
- if $(USE_DEPRECATED_NAMES)
- { DEPENDS examples : CursesTest_v1$(SUFEXE) ; }
-}
-if $(BUILD_WINDOWS)
-{
- DEPENDS examples : WinTest$(SUFEXE) ;
- if $(USE_DEPRECATED_NAMES)
- { DEPENDS examples : WinTest_v1$(SUFEXE) ; }
-}
-
-DEPENDS all : examples ;
-NOTFILE examples ;
-
-if $(BUILD_AUTOMATED)
- { SubInclude TOP Examples AutomatedTest ; }
-if $(BUILD_BASIC)
- { SubInclude TOP Examples BasicTest ; }
-if $(BUILD_CONSOLE)
- { SubInclude TOP Examples ConsoleTest ; }
-if $(BUILD_CURSES)
- { SubInclude TOP Examples CursesTest ; }
-if $(BUILD_WINDOWS)
- { SubInclude TOP Examples WinTest ; }
-
diff -Nru cunit-2.1-0.dfsg/Examples/Makefile.in cunit-2.1-2.dfsg/Examples/Makefile.in
--- cunit-2.1-0.dfsg/Examples/Makefile.in 2006-03-22 10:57:16.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/Makefile.in 2010-10-15 15:11:42.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -45,6 +43,7 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
libcunitexamples_a_AR = $(AR) $(ARFLAGS)
@@ -53,32 +52,63 @@
@ENABLE_EXAMPLES_TRUE@am_libcunitexamples_a_OBJECTS = \
@ENABLE_EXAMPLES_TRUE@ ExampleTests.$(OBJEXT)
libcunitexamples_a_OBJECTS = $(am_libcunitexamples_a_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
+am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
SOURCES = $(libcunitexamples_a_SOURCES)
DIST_SOURCES = $(am__libcunitexamples_a_SOURCES_DIST)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = . BasicTest ConsoleTest CursesTest AutomatedTest
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -97,40 +127,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -140,35 +157,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -180,28 +202,41 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
EXAMPLE_DIRS = . $(BASIC_EXAMPLE_DIRS) $(CONSOLE_EXAMPLE_DIRS) \
$(CURSES_EXAMPLE_DIRS) $(AUTOMATED_EXAMPLE_DIRS)
@ENABLE_BASIC_TRUE@BASIC_EXAMPLE_DIRS = BasicTest
@@ -219,14 +254,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Examples/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu Examples/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Examples/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Examples/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -244,6 +279,7 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
@@ -261,22 +297,22 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ExampleTests.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
@@ -287,10 +323,6 @@
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
@@ -298,7 +330,7 @@
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -315,16 +347,15 @@
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -350,16 +381,16 @@
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -367,14 +398,14 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
@@ -386,81 +417,101 @@
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
@@ -490,6 +541,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -503,7 +555,7 @@
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
+ distclean-tags
dvi: dvi-recursive
@@ -511,18 +563,38 @@
html: html-recursive
+html-am:
+
info: info-recursive
info-am:
install-data-am:
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-recursive
+
+install-html-am:
+
install-info: install-info-recursive
+install-info-am:
+
install-man:
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -543,23 +615,26 @@
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-noinstLIBRARIES \
- clean-recursive ctags ctags-recursive distclean \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ clean-noinstLIBRARIES ctags ctags-recursive distclean \
distclean-compile distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
- tags tags-recursive uninstall uninstall-am uninstall-info-am
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -Nru cunit-2.1-0.dfsg/Examples/WinTest/Jamfile cunit-2.1-2.dfsg/Examples/WinTest/Jamfile
--- cunit-2.1-0.dfsg/Examples/WinTest/Jamfile 2006-03-21 01:30:58.000000000 +0000
+++ cunit-2.1-2.dfsg/Examples/WinTest/Jamfile 1970-01-01 00:00:00.000000000 +0000
@@ -1,53 +0,0 @@
-#
-# Jamfile to build CUnit - Examples/WinTest
-# (see http://www.freetype.org/jam/index.html)
-#
-# Copyright (C) 2004-2006 Jerry St.Clair
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#---------------------------------------------------------------------------
-
-SubDir TOP Examples WinTest ;
-
-if $(BUILD_EXAMPLES) && $(BUILD_WINDOWS)
-{
- SubDirHdrs $(CUNIT_HDR_DIR) $(CUNIT_WIN_DIR) ;
-
- # set location for temporary files
- LOCATE_TARGET = $(BUILD_DIR)$(SLASH)Examples$(SLASH)WinTest ;
-
- Main WinTest : StdAfx.cpp WinTest.cpp ;
- LinkLibraries WinTest$(SUFEXE) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
-
- if $(USE_DEPRECATED_NAMES)
- {
- Main WinTest_v1 : StdAfx.cpp WinTest_v1.cpp ;
- LinkLibraries WinTest_v1$(SUFEXE) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
-
- ObjectC++Flags WinTest_v1.cpp : $(CCFLAGS) $(USE_DEPRECATED_NAMES) ;
- }
-
- if $(NT) && ($(BCCROOT) || ($(TOOLSET) = BORLANDC))
- {
- # need to fix Borland to include library location
- LINKFLAGS on WinTest$(SUFEXE) += -L$(STDLIBPATH) -tW ;
- if $(USE_DEPRECATED_NAMES)
- { LINKFLAGS on WinTest_v1$(SUFEXE) += -L$(STDLIBPATH) -tW ; }
- }
-
- MakeLocate WinTest$(SUFEXE) : $(BUILD_DIR) ;
- if $(USE_DEPRECATED_NAMES)
- { MakeLocate WinTest_v1$(SUFEXE) : $(BUILD_DIR) ; }
-}
diff -Nru cunit-2.1-0.dfsg/Jambase cunit-2.1-2.dfsg/Jambase
--- cunit-2.1-0.dfsg/Jambase 2005-04-23 01:13:34.000000000 +0000
+++ cunit-2.1-2.dfsg/Jambase 1970-01-01 00:00:00.000000000 +0000
@@ -1,2245 +0,0 @@
-#
-# /+\
-# +\ Copyright 1993, 2000 Christopher Seiwald.
-# \+/
-#
-# This file is part of Jam - see jam.c for Copyright information.
-#
-
-#
-# JAMBASE - jam 2.3 ruleset providing make(1)-like functionality
-#
-# Supports UNIX, NT, and VMS.
-#
-# 12/27/93 (seiwald) - purturb library sources with SOURCE_GRIST
-# 04/18/94 (seiwald) - use '?=' when setting OS specific vars
-# 04/21/94 (seiwald) - do RmTemps together
-# 05/05/94 (seiwald) - all supported C compilers support -o: relegate
-# RELOCATE as an option; set Ranlib to "" to disable it
-# 06/01/94 (seiwald) - new 'actions existing' to do existing sources
-# 08/25/94 (seiwald) - new ObjectCcFlags rule to append to per-target CCFLAGS
-# 08/29/94 (seiwald) - new ObjectHdrs rule to append to per-target HDRS
-# 09/19/94 (seiwald) - LinkLibraries and Undefs now append
-# - Rule names downshifted.
-# 10/06/94 (seiwald) - Dumb yyacc stuff moved into Jamfile.
-# 10/14/94 (seiwald) - (Crude) support for .s, .C, .cc, .cpp, and .f files.
-# 01/08/95 (seiwald) - Shell now handled with awk, not sed
-# 01/09/95 (seiwald) - Install* now take dest directory as target
-# 01/10/95 (seiwald) - All entries sorted.
-# 01/10/95 (seiwald) - NT support moved in, with LauraW's help.
-# 01/10/95 (seiwald) - VMS support moved in.
-# 02/06/95 (seiwald) - ObjectC++Flags and SubDirC++Flags added.
-# 02/07/95 (seiwald) - Iron out when HDRSEARCH uses "" or SEARCH_SOURCE.
-# 02/08/95 (seiwald) - SubDir works on VMS.
-# 02/14/95 (seiwald) - MkDir and entourage.
-# 04/30/95 (seiwald) - Use install -c flag so that it copies, not moves.
-# 07/10/95 (taylor) - Support for Microsoft C++.
-# 11/21/96 (peterk) - Support for BeOS
-# 07/19/99 (sickel) - Support for Mac OS X Server (and maybe client)
-# 02/18/00 (belmonte)- Support for Cygwin.
-# 11/05/04 (st.clair)- Modified MinGW variables and actions
-
-# Special targets defined in this file:
-#
-# all - parent of first, shell, files, lib, exe
-# first - first dependent of 'all', for potential initialization
-# shell - parent of all Shell targets
-# files - parent of all File targets
-# lib - parent of all Library targets
-# exe - parent of all Main targets
-# dirs - parent of all MkDir targets
-# clean - removes all Shell, File, Library, and Main targets
-# uninstall - removes all Install targets
-#
-
-# Rules defined by this file:
-#
-# as obj.o : source.s ; .s -> .o
-# Bulk dir : files ; populate directory with many files
-# Cc obj.o : source.c ; .c -> .o
-# C++ obj.o : source.cc ; .cc -> .o
-# Clean clean : sources ; remove sources with 'jam clean'
-# File dest : source ; copy file
-# Fortran obj.o : source.f ; .f -> .o
-# GenFile source.c : program args ; make custom file
-# Hardlink target : source ; make link from source to target
-# HdrRule source : headers ; handle #includes
-# InstallInto dir : sources ; install any files
-# InstallBin dir : sources ; install binaries
-# InstallLib dir : sources ; install files
-# InstallFile dir : sources ; install files
-# InstallMan dir : sources ; install man pages
-# InstallShell dir : sources ; install shell scripts
-# Lex source.c : source.l ; .l -> .c
-# Library lib : source ; archive library from compiled sources
-# LibraryFromObjects lib : objects ; archive library from objects
-# LinkLibraries images : libraries ; bag libraries onto Mains
-# Main image : source ; link executable from compiled sources
-# MainFromObjects image : objects ; link executable from objects
-# MkDir dir ; make a directory, if not there
-# Object object : source ; compile object from source
-# ObjectCcFlags source : flags ; add compiler flags for object
-# ObjectC++Flags source : flags ; add compiler flags for object
-# ObjectHdrs source : dirs ; add include directories for object
-# Objects sources ; compile sources
-# RmTemps target : sources ; remove temp sources after target made
-# Setuid images ; mark executables Setuid
-# SubDir TOP d1 d2 ... ; start a subdirectory Jamfile
-# SubDirCcFlags flags ; add compiler flags until next SubDir
-# SubDirC++Flags flags ; add compiler flags until next SubDir
-# SubDirHdrs dirs ; add include dirs until next SubDir
-# SubInclude TOP d1 d2 ... ; include a subdirectory Jamfile
-# Shell exe : source ; make a shell executable
-# Undefines images : symbols ; save undef's for linking
-# UserObject object : source ; handle unknown suffixes for Object
-# Yacc source.c : source.y ; .y -> .c
-#
-# Utility rules that have no side effects (not supported):
-#
-# FAppendSuffix f1 f2 ... : $(SUF) ; return $(<) with suffixes
-# FConcat value ... ; return contatenated values
-# FDirName d1 d2 ... ; return path from root to dir
-# FGrist d1 d2 ... ; return d1!d2!...
-# FGristFiles value ; return $(value:G=$(SOURCE_GRIST))
-# FGristSourceFiles value ; return $(value:G=$(SOURCE_GRIST))
-# FRelPath d1 : d2 ; return rel path from d1 to d2
-# FSubDir d1 d2 ... ; return path to root
-#
-
-
-# Brief review of the jam language:
-#
-# Statements:
-# rule RULE - statements to process a rule
-# actions RULE - system commands to carry out target update
-#
-# Modifiers on actions:
-# together - multiple instances of same rule on target get executed
-# once with their sources ($(>)) concatenated
-# updated - refers to updated sources ($(>)) only
-# ignore - ignore return status of command
-# quietly - don't trace its execution unless verbose
-# piecemeal - iterate command each time with a small subset of $(>)
-# existing - refers to currently existing sources ($(>)) only
-# bind vars - subject to binding before expanding in actions
-#
-# Special rules:
-# ALWAYS - always build a target
-# DEPENDS - builds the dependency graph
-# ECHO - blurt out targets on stdout
-# EXIT - blurt out targets and exit
-# INCLUDES - marks sources as headers for target (a codependency)
-# NOCARE - don't panic if the target can't be built
-# NOUPDATE - create the target if needed but never update it
-# NOTFILE - ignore the timestamp of the target (it's not a file)
-# TEMPORARY - target need not be present if sources haven't changed
-#
-# Special variables set by jam:
-# $(<) - targets of a rule (to the left of the :)
-# $(>) - sources of a rule (to the right of the :)
-# $(xxx) - true on xxx (UNIX, VMS, NT, OS2, MAC)
-# $(OS) - name of OS - varies wildly
-# $(JAMVERSION) - version number (2.3)
-#
-# Special variables used by jam:
-# SEARCH - where to find something (used during binding and actions)
-# LOCATE - where to plop something not found with SEARCH
-# HDRRULE - rule to call to handle include files
-# HDRSCAN - egrep regex to extract include files
-#
-# Special targets:
-# all - default if none given on command line
-#
-
-# Initialize variables
-#
-
-#
-# OS specific variable settings
-#
-
-if $(NT)
-{
- # the list of supported toolsets on Windows NT and Windows 95/98
- #
- local SUPPORTED_TOOLSETS =
- "BORLANDC"
- "VISUALC"
- "VISUALC16"
- "INTELC"
- "WATCOM"
- "MINGW"
- "LCC"
- ;
-
- # this variable holds the current toolset
- #
- TOOLSET = "" ;
-
- # if the JAM_TOOLSET environment variable is defined, check that it is
- # one of our supported values
- #
- if $(JAM_TOOLSET)
- {
- local t ;
-
- for t in $(SUPPORTED_TOOLSETS)
- {
- if $(t) = $(JAM_TOOLSET) { TOOLSET = $(t) ; }
- }
-
- if ! $(TOOLSET)
- {
- ECHO "The JAM_TOOLSET environment variable is defined but its value" ;
- ECHO "is invalid, please use one of the following:" ;
- ECHO ;
-
- for t in $(SUPPORTED_TOOLSETS) { ECHO " " $(t) ; }
- EXIT ;
- }
- }
-
- # if TOOLSET is empty, we'll try to detect the toolset from other
- # environment variables to remain backwards compatible with Jam 2.3
- #
- if ! $(TOOLSET)
- {
- if $(BCCROOT)
- {
- TOOLSET = BORLANDC ;
- BORLANDC = $(BCCROOT) ;
- }
- else if $(MSVC)
- {
- TOOLSET = VISUALC16 ;
- VISUALC16 = $(MSVC) ;
- }
- else if $(MSVCNT)
- {
- TOOLSET = VISUALC ;
- VISUALC = $(MSVCNT) ;
- }
- else if $(MINGW)
- {
- TOOLSET = MINGW ;
- }
- else
- {
- ECHO "Jam cannot be run because you didn't indicate which compilation toolset" ;
- ECHO "to use. To do so, follow these simple instructions:" ;
- ECHO ;
- ECHO " - define one of the following environment variable, with the" ;
- ECHO " appropriate value according to this list:" ;
- ECHO ;
- ECHO " Variable Toolset Description" ;
- ECHO ;
- ECHO " BORLANDC Borland C++ BC++ install path" ;
- ECHO " VISUALC Microsoft Visual C++ VC++ install path" ;
- ECHO " VISUALC16 Microsoft Visual C++ 16 bit VC++ 16 bit install" ;
- ECHO " INTELC Intel C/C++ IC++ install path" ;
- ECHO " WATCOM Watcom C/C++ Watcom install path" ;
- ECHO " MINGW MinGW (gcc) MinGW install path" ;
- ECHO " LCC Win32-LCC LCC-Win32 install path" ;
- ECHO ;
- ECHO " - define the JAM_TOOLSET environment variable with the *name*" ;
- ECHO " of the toolset variable you want to use." ;
- ECHO ;
- ECHO " e.g.: set VISUALC=C:\Visual6" ;
- ECHO " set JAM_TOOLSET=VISUALC" ;
- ECHO ;
- EXIT ;
- }
- }
-
- CP ?= copy ;
- RM ?= del ;
- MV ?= move /Y ;
- SLASH ?= \\ ;
- SUFLIB ?= .lib ;
- SUFOBJ ?= .obj ;
- SUFEXE ?= .exe ;
-
- if $(TOOLSET) = BORLANDC
- {
- ECHO "Compiler is Borland C++" ;
-
- AR ?= tlib /C /P64 ;
- CC ?= bcc32 ;
- CCFLAGS ?= -q -y -d -v -w-par -w-ccc -w-rch -w-pro -w-aus ;
- C++ ?= bcc32 ;
- C++FLAGS ?= -q -y -d -v -w-par -w-ccc -w-rch -w-pro -w-aus -P ;
- STDLIBPATH ?= $(BORLANDC)\\lib ;
- STDHDRS ?= $(BORLANDC)\\include ;
- LINK ?= $(CC) ;
- LINKFLAGS ?= $(CCFLAGS) -L$(STDLIBPATH) ;
- NOARSCAN ?= true ;
- }
- else if $(TOOLSET) = VISUALC16
- {
- ECHO "Compiler is Microsoft Visual C++ 16 bit" ;
-
- AR ?= lib /nologo ;
- CC ?= cl /nologo ;
- CCFLAGS ?= /D \"WIN\" ;
- C++ ?= $(CC) ;
- C++FLAGS ?= $(CCFLAGS) ;
- LINK ?= $(CC) ;
- LINKFLAGS ?= $(CCFLAGS) ;
- LINKLIBS ?=
- #$(VISUALC16)\\lib\\advapi32.lib
- #$(VISUALC16)\\lib\\libcmt.lib
- $(VISUALC16)\\lib\\mlibce.lib
- #$(VISUALC16)\\lib\\slibce.lib
- $(VISUALC16)\\lib\\oldnames.lib
- #$(VISUALC16)\\lib\\kernel32.lib
- ;
- LINKLIBS ?= ;
- NOARSCAN ?= true ;
- OPTIM ?= "" ;
- STDHDRS ?= $(VISUALC16)\\include ;
- UNDEFFLAG ?= "/u _" ;
- }
- else if $(TOOLSET) = VISUALC
- {
- ECHO "Compiler is Microsoft Visual C++" ;
-
- AR ?= lib ;
- AS ?= masm386 ;
- CC ?= cl /nologo ;
- CCFLAGS ?= "" ;
- C++ ?= $(CC) ;
- C++FLAGS ?= $(CCFLAGS) ;
- LINK ?= link /nologo ;
- LINKFLAGS ?= "" ;
- LINKLIBS ?= /LIBPATH:$(VISUALC)\\lib
- /LIBPATH:$(VISUALC)\\PlatformSDK\\lib
- advapi32.lib
- libc.lib
- oldnames.lib
- gdi32.lib
- user32.lib
- kernel32.lib ;
- OPTIM ?= "" ;
- STDHDRS ?= $(VISUALC)\\include $(VISUALC)\\PlatformSDK\\include ;
- UNDEFFLAG ?= "/u _" ;
- }
- else if $(TOOLSET) = INTELC
- {
- ECHO "Compiler is Intel C/C++" ;
-
- if ! $(VISUALC)
- {
- ECHO "As a special exception, when using the Intel C++ compiler, you need" ;
- ECHO "to define the VISUALC environment variable to indicate the location" ;
- ECHO "of your Visual C++ installation. Aborting.." ;
- EXIT ;
- }
-
- AR ?= lib ;
- AS ?= masm386 ;
- CC ?= icl /nologo ;
- CCFLAGS ?= "" ;
- C++ ?= $(CC) ;
- C++FLAGS ?= $(CCFLAGS) ;
- LINK ?= link /nologo ;
- LINKFLAGS ?= "" ;
- LINKLIBS ?= $(VISUALC)\\lib\\advapi32.lib
- $(VISUALC)\\lib\\libc.lib
- $(VISUALC)\\lib\\oldnames.lib
- $(VISUALC)\\lib\\kernel32.lib ;
- OPTIM ?= "" ;
- STDHDRS ?= $(INTELC)\include $(VISUALC)\\include ;
- UNDEFFLAG ?= "/u _" ;
- }
- else if $(TOOLSET) = WATCOM
- {
- ECHO "Compiler is Watcom C/C++" ;
-
- AR ?= wlib ;
- CC ?= wcc386 ;
- CCFLAGS ?= /zq /DWIN32 /I$(WATCOM)\\h ; # zq=quiet
- C++ ?= wpp386 ;
- C++FLAGS ?= $(CCFLAGS) ;
- DOT ?= . ;
- DOTDOT ?= .. ;
- FORTRAN ?= wfc386 ;
- LINK ?= wcl386 ;
- LINKFLAGS ?= /zq ; # zq=quiet
- LINKLIBS ?= ;
- NOARSCAN ?= true ;
- OPTIM ?= ;
- STDHDRS ?= $(WATCOM)\\h $(WATCOM)\\h\\nt ;
- UNDEFFLAG ?= "/u _" ;
- }
- else if $(TOOLSET) = MINGW
- {
- ECHO "Compiler is GCC with Mingw" ;
-
- AR ?= ar -ru ;
- CC ?= gcc ;
- CCFLAGS ?= "" ;
- C++ ?= $(CC) ;
- C++FLAGS ?= $(CCFLAGS) ;
- FORTRAN ?= g77 ;
- LINK ?= $(CC) ;
- LINKFLAGS ?= "" ;
- LINKLIBS ?= "" ;
- OPTIM ?= ;
- SUFOBJ = .o ;
- SUFLIB = .a ;
-# NOARSCAN ?= true ;
- }
- else if $(TOOLSET) = LCC
- {
- ECHO "Compiler is Win32-LCC" ;
-
- AR ?= lcclib ;
- CC ?= lcc ;
- CCFLAGS ?= "" ;
- C++ ?= $(CC) ;
- C++FLAGS ?= $(CCFLAGS) ;
- LINK ?= lcclnk ;
- LINKFLAGS ?= "" ;
- LINKLIBS ?= "" ;
- OPTIM ?= ;
- NOARSCAN = true ;
- }
- else
- {
- EXIT On NT, did not recognize compiler type. ;
- }
-}
-
-else if $(OS2)
-{
- # the list of supported toolsets on Windows NT and Windows 95/98
- #
- local SUPPORTED_TOOLSETS = "EMX" "WATCOM" ;
-
- # this variable holds the current toolset
- #
- TOOLSET = "" ;
-
- # if the JAM_TOOLSET environment variable is defined, check that it is
- # one of our supported values
- #
- if $(JAM_TOOLSET)
- {
- local t ;
-
- for t in $(SUPPORTED_TOOLSETS)
- {
- if $(t) = $(JAM_TOOLSET) { TOOLSET = $(t) ; }
- }
-
- if ! $(TOOLSET)
- {
- ECHO "The JAM_TOOLSET environment variable is defined but its value" ;
- ECHO "is invalid, please use one of the following:" ;
- ECHO ;
-
- for t in $(SUPPORTED_TOOLSETS) { ECHO " " $(t) ; }
- EXIT ;
- }
- }
-
- # if TOOLSET is empty, we'll try to detect the toolset from other
- # environment variables to remain backwards compatible with Jam 2.3
- #
- if ! $(TOOLSET)
- {
- if $(watcom)
- {
- WATCOM = $(watcom) ;
- TOOLSET = WATCOM ;
- }
- else
- {
- ECHO "Jam cannot be run because you didn't indicate which compilation toolset" ;
- ECHO "to use. To do so, follow these simple instructions:" ;
- ECHO ;
- ECHO " - define one of the following environment variable, with the" ;
- ECHO " appropriate value according to this list:" ;
- ECHO ;
- ECHO " Variable Toolset Description" ;
- ECHO ;
- ECHO " WATCOM Watcom C/C++ Watcom install path" ;
- ECHO " EMX EMX (gcc) EMX install path" ;
- ECHO " VISUALAGE IBM Visual Age C/C++ VisualAge install path" ;
- ECHO ;
- ECHO " - define the JAM_TOOLSET environment variable with the *name*" ;
- ECHO " of the toolset variable you want to use." ;
- ECHO ;
- ECHO " e.g.: set WATCOM=C:\WATCOM" ;
- ECHO " set JAM_TOOLSET=WATCOM" ;
- ECHO ;
- EXIT ;
- }
- }
-
- RM = del /f ;
- CP = copy ;
- MV ?= move ;
- DOT ?= . ;
- DOTDOT ?= .. ;
- SUFLIB ?= .lib ;
- SUFOBJ ?= .obj ;
- SUFEXE ?= .exe ;
-
- if $(TOOLSET) = WATCOM
- {
- AR ?= wlib ;
- BINDIR ?= \\os2\\apps ;
- CC ?= wcc386 ;
- CCFLAGS ?= /zq /DOS2 /I$(WATCOM)\\h ; # zq=quiet
- C++ ?= wpp386 ;
- C++FLAGS ?= $(CCFLAGS) ;
- LINK ?= wcl386 ;
- LINKFLAGS ?= /zq ; # zq=quiet
- LINKLIBS ?= ;
- NOARSCAN ?= true ;
- OPTIM ?= ;
- SLASH ?= \\ ;
- STDHDRS ?= $(WATCOM)\\h ;
- UNDEFFLAG ?= "/u _" ;
- }
- else if $(TOOLSET) = EMX
- {
- ECHO "Compiler is GCC-EMX" ;
- AR ?= ar -ru ;
- CC ?= gcc ;
- CCFLAGS ?= "" ;
- C++ ?= $(CC) ;
- C++FLAGS ?= $(CCFLAGS) ;
- LINK ?= $(CC) ;
- LINKFLAGS ?= "" ;
- LINKLIBS ?= "" ;
- OPTIM ?= ;
- SUFOBJ = .o ;
- SUFLIB = .a ;
- UNDEFFLAG ?= "-U" ;
- SLASH = / ;
-# NOARSCAN ?= true ;
- }
- else
- {
- # should never happen
- EXIT "Sorry, but the $(JAM_TOOLSET) toolset isn't supported for now" ;
- }
-}
-else if $(VMS)
-{
- C++ ?= cxx ;
- C++FLAGS ?= ;
- CC ?= cc ;
- CCFLAGS ?= ;
- CHMOD ?= set file/prot= ;
- CP ?= copy/replace ;
- CRELIB ?= true ;
- DOT ?= [] ;
- DOTDOT ?= [-] ;
- EXEMODE ?= (w:e) ;
- FILEMODE ?= (w:r) ;
- HDRS ?= ;
- LINK ?= link ;
- LINKFLAGS ?= "" ;
- LINKLIBS ?= ;
- MKDIR ?= create/dir ;
- MV ?= rename ;
- OPTIM ?= "" ;
- RM ?= delete ;
- RUNVMS ?= mcr ;
- SHELLMODE ?= (w:er) ;
- SLASH ?= . ;
- STDHDRS ?= decc$library_include ;
- SUFEXE ?= .exe ;
- SUFLIB ?= .olb ;
- SUFOBJ ?= .obj ;
-
- switch $(OS)
- {
- case OPENVMS : CCFLAGS ?= /stand=vaxc ;
- case VMS : LINKLIBS ?= sys$library:vaxcrtl.olb/lib ;
- }
-}
-else if $(MAC)
-{
- local OPT ;
-
- CW ?= "{CW}" ;
-
- MACHDRS ?=
- "$(UMACHDRS):Universal:Interfaces:CIncludes"
- "$(CW):MSL:MSL_C:MSL_Common:Include"
- "$(CW):MSL:MSL_C:MSL_MacOS:Include" ;
-
- MACLIBS ?=
- "$(CW):MacOS Support:Universal:Libraries:StubLibraries:Interfacelib"
- "$(CW):MacOS Support:Universal:Libraries:StubLibraries:Mathlib" ;
-
- MPWLIBS ?=
- "$(CW):MacOS Support:Libraries:Runtime:Runtime PPC:MSL MPWCRuntime.lib"
- "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL C.PPC MPW.Lib" ;
-
- MPWNLLIBS ?=
- "$(CW):MacOS Support:Libraries:Runtime:Runtime PPC:MSL MPWCRuntime.lib"
- "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL C.PPC MPW(NL).Lib" ;
-
- SIOUXHDRS ?= ;
-
- SIOUXLIBS ?=
- "$(CW):MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.lib"
- "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL SIOUX.PPC.Lib"
- "$(CW):MSL:MSL_C:MSL_MacOS:Lib:PPC:MSL C.PPC.Lib" ;
-
- C++ ?= mwcppc ;
- C++FLAGS ?= -w off -nomapcr ;
- CC ?= mwcppc ;
- CCFLAGS ?= -w off -nomapcr ;
- CP ?= duplicate -y ;
- DOT ?= ":" ;
- DOTDOT ?= "::" ;
- HDRS ?= $(MACHDRS) $(MPWHDRS) ;
- LINK ?= mwlinkppc ;
- LINKFLAGS ?= -mpwtool -warn ;
- LINKLIBS ?= $(MACLIBS) $(MPWLIBS) ;
- MKDIR ?= newfolder ;
- MV ?= rename -y ;
- NOARSCAN ?= true ;
- OPTIM ?= ;
- RM ?= delete -y ;
- SLASH ?= ":" ;
- STDHDRS ?= ;
- SUFLIB ?= .lib ;
- SUFOBJ ?= .o ;
-}
-else if $(OS) = BEOS && $(METROWERKS)
-{
- AR ?= mwld -xml -o ;
- BINDIR ?= /boot/apps ;
- CC ?= mwcc ;
- CCFLAGS ?= -nosyspath ;
- C++ ?= $(CC) ;
- C++FLAGS ?= -nosyspath ;
- FORTRAN ?= "" ;
- LIBDIR ?= /boot/develop/libraries ;
- LINK ?= mwld ;
- LINKFLAGS ?= "" ;
- MANDIR ?= /boot/documentation/"Shell Tools"/HTML ;
- NOARSCAN ?= true ;
- STDHDRS ?= /boot/develop/headers/posix ;
-}
-else if $(OS) = BEOS
-{
- BINDIR ?= /boot/apps ;
- CC ?= gcc ;
- C++ ?= $(CC) ;
- FORTRAN ?= "" ;
- LIBDIR ?= /boot/develop/libraries ;
- LINK ?= gcc ;
- LINKLIBS ?= -lnet ;
- NOARSCAN ?= true ;
- STDHDRS ?= /boot/develop/headers/posix ;
-}
-else if $(UNIX)
-{
- switch $(OS)
- {
- case AIX :
- LINKLIBS ?= -lbsd ;
-
- case AMIGA :
- CC ?= gcc ;
- YACC ?= bison ;
-
- case CYGWIN :
- CC ?= gcc ;
- CCFLAGS += -D__cygwin__ ;
- LEX ?= flex ;
- JAMSHELL ?= sh -c ;
- RANLIB ?= "" ;
- SUFEXE ?= .exe ;
- YACC ?= bison ;
-
- case DGUX :
- RANLIB ?= "" ;
- RELOCATE ?= true ;
-
- case HPUX :
- RANLIB ?= "" ;
-
- case INTERIX :
- CC ?= gcc ;
- JAMSHELL ?= sh -c ;
- RANLIB ?= "" ;
-
- case IRIX :
- RANLIB ?= "" ;
-
- case MPEIX :
- CC ?= gcc ;
- C++ ?= gcc ;
- CCFLAGS += -D_POSIX_SOURCE ;
- HDRS += /usr/include ;
- RANLIB ?= "" ;
- NOARSCAN ?= true ;
- NOARUPDATE ?= true ;
-
- case MVS :
- RANLIB ?= "" ;
-
- case NEXT :
- AR ?= libtool -o ;
- RANLIB ?= "" ;
-
- case MACOSX :
- AR ?= libtool -o ;
- C++ ?= c++ ;
- MANDIR ?= /usr/local/share/man ;
- RANLIB ?= "" ;
-
- case NCR :
- RANLIB ?= "" ;
-
- case PTX :
- RANLIB ?= "" ;
-
- case QNX :
- AR ?= wlib ;
- CC ?= cc ;
- CCFLAGS ?= -Q ; # quiet
- C++ ?= $(CC) ;
- C++FLAGS ?= -Q ; # quiet
- LINK ?= $(CC) ;
- LINKFLAGS ?= -Q ; # quiet
- NOARSCAN ?= true ;
- RANLIB ?= "" ;
-
- case SCO :
- RANLIB ?= "" ;
- RELOCATE ?= true ;
-
- case SINIX :
- RANLIB ?= "" ;
-
- case SOLARIS :
- RANLIB ?= "" ;
- AR ?= "/usr/ccs/bin/ar ru" ;
-
- case UNICOS :
- NOARSCAN ?= true ;
- OPTIM ?= -O0 ;
-
- case UNIXWARE :
- RANLIB ?= "" ;
- RELOCATE ?= true ;
- }
-
- # UNIX defaults
-
- CCFLAGS ?= ;
- C++FLAGS ?= $(CCFLAGS) ;
- CHMOD ?= chmod ;
- LEX ?= lex ;
- LINKFLAGS ?= $(CCFLAGS) ;
- LINKLIBS ?= ;
- OPTIM ?= -O ;
- RANLIB ?= ranlib ;
- YACC ?= yacc ;
- YACCFILES ?= y.tab ;
- YACCFLAGS ?= -d ;
-}
-
-#
-# General defaults; a lot like UNIX
-#
-
- AR ?= ar ru ;
- AS ?= as ;
- ASFLAGS ?= ;
- AWK ?= awk ;
- BINDIR ?= /usr/local/bin ;
- C++ ?= gcc ;
- C++FLAGS ?= ;
- CC ?= gcc ;
- CCFLAGS ?= ;
- CP ?= cp -f ;
- CRELIB ?= ;
- DOT ?= . ;
- DOTDOT ?= .. ;
- EXEMODE ?= 711 ;
- FILEMODE ?= 644 ;
- FORTRAN ?= g77 ;
- FORTRANFLAGS ?= ;
- HDRS ?= ;
- JAMFILE ?= Jamfile ;
- JAMRULES ?= Jamrules ;
- LEX ?= lex ;
- LIBDIR ?= /usr/local/lib ;
- LINK ?= $(CC) ;
- LINKFLAGS ?= ;
- LINKLIBS ?= ;
- LN ?= ln ;
- MANDIR ?= /usr/local/man ;
- MKDIR ?= mkdir ;
- MV ?= mv -f ;
- OPTIM ?= ;
- RCP ?= rcp ;
- RM ?= rm -f ;
- RSH ?= rsh ;
- SED ?= sed ;
- SHELLHEADER ?= "#!/bin/sh" ;
- SHELLMODE ?= 755 ;
- SLASH ?= / ;
- STDHDRS ?= /usr/include ;
- SUFEXE ?= "" ;
- SUFLIB ?= .a ;
- SUFOBJ ?= .o ;
- UNDEFFLAG ?= "-u _" ;
- YACC ?= ;
- YACCFILES ?= ;
- YACCFLAGS ?= ;
-
- HDRPATTERN =
- "^[ ]*#[ ]*include[ ]*[<\"]([^\">]*)[\">].*$" ;
-
- OSFULL = $(OS)$(OSVER)$(OSPLAT) $(OS)$(OSPLAT) $(OS)$(OSVER) $(OS) ;
-
-
-#
-# Base dependencies - first for "bootstrap" kinds of rules
-#
-
-DEPENDS all : shell files lib exe obj ;
-DEPENDS all shell files lib exe obj : first ;
-NOTFILE all first shell files lib exe obj dirs clean uninstall ;
-ALWAYS clean uninstall ;
-
-#
-# Rules
-#
-
-rule As
-{
- DEPENDS $(<) : $(>) ;
- ASFLAGS on $(<) += $(ASFLAGS) $(SUBDIRASFLAGS) ;
-}
-
-rule Bulk
-{
- local i ;
-
- for i in $(>)
- {
- File $(i:D=$(<)) : $(i) ;
- }
-}
-
-rule Cc
-{
- local _h ;
-
- DEPENDS $(<) : $(>) ;
-
- # Just to clarify here: this sets the per-target CCFLAGS to
- # be the current value of (global) CCFLAGS and SUBDIRCCFLAGS.
-
- CCFLAGS on $(<) += $(CCFLAGS) $(SUBDIRCCFLAGS) ;
-
- # If the compiler's -o flag doesn't work, relocate the .o
-
- if $(RELOCATE)
- {
- CcMv $(<) : $(>) ;
- }
-
- _h = $(SEARCH_SOURCE) $(HDRS) $(SUBDIRHDRS) ;
-
- if $(VMS) && $(_h)
- {
- SLASHINC on $(<) = "/inc=(" $(_h[1]) ,$(_h[2-]) ")" ;
- }
- else if $(MAC) && $(_h)
- {
- local _i _j ;
- _j = $(_h[1]) ;
- for _i in $(_h[2-])
- {
- _j = $(_j),$(_i) ;
- }
- MACINC on $(<) = \"$(_j)\" ;
- }
-}
-
-rule C++
-{
- local _h ;
-
- DEPENDS $(<) : $(>) ;
- C++FLAGS on $(<) += $(C++FLAGS) $(SUBDIRC++FLAGS) ;
-
- if $(RELOCATE)
- {
- CcMv $(<) : $(>) ;
- }
-
- _h = $(SEARCH_SOURCE) $(HDRS) $(SUBDIRHDRS) ;
-
- if $(VMS) && $(_h)
- {
- SLASHINC on $(<) = "/inc=(" $(_h[1]) ,$(_h[2-]) ")" ;
- }
- else if $(MAC) && $(_h)
- {
- local _i _j ;
- _j = $(_h[1]) ;
- for _i in $(_h[2-])
- {
- _j = $(_j),$(_i) ;
- }
- MACINC on $(<) = \"$(_j)\" ;
- }
-}
-
-rule Chmod
-{
- if $(CHMOD) { Chmod1 $(<) ; }
-}
-
-rule File
-{
- DEPENDS files : $(<) ;
- DEPENDS $(<) : $(>) ;
- SEARCH on $(>) = $(SEARCH_SOURCE) ;
- MODE on $(<) = $(FILEMODE) ;
- Chmod $(<) ;
-}
-
-rule Fortran
-{
- DEPENDS $(<) : $(>) ;
-}
-
-rule GenFile
-{
- local _t = [ FGristSourceFiles $(<) ] ;
- local _s = [ FAppendSuffix $(>[1]) : $(SUFEXE) ] ;
- Depends $(_t) : $(_s) $(>[2-]) ;
- GenFile1 $(_t) : $(_s) $(>[2-]) ;
- Clean clean : $(_t) ;
-}
-
-rule GenFile1
-{
- MakeLocate $(<) : $(LOCATE_SOURCE) ;
- SEARCH on $(>) = $(SEARCH_SOURCE) ;
-}
-
-rule HardLink
-{
- DEPENDS files : $(<) ;
- DEPENDS $(<) : $(>) ;
- SEARCH on $(>) = $(SEARCH_SOURCE) ;
-}
-
-rule HdrMacroFile
-{
- # HdrMacroFile file ;
- #
- # this rule is used to indicate that a given file contains definitions
- # for filename macros (e.g. "#define MYFILE_H ") that can
- # later be used in #include statements in the rest of the source
- #
- # theses files must be parsed before any make is tried..
- #
- HDRMACRO $(<) ;
-}
-
-rule HdrRule
-{
- # HdrRule source : headers ;
-
- # N.B. This rule is called during binding, potentially after
- # the fate of many targets has been determined, and must be
- # used with caution: don't add dependencies to unrelated
- # targets, and don't set variables on $(<).
-
- # Tell Jam that anything depending on $(<) also depends on $(>),
- # set SEARCH so Jam can find the headers, but then say we don't
- # care if we can't actually find the headers (they may have been
- # within ifdefs),
-
- local s ;
-
- if $(HDRGRIST)
- {
- s = $(>:G=$(HDRGRIST)) ;
- } else {
- s = $(>) ;
- }
-
- INCLUDES $(<) : $(s) ;
- SEARCH on $(s) = $(HDRSEARCH) ;
- NOCARE $(s) ;
-
- # Propagate on $(<) to $(>)
-
- HDRSEARCH on $(s) = $(HDRSEARCH) ;
- HDRSCAN on $(s) = $(HDRSCAN) ;
- HDRRULE on $(s) = $(HDRRULE) ;
- HDRGRIST on $(s) = $(HDRGRIST) ;
-}
-
-rule InstallInto
-{
- local i t ;
-
- t = $(>:G=installed) ;
-
- DEPENDS install : $(t) ;
- DEPENDS $(t) : $(>) ;
- SEARCH on $(>) = $(SEARCH_SOURCE) ;
- MakeLocate $(t) : $(<) ;
-
- # Arrange for jam uninstall
-
- Clean uninstall : $(t) ;
-
- for i in $(>)
- {
- Install $(i:G=installed) : $(i) ;
- }
-
- Chmod $(t) ;
-
- if $(UNIX)
- {
- if $(OWNER) { Chown $(t) ; OWNER on $(t) = $(OWNER) ; }
- if $(GROUP) { Chgrp $(t) ; GROUP on $(t) = $(GROUP) ; }
- }
-}
-
-rule InstallBin
-{
- local _t = [ FAppendSuffix $(>) : $(SUFEXE) ] ;
-
- InstallInto $(<) : $(_t) ;
- MODE on $(_t:G=installed) = $(EXEMODE) ;
-}
-
-rule InstallFile
-{
- InstallInto $(<) : $(>) ;
- MODE on $(>:G=installed) = $(FILEMODE) ;
-}
-
-rule InstallLib
-{
- InstallInto $(<) : $(>) ;
- MODE on $(>:G=installed) = $(FILEMODE) ;
-}
-
-rule InstallMan
-{
- # Really this just strips the . from the suffix
-
- local i s d ;
-
- for i in $(>)
- {
- switch $(i:S)
- {
- case .1 : s = 1 ; case .2 : s = 2 ; case .3 : s = 3 ;
- case .4 : s = 4 ; case .5 : s = 5 ; case .6 : s = 6 ;
- case .7 : s = 7 ; case .8 : s = 8 ; case .l : s = l ;
- case .n : s = n ; case .man : s = 1 ;
- }
-
- d = man$(s) ;
-
- InstallInto $(d:R=$(<)) : $(i) ;
- }
-
- MODE on $(>:G=installed) = $(FILEMODE) ;
-}
-
-rule InstallShell
-{
- InstallInto $(<) : $(>) ;
- MODE on $(>:G=installed) = $(SHELLMODE) ;
-}
-
-rule Lex
-{
- LexMv $(<) : $(>) ;
- DEPENDS $(<) : $(>) ;
- MakeLocate $(<) : $(LOCATE_SOURCE) ;
- Clean clean : $(<) ;
-}
-
-rule Library
-{
- LibraryFromObjects $(<) : $(>:S=$(SUFOBJ)) ;
- Objects $(>) ;
-}
-
-rule LibraryFromObjects
-{
- local _i _l _s ;
-
- # Add grist to file names
-
- _s = [ FGristFiles $(>) ] ;
- _l = $(<:S=$(SUFLIB)) ;
-
- # library depends on its member objects
-
- if $(KEEPOBJS)
- {
- DEPENDS obj : $(_s) ;
- }
- else
- {
- DEPENDS lib : $(_l) ;
- }
-
- # Set LOCATE for the library and its contents. The bound
- # value shows up as $(NEEDLIBS) on the Link actions.
- # For compatibility, we only do this if the library doesn't
- # already have a path.
-
- if ! $(_l:D)
- {
- MakeLocate $(_l) $(_l)($(_s:BS)) : $(LOCATE_TARGET) ;
- }
-
- if $(NOARSCAN)
- {
- # If we can't scan the library to timestamp its contents,
- # we have to just make the library depend directly on the
- # on-disk object files.
-
- DEPENDS $(_l) : $(_s) ;
- }
- else
- {
- # If we can scan the library, we make the library depend
- # on its members and each member depend on the on-disk
- # object file.
-
- DEPENDS $(_l) : $(_l)($(_s:BS)) ;
-
- for _i in $(_s)
- {
- DEPENDS $(_l)($(_i:BS)) : $(_i) ;
- }
- }
-
- Clean clean : $(_l) ;
-
- if $(CRELIB) { CreLib $(_l) : $(_s[1]) ; }
-
- Archive $(_l) : $(_s) ;
-
- if $(RANLIB) { Ranlib $(_l) ; }
-
- # If we can't scan the library, we have to leave the .o's around.
-
- if ! ( $(NOARSCAN) || $(KEEPOBJS) ) { RmTemps $(_l) : $(_s) ; }
-}
-
-rule Link
-{
- MODE on $(<) = $(EXEMODE) ;
- Chmod $(<) ;
-}
-
-rule LinkLibraries
-{
- # make library dependencies of target
- # set NEEDLIBS variable used by 'actions Main'
-
- local _t = [ FAppendSuffix $(<) : $(SUFEXE) ] ;
-
- DEPENDS $(_t) : $(>:S=$(SUFLIB)) ;
- NEEDLIBS on $(_t) += $(>:S=$(SUFLIB)) ;
-}
-
-rule Main
-{
- MainFromObjects $(<) : $(>:S=$(SUFOBJ)) ;
- Objects $(>) ;
-}
-
-rule MainFromObjects
-{
- local _s _t ;
-
- # Add grist to file names
- # Add suffix to exe
-
- _s = [ FGristFiles $(>) ] ;
- _t = [ FAppendSuffix $(<) : $(SUFEXE) ] ;
-
- if $(_t) != $(<)
- {
- DEPENDS $(<) : $(_t) ;
- NOTFILE $(<) ;
- }
-
- # make compiled sources a dependency of target
-
- DEPENDS exe : $(_t) ;
- DEPENDS $(_t) : $(_s) ;
- MakeLocate $(_t) : $(LOCATE_TARGET) ;
-
- Clean clean : $(_t) ;
-
- Link $(_t) : $(_s) ;
-}
-
-rule MakeLocate
-{
- if $(>)
- {
- LOCATE on $(<) = $(>) ;
- Depends $(<) : $(>[1]) ;
- MkDir $(>[1]) ;
- }
-}
-
-rule MkDir
-{
- # If dir exists, don't update it
- # Do this even for $(DOT).
-
- NOUPDATE $(<) ;
-
- if $(<) != $(DOT) && ! $($(<)-mkdir)
- {
- local s ;
-
- # Cheesy gate to prevent multiple invocations on same dir
- # MkDir1 has the actions
- # Arrange for jam dirs
-
- $(<)-mkdir = true ;
- MkDir1 $(<) ;
- Depends dirs : $(<) ;
-
- # Recursively make parent directories.
- # $(<:P) = $(<)'s parent, & we recurse until root
-
- s = $(<:P) ;
-
- if $(NT)
- {
- switch $(s)
- {
- case *: : s = ;
- case *:\\ : s = ;
- }
- }
-
- if $(s) && $(s) != $(<)
- {
- Depends $(<) : $(s) ;
- MkDir $(s) ;
- }
- else if $(s)
- {
- NOTFILE $(s) ;
- }
-
- }
-}
-
-rule Object
-{
- local h ;
-
- # locate object and search for source, if wanted
-
- Clean clean : $(<) ;
-
- MakeLocate $(<) : $(LOCATE_TARGET) ;
- SEARCH on $(>) = $(SEARCH_SOURCE) ;
-
- # Save HDRS for -I$(HDRS) on compile.
- # We shouldn't need -I$(SEARCH_SOURCE) as cc can find headers
- # in the .c file's directory, but generated .c files (from
- # yacc, lex, etc) are located in $(LOCATE_TARGET), possibly
- # different from $(SEARCH_SOURCE).
-
- HDRS on $(<) = $(SEARCH_SOURCE) $(HDRS) $(SUBDIRHDRS) ;
-
- # handle #includes for source: Jam scans for headers with
- # the regexp pattern $(HDRSCAN) and then invokes $(HDRRULE)
- # with the scanned file as the target and the found headers
- # as the sources. HDRSEARCH is the value of SEARCH used for
- # the found header files. Finally, if jam must deal with
- # header files of the same name in different directories,
- # they can be distinguished with HDRGRIST.
-
- # $(h) is where cc first looks for #include "foo.h" files.
- # If the source file is in a distant directory, look there.
- # Else, look in "" (the current directory).
-
- if $(SEARCH_SOURCE)
- {
- h = $(SEARCH_SOURCE) ;
- }
- else
- {
- h = "" ;
- }
-
- HDRRULE on $(>) = HdrRule ;
- HDRSCAN on $(>) = $(HDRPATTERN) ;
- HDRSEARCH on $(>) = $(HDRS) $(SUBDIRHDRS) $(h) $(STDHDRS) ;
- HDRGRIST on $(>) = $(HDRGRIST) ;
-
- # if source is not .c, generate .c with specific rule
-
- switch $(>:S)
- {
- case .asm : As $(<) : $(>) ;
- case .c : Cc $(<) : $(>) ;
- case .C : C++ $(<) : $(>) ;
- case .cc : C++ $(<) : $(>) ;
- case .cpp : C++ $(<) : $(>) ;
- case .f : Fortran $(<) : $(>) ;
- case .l : Cc $(<) : $(<:S=.c) ;
- Lex $(<:S=.c) : $(>) ;
- case .s : As $(<) : $(>) ;
- case .y : Cc $(<) : $(<:S=.c) ;
- Yacc $(<:S=.c) : $(>) ;
- case * : UserObject $(<) : $(>) ;
- }
-}
-
-
-rule ObjectCcFlags
-{
- CCFLAGS on [ FGristFiles $(<:S=$(SUFOBJ)) ] += $(>) ;
-}
-
-rule ObjectC++Flags
-{
- C++FLAGS on [ FGristFiles $(<:S=$(SUFOBJ)) ] += $(>) ;
-}
-
-rule ObjectHdrs
-{
- HDRS on [ FGristFiles $(<:S=$(SUFOBJ)) ] += $(>) ;
-}
-
-rule Objects
-{
- local _i ;
-
- for _i in [ FGristFiles $(<) ]
- {
- Object $(_i:S=$(SUFOBJ)) : $(_i) ;
- DEPENDS obj : $(_i:S=$(SUFOBJ)) ;
- }
-}
-
-rule RmTemps
-{
- TEMPORARY $(>) ;
-}
-
-rule Setuid
-{
- MODE on [ FAppendSuffix $(<) : $(SUFEXE) ] = 4711 ;
-}
-
-rule Shell
-{
- DEPENDS shell : $(<) ;
- DEPENDS $(<) : $(>) ;
- SEARCH on $(>) = $(SEARCH_SOURCE) ;
- MODE on $(<) = $(SHELLMODE) ;
- Clean clean : $(<) ;
- Chmod $(<) ;
-}
-
-rule SubDir
-{
- local _r _s ;
-
- #
- # SubDir TOP d1 [ ... ]
- #
- # This introduces a Jamfile that is part of a project tree
- # rooted at $(TOP). It (only once) includes the project-specific
- # rules file $(TOP)/Jamrules and then sets search & locate stuff.
- #
- # If the variable $(TOPRULES) is set (where TOP is the first arg
- # to SubDir), that file is included instead of $(TOP)/Jamrules.
- #
- # d1 ... are the directory elements that lead to this directory
- # from $(TOP). We construct the system dependent path from these
- # directory elements in order to set search&locate stuff.
- #
-
- if ! $($(<[1]))
- {
- if ! $(<[1])
- {
- EXIT SubDir syntax error ;
- }
-
- $(<[1]) = [ FSubDir $(<[2-]) ] ;
- }
-
- #
- # If $(TOP)/Jamrules hasn't been included, do so.
- #
-
- if ! $($(<[1])-included)
- {
- # Gated entry.
-
- $(<[1])-included = TRUE ;
-
- # File is $(TOPRULES) or $(TOP)/Jamrules.
-
- _r = $($(<[1])RULES) ;
-
- if ! $(_r)
- {
- _r = $(JAMRULES:R=$($(<[1]))) ;
- }
-
- # Include it.
-
- include $(_r) ;
- }
-
- # Get path to current directory from root using SubDir.
- # Save dir tokens for other potential uses.
-
- _s = [ FDirName $(<[2-]) ] ;
- SUBDIR = $(_s:R=$($(<[1]))) ;
- SUBDIR_TOKENS = $(<[2-]) ;
-
- # Now set up SEARCH_SOURCE, LOCATE_TARGET, SOURCE_GRIST
- # These can be reset if needed. For example, if the source
- # directory should not hold object files, LOCATE_TARGET can
- # subsequently be redefined.
-
- SEARCH_SOURCE = $(SUBDIR) ;
- LOCATE_SOURCE = $(ALL_LOCATE_TARGET) $(SUBDIR) ;
- LOCATE_TARGET = $(ALL_LOCATE_TARGET) $(SUBDIR) ;
- SOURCE_GRIST = [ FGrist $(<[2-]) ] ;
-
- # Reset per-directory ccflags, hdrs
-
- SUBDIRCCFLAGS = ;
- SUBDIRC++FLAGS = ;
- SUBDIRHDRS = ;
-}
-
-rule SubDirCcFlags
-{
- SUBDIRCCFLAGS += $(<) ;
-}
-
-rule SubDirC++Flags
-{
- SUBDIRC++FLAGS += $(<) ;
-}
-
-rule SubDirHdrs
-{
- SUBDIRHDRS += $(<) ;
-}
-
-rule SubInclude
-{
- local _s ;
-
- # That's
- # SubInclude TOP d1 [ d2 [ d3 [ d4 ] ] ]
- #
- # to include a subdirectory's Jamfile.
-
- if ! $($(<[1]))
- {
- EXIT Top level of source tree has not been set with $(<[1]) ;
- }
-
- _s = [ FDirName $(<[2-]) ] ;
-
- include $(JAMFILE:D=$(_s):R=$($(<[1]))) ;
-}
-
-rule Undefines
-{
- UNDEFS on [ FAppendSuffix $(<) : $(SUFEXE) ] += $(UNDEFFLAG)$(>) ;
-}
-
-rule UserObject
-{
- EXIT "Unknown suffix on" $(>) "- see UserObject rule in Jamfile(5)." ;
-}
-
-rule Yacc
-{
- local _h ;
-
- _h = $(<:BS=.h) ;
-
- # Some places don't have a yacc.
-
- MakeLocate $(<) $(_h) : $(LOCATE_SOURCE) ;
-
- if $(YACC)
- {
- DEPENDS $(<) $(_h) : $(>) ;
- Yacc1 $(<) $(_h) : $(>) ;
- YaccMv $(<) $(_h) : $(>) ;
- Clean clean : $(<) $(_h) ;
- }
-
- # make sure someone includes $(_h) else it will be
- # a deadly independent target
-
- INCLUDES $(<) : $(_h) ;
-}
-
-#
-# Utility rules; no side effects on these
-#
-
-rule FGrist
-{
- # Turn individual elements in $(<) into grist.
-
- local _g _i ;
-
- _g = $(<[1]) ;
-
- for _i in $(<[2-])
- {
- _g = $(_g)!$(_i) ;
- }
-
- return $(_g) ;
-}
-
-rule FGristFiles
-{
- if ! $(SOURCE_GRIST)
- {
- return $(<) ;
- }
- else
- {
- return $(<:G=$(SOURCE_GRIST)) ;
- }
-}
-
-rule FGristSourceFiles
-{
- # Produce source file name name with grist in it,
- # if SOURCE_GRIST is set.
-
- # Leave header files alone, because they have a global
- # visibility.
-
- if ! $(SOURCE_GRIST)
- {
- return $(<) ;
- }
- else
- {
- local _i _o ;
-
- for _i in $(<)
- {
- switch $(_i)
- {
- case *.h : _o += $(_i) ;
- case * : _o += $(_i:G=$(SOURCE_GRIST)) ;
- }
- }
-
- return $(_o) ;
- }
-}
-
-rule FConcat
-{
- # Puts the variables together, removing spaces.
-
- local _t _r ;
-
- $(_r) = $(<[1]) ;
-
- for _t in $(<[2-])
- {
- $(_r) = $(_r)$(_t) ;
- }
-
- return $(_r) ;
-}
-
-rule FSubDir
-{
- local _i _d ;
-
- # If $(>) is the path to the current directory, compute the
- # path (using ../../ etc) back to that root directory.
- # Sets result in $(<)
-
- if ! $(<[1])
- {
- _d = $(DOT) ;
- }
- else
- {
- _d = $(DOTDOT) ;
-
- for _i in $(<[2-])
- {
- _d = $(_d:R=$(DOTDOT)) ;
- }
- }
-
- return $(_d) ;
-}
-
-rule FDirName
-{
- local _s _i ;
-
- # Turn individual elements in $(<) into a usable path.
-
- if ! $(<)
- {
- _s = $(DOT) ;
- }
- else if $(VMS)
- {
- # This handles the following cases:
- # a -> [.a]
- # a b c -> [.a.b.c]
- # x: -> x:
- # x: a -> x:[a]
- # x:[a] b -> x:[a.b]
-
- switch $(<[1])
- {
- case *:* : _s = $(<[1]) ;
- case \\[*\\] : _s = $(<[1]) ;
- case * : _s = [.$(<[1])] ;
- }
-
- for _i in [.$(<[2-])]
- {
- _s = $(_i:R=$(_s)) ;
- }
- }
- else if $(MAC)
- {
- _s = $(DOT) ;
-
- for _i in $(<)
- {
- _s = $(_i:R=$(_s)) ;
- }
- }
- else
- {
- _s = $(<[1]) ;
-
- for _i in $(<[2-])
- {
- _s = $(_i:R=$(_s)) ;
- }
- }
-
- return $(_s) ;
-}
-
-
-rule _makeCommon
-{
- # strip common initial elements
-
- if $($(<)[1]) && $($(<)[1]) = $($(>)[1])
- {
- $(<) = $($(<)[2-]) ;
- $(>) = $($(>)[2-]) ;
- _makeCommon $(<) : $(>) ;
- }
-}
-
-
-rule FRelPath
-{
- local _l _r ;
-
- # first strip off common parts
-
- _l = $(<) ;
- _r = $(>) ;
-
- _makeCommon _l : _r ;
-
- # now make path to root and path down
-
- _l = [ FSubDir $(_l) ] ;
- _r = [ FDirName $(_r) ] ;
-
- # Concatenate and save
-
- # XXX This should be better
-
- if $(_r) = $(DOT) {
- return $(_l) ;
- } else {
- return $(_r:R=$(_l)) ;
- }
-}
-
-rule FAppendSuffix
-{
- # E.g., "FAppendSuffix yacc lex foo.bat : $(SUFEXE) ;"
- # returns (yacc,lex,foo.bat) on Unix and
- # (yacc.exe,lex.exe,foo.bat) on NT.
-
- if $(>)
- {
- local _i _o ;
-
- for _i in $(<)
- {
- if $(_i:S)
- {
- _o += $(_i) ;
- }
- else
- {
- _o += $(_i:S=$(>)) ;
- }
- }
- return $(_o) ;
- }
- else
- {
- return $(<) ;
- }
-}
-
-rule unmakeDir
-{
- if $(>[1]:D) && $(>[1]:D) != $(>[1]) && $(>[1]:D) != \\\\
- {
- unmakeDir $(<) : $(>[1]:D) $(>[1]:BS) $(>[2-]) ;
- }
- else
- {
- $(<) = $(>) ;
- }
-}
-
-
-rule FConvertToSlashes
-{
- local _d, _s, _i ;
-
- unmakeDir _d : $(<) ;
-
- _s = $(_d[1]) ;
- for _i in $(_d[2-])
- {
- _s = $(_s)/$(_i) ;
- }
- return $(_s) ;
-}
-
-
-#
-# Actions
-#
-
-#
-# First the defaults
-#
-
-actions updated together piecemeal Archive
-{
- $(AR) $(<) $(>)
-}
-
-actions As
-{
- $(AS) $(ASFLAGS) -I$(HDRS) -o $(<) $(>)
-}
-
-actions C++
-{
- $(C++) -c $(C++FLAGS) $(OPTIM) -I$(HDRS) -o $(<) $(>)
-}
-
-actions Cc
-{
- $(CC) -c $(CCFLAGS) $(OPTIM) -I$(HDRS) -o $(<) $(>)
-}
-
-actions Chgrp
-{
- chgrp $(GROUP) $(<)
-}
-
-actions Chmod1
-{
- $(CHMOD) $(MODE) $(<)
-}
-
-actions Chown
-{
- chown $(OWNER) $(<)
-}
-
-actions piecemeal together existing Clean
-{
- $(RM) $(>)
-}
-
-actions File
-{
- $(CP) $(>) $(<)
-}
-
-actions GenFile1
-{
- $(>[1]) $(<) $(>[2-])
-}
-
-actions Fortran
-{
- $(FORTRAN) $(FORTRANFLAGS) -o $(<) $(>)
-}
-
-actions HardLink
-{
- $(RM) $(<) && $(LN) $(>) $(<)
-}
-
-actions Install
-{
- $(CP) $(>) $(<)
-}
-
-actions Lex
-{
- $(LEX) $(>)
-}
-
-actions LexMv
-{
- $(MV) lex.yy.c $(<)
-}
-
-actions Link bind NEEDLIBS
-{
- $(LINK) $(LINKFLAGS) -o $(<) $(UNDEFS) $(>) $(NEEDLIBS) $(LINKLIBS)
-}
-
-actions MkDir1
-{
- $(MKDIR) $(<)
-}
-
-actions together Ranlib
-{
- $(RANLIB) $(<)
-}
-
-actions quietly updated piecemeal together RmTemps
-{
- $(RM) $(>)
-}
-
-actions Shell
-{
- $(AWK) '
- NR == 1 { print "$(SHELLHEADER)" }
- NR == 1 && /^[#:]/ { next }
- /^##/ { next }
- { print }
- ' < $(>) > $(<)
-}
-
-actions Yacc1
-{
- $(YACC) $(YACCFLAGS) $(>)
-}
-
-actions YaccMv
-{
- $(MV) $(YACCFILES).c $(<[1])
- $(MV) $(YACCFILES).h $(<[2])
-}
-
-#
-# RELOCATE - for compilers with broken -o flags
-#
-
-if $(RELOCATE)
-{
- actions C++
- {
- $(C++) -c $(C++FLAGS) $(OPTIM) -I$(HDRS) $(>)
- }
-
- actions Cc
- {
- $(CC) -c $(CCFLAGS) $(OPTIM) -I$(HDRS) $(>)
- }
-
- actions ignore CcMv
- {
- [ $(<) != $(>:BS=$(SUFOBJ)) ] && $(MV) $(>:BS=$(SUFOBJ)) $(<)
- }
-}
-
-#
-# NOARUPDATE - can't update an archive
-#
-
-if $(NOARUPDATE)
-{
- actions Archive
- {
- $(AR) $(<) $(>)
- }
-}
-
-#
-# NT specific actions
-#
-
-if $(NT)
-{
- if $(TOOLSET) = VISUALC || $(TOOLSET) = INTELC
- {
- actions updated together piecemeal Archive
- {
- if exist $(<) set _$(<:B)_=$(<)
- $(AR) /out:$(<) %_$(<:B)_% $(>)
- }
-
- actions As
- {
- $(AS) /Ml /p /v /w2 $(>) $(<) ,nul,nul;
- }
-
- actions Cc
- {
- $(CC) /c $(CCFLAGS) $(OPTIM) /Fo$(<) /I$(HDRS) /I$(STDHDRS) $(>)
- }
-
- actions C++
- {
- $(C++) /c $(C++FLAGS) $(OPTIM) /Fo$(<) /I$(HDRS) /I$(STDHDRS) /Tp$(>)
- }
-
- actions Link bind NEEDLIBS
- {
- $(LINK) $(LINKFLAGS) /out:$(<) $(UNDEFS) $(>) $(NEEDLIBS) $(LINKLIBS)
- }
- }
- else if $(TOOLSET) = VISUALC16
- {
- actions updated together piecemeal Archive
- {
- $(AR) $(<) -+$(>)
- }
-
- actions Cc
- {
- $(CC) /c $(CCFLAGS) $(OPTIM) /Fo$(<) /I$(HDRS) $(>)
- }
-
- actions C++
- {
- $(C++) /c $(C++FLAGS) $(OPTIM) /Fo$(<) /I$(HDRS) /Tp$(>)
- }
-
- actions Link bind NEEDLIBS
- {
- $(LINK) $(LINKFLAGS) /out:$(<) $(UNDEFS) $(>) $(NEEDLIBS) $(LINKLIBS)
- }
- }
- else if $(TOOLSET) = BORLANDC
- {
- actions updated together piecemeal Archive
- {
- $(AR) $(<) -+$(>)
- }
-
- actions Link bind NEEDLIBS
- {
- $(LINK) -e$(<) $(LINKFLAGS) $(UNDEFS) -L$(LINKLIBS) $(NEEDLIBS) $(>)
- }
-
- actions C++
- {
- $(C++) -c $(C++FLAGS) $(OPTIM) -I$(STDHDRS) -I$(HDRS) -o$(<) $(>)
- }
-
- actions Cc
- {
- $(CC) -c $(CCFLAGS) $(OPTIM) -I$(STDHDRS) -I$(HDRS) -o$(<) $(>)
- }
-
- }
- else if $(TOOLSET) = MINGW
- {
-# actions together piecemeal Archive
-# {
-# $(AR) $(<) $(>:T)
-# }
-
-# actions Cc
-# {
-# $(CC) $(CCFLAGS) $(OPTIM) -I$(HDRS) -o$(<) $(>)
-# }
-
-# actions C++
-# {
-# $(C++) $(C++FLAGS) $(OPTIM) -I$(HDRS) -o$(<) $(>)
-# }
- }
- else if $(TOOLSET) = WATCOM
- {
- actions together piecemeal Archive
- {
- $(AR) $(<) +-$(>)
- }
-
- actions Cc
- {
- $(CC) $(CCFLAGS) $(OPTIM) /Fo=$(<) /I$(HDRS) $(>)
- }
-
- actions C++
- {
- $(C++) $(C++FLAGS) $(OPTIM) /Fo=$(<) /I$(HDRS) $(>)
- }
-
- actions Fortran
- {
- $(FORTRAN) $(FORTRANFLAGS) /FO=$(<) $(>)
- }
-
- actions Link bind NEEDLIBS
- {
- $(LINK) $(LINKFLAGS) /Fe=$(<) $(UNDEFS) $(>) $(NEEDLIBS) $(LINKLIBS)
- }
-
- actions Shell
- {
- $(CP) $(>) $(<)
- }
- }
- else if $(TOOLSET) = LCC
- {
- actions together piecemeal Archive
- {
- $(AR) /out:$(<) $(>)
- }
-
- actions Cc
- {
- $(CC) $(CCFLAGS) $(OPTIM) -Fo$(<) -I$(HDRS) $(>)
- }
-
- actions Link bind NEEDLIBS
- {
- $(LINK) $(LINKFLAGS) -o $(<) $(UNDEFS) $(>) $(NEEDLIBS) $(LINKLIBS)
- }
-
- actions Shell
- {
- $(CP) $(>) $(<)
- }
- }
-}
-
-#
-# OS2 specific actions
-#
-
-else if $(OS2)
-{
- if $(TOOLSET) = WATCOM
- {
- actions together piecemeal Archive
- {
- $(AR) $(<) +-$(>)
- }
-
- actions Cc
- {
- $(CC) $(CCFLAGS) $(OPTIM) /Fo=$(<) /I$(HDRS) $(>)
- }
-
- actions C++
- {
- $(C++) $(C++FLAGS) $(OPTIM) /Fo=$(<) /I$(HDRS) $(>)
- }
-
- actions Link bind NEEDLIBS
- {
- $(LINK) $(LINKFLAGS) /Fe=$(<) $(UNDEFS) $(>) $(NEEDLIBS) $(LINKLIBS)
- }
-
- actions Shell
- {
- $(CP) $(>) $(<)
- }
- }
- else if $(TOOLSET) = EMX
- {
- actions together piecemeal Archive
- {
- $(AR) $(<) $(>:T)
- }
-
- actions Cc
- {
- $(CC) -c $(CCFLAGS) $(OPTIM) -I$(HDRS) -o$(<) $(>)
- }
-
- actions C++
- {
- $(C++) -c $(C++FLAGS) $(OPTIM) -I$(HDRS) -o$(<) $(>)
- }
- }
-}
-
-#
-# VMS specific actions
-#
-
-else if $(VMS)
-{
- actions updated together piecemeal Archive
- {
- lib/replace $(<) $(>[1]) ,$(>[2-])
- }
-
- actions Cc
- {
- $(CC)/obj=$(<) $(CCFLAGS) $(OPTIM) $(SLASHINC) $(>)
- }
-
- actions C++
- {
- $(C++)/obj=$(<) $(C++FLAGS) $(OPTIM) $(SLASHINC) $(>)
- }
-
- actions piecemeal together existing Clean
- {
- $(RM) $(>[1]);* ,$(>[2-]);*
- }
-
- actions together quietly CreLib
- {
- if f$search("$(<)") .eqs. "" then lib/create $(<)
- }
-
- actions GenFile1
- {
- mcr $(>[1]) $(<) $(>[2-])
- }
-
- actions Link bind NEEDLIBS
- {
- $(LINK)/exe=$(<) $(LINKFLAGS) $(>[1]) ,$(>[2-]) ,$(NEEDLIBS)/lib ,$(LINKLIBS)
- }
-
- actions quietly updated piecemeal together RmTemps
- {
- $(RM) $(>[1]);* ,$(>[2-]);*
- }
-
- actions Shell
- {
- $(CP) $(>) $(<)
- }
-}
-
-#
-# Mac specific actions
-#
-
-else if $(MAC)
-{
- actions together Archive
- {
- $(LINK) -library -o $(<) $(>)
- }
-
- actions Cc
- {
- set -e MWCincludes $(MACINC)
- $(CC) -o $(<) $(CCFLAGS) $(OPTIM) $(>)
- }
-
- actions C++
- {
- set -e MWCincludes $(MACINC)
- $(CC) -o $(<) $(C++FLAGS) $(OPTIM) $(>)
- }
-
- actions Link bind NEEDLIBS
- {
- $(LINK) -o $(<) $(LINKFLAGS) $(>) $(NEEDLIBS) "$(LINKLIBS)"
- }
-}
-
-#
-# Backwards compatibility with jam 1, where rules were uppercased.
-#
-
-rule BULK { Bulk $(<) : $(>) ; }
-rule FILE { File $(<) : $(>) ; }
-rule HDRRULE { HdrRule $(<) : $(>) ; }
-rule INSTALL { Install $(<) : $(>) ; }
-rule LIBRARY { Library $(<) : $(>) ; }
-rule LIBS { LinkLibraries $(<) : $(>) ; }
-rule LINK { Link $(<) : $(>) ; }
-rule MAIN { Main $(<) : $(>) ; }
-rule SETUID { Setuid $(<) ; }
-rule SHELL { Shell $(<) : $(>) ; }
-rule UNDEFINES { Undefines $(<) : $(>) ; }
-
-# Old INSTALL* didn't take dest directory.
-
-rule INSTALLBIN { InstallBin $(BINDIR) : $(<) ; }
-rule INSTALLLIB { InstallLib $(LIBDIR) : $(<) ; }
-rule INSTALLMAN { InstallMan $(MANDIR) : $(<) ; }
-
-# Compatibility with jam 2.2.
-
-rule addDirName { $(<) += [ FDirName $(>) ] ; }
-rule makeDirName { $(<) = [ FDirName $(>) ] ; }
-rule makeGristedName { $(<) = [ FGristSourceFiles $(>) ] ; }
-rule makeRelPath { $(<[1]) = [ FRelPath $(<[2-]) : $(>) ] ; }
-rule makeSuffixed { $(<[1]) = [ FAppendSuffix $(>) : $(<[2]) ] ; }
-
-#
-# Now include the user's Jamfile.
-#
-
-{
- if $(JAMFILE) { include $(JAMFILE) ; }
-}
diff -Nru cunit-2.1-0.dfsg/Jamfile cunit-2.1-2.dfsg/Jamfile
--- cunit-2.1-0.dfsg/Jamfile 2006-03-21 01:30:40.000000000 +0000
+++ cunit-2.1-2.dfsg/Jamfile 1970-01-01 00:00:00.000000000 +0000
@@ -1,30 +0,0 @@
-#
-# Jamfile to build CUnit - Root Directory
-# (see http://www.freetype.org/jam/index.html)
-#
-# Copyright (C) 2004-2006 Jerry St.Clair
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#---------------------------------------------------------------------------
-
-SubDir TOP ;
-
-SubInclude TOP CUnit ;
-SubInclude TOP Examples ;
-SubInclude TOP Man ;
-SubInclude TOP Share ;
-SubInclude TOP doc ;
-
-
diff -Nru cunit-2.1-0.dfsg/Jamrules.in cunit-2.1-2.dfsg/Jamrules.in
--- cunit-2.1-0.dfsg/Jamrules.in 2006-03-21 01:30:40.000000000 +0000
+++ cunit-2.1-2.dfsg/Jamrules.in 2006-04-20 01:57:41.000000000 +0000
@@ -125,6 +125,7 @@
PACKAGE = CUnit ;
# Install locations - comment out to not install that class of file
+INSTALL_BIN_DIR = $(prefix)$(SLASH)bin ;
INSTALL_LIB_DIR = $(prefix)$(SLASH)lib ;
INSTALL_INC_DIR = $(prefix)$(SLASH)include$(SLASH)CUnit ;
INSTALL_DOC_DIR = $(prefix)$(SLASH)doc$(SLASH)CUnit ;
diff -Nru cunit-2.1-0.dfsg/Makefile.am cunit-2.1-2.dfsg/Makefile.am
--- cunit-2.1-0.dfsg/Makefile.am 2006-03-21 01:30:40.000000000 +0000
+++ cunit-2.1-2.dfsg/Makefile.am 2010-10-14 09:09:23.000000000 +0000
@@ -41,9 +41,13 @@
RPM_K6=./RPMS/athlon/@PACKAGE@-@VERSION@-@RELEASE@.k6.rpm
RPM_SRC=./SRPMS/@PACKAGE@-@VERSION@-@RELEASE@.src.rpm
+EXTRA_DIST=cunit.pc.in
EXTRA_REMOVE=CUnit-Memory-Dump.lst ${SOURCE_TAR_FILE} ${SOURCE_ZIP_FILE} ${SOURCE_GZIP_FILE} \
*.rpm *.o *.ncb *.plg *.opt *.clw *.ilk *.exe *.pdb *.lib
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = cunit.pc
+
RPMDIRS=BUILD SOURCES RPMS RPMS/i386 SRPMS SPECS
clean-all: clean
diff -Nru cunit-2.1-0.dfsg/Makefile.in cunit-2.1-2.dfsg/Makefile.in
--- cunit-2.1-0.dfsg/Makefile.in 2006-03-22 10:57:17.000000000 +0000
+++ cunit-2.1-2.dfsg/Makefile.in 2010-10-15 15:11:42.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -13,15 +14,13 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
+
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -35,46 +34,99 @@
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/CUnit.spec.in \
$(srcdir)/Jamrules.in $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
- $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
- TODO config.guess config.sub depcomp install-sh ltmain.sh \
- missing mkinstalldirs
-subdir = .
+ $(srcdir)/cunit.pc.in $(top_srcdir)/configure AUTHORS COPYING \
+ ChangeLog INSTALL NEWS TODO config.guess config.sub depcomp \
+ install-sh ltmain.sh missing mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
+ configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = Jamrules CUnit.spec
+CONFIG_CLEAN_FILES = Jamrules CUnit.spec cunit.pc
+CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
+DATA = $(pkgconfig_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = CUnit doc Man Share Examples
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = $(distdir)
am__remove_distdir = \
- { test ! -d $(distdir) \
- || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr $(distdir); }; }
+ { test ! -d "$(distdir)" \
+ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr "$(distdir)"; }; }
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -93,40 +145,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -136,35 +175,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -176,28 +220,41 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
COMPILE_DIRS = CUnit doc Man Share $(EXAMPLE_COMPILE_DIR)
@ENABLE_EXAMPLES_TRUE@EXAMPLE_COMPILE_DIR = Examples
SUBDIRS = ${COMPILE_DIRS}
@@ -230,9 +287,12 @@
RPM_I686 = ./RPMS/i686/@PACKAGE@-@VERSION@-@RELEASE@.i686.rpm
RPM_K6 = ./RPMS/athlon/@PACKAGE@-@VERSION@-@RELEASE@.k6.rpm
RPM_SRC = ./SRPMS/@PACKAGE@-@VERSION@-@RELEASE@.src.rpm
+EXTRA_DIST = cunit.pc.in
EXTRA_REMOVE = CUnit-Memory-Dump.lst ${SOURCE_TAR_FILE} ${SOURCE_ZIP_FILE} ${SOURCE_GZIP_FILE} \
*.rpm *.o *.ncb *.plg *.opt *.clw *.ilk *.exe *.pdb *.lib
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = cunit.pc
RPMDIRS = BUILD SOURCES RPMS RPMS/i386 SRPMS SPECS
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -244,15 +304,15 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
- cd $(srcdir) && $(AUTOMAKE) --gnu \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
&& exit 0; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -268,21 +328,22 @@
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
- cd $(srcdir) && $(AUTOCONF)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
- $(MAKE) stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(am__configure_deps)
- cd $(top_srcdir) && $(AUTOHEADER)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
@@ -292,6 +353,8 @@
cd $(top_builddir) && $(SHELL) ./config.status $@
CUnit.spec: $(top_builddir)/config.status $(srcdir)/CUnit.spec.in
cd $(top_builddir) && $(SHELL) ./config.status $@
+cunit.pc: $(top_builddir)/config.status $(srcdir)/cunit.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
mostlyclean-libtool:
-rm -f *.lo
@@ -300,8 +363,27 @@
-rm -rf .libs _libs
distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
+ -rm -f libtool config.lt
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -310,7 +392,7 @@
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -327,16 +409,15 @@
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -362,16 +443,16 @@
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -379,14 +460,14 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
@@ -398,93 +479,114 @@
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
- mkdir $(distdir)
- $(mkdir_p) $(distdir)/. $(distdir)/CUnit/Headers
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
- || chmod -R a+r $(distdir)
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
@@ -493,6 +595,14 @@
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+ $(am__remove_distdir)
+
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
@@ -516,13 +626,17 @@
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
- bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
@@ -530,9 +644,11 @@
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
- && cd $(distdir)/_build \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
@@ -554,13 +670,15 @@
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
- sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
- @cd $(distuninstallcheck_dir) \
+ @$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
@@ -579,9 +697,12 @@
exit 1; } >&2
check-am: all-am
check: check-recursive
-all-am: Makefile config.h
+all-am: Makefile $(DATA) config.h
installdirs: installdirs-recursive
installdirs-am:
+ for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
@@ -602,6 +723,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -622,18 +744,38 @@
html: html-recursive
+html-am:
+
info: info-recursive
info-am:
-install-data-am:
+install-data-am: install-pkgconfigDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
install-exec-am:
+install-html: install-html-recursive
+
+install-html-am:
+
install-info: install-info-recursive
+install-info-am:
+
install-man:
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -654,24 +796,27 @@
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am: uninstall-pkgconfigDATA
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+ ctags-recursive install-am install-strip tags-recursive
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
- check-am clean clean-generic clean-libtool clean-recursive \
- ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
- dist-shar dist-tarZ dist-zip distcheck distclean \
- distclean-generic distclean-hdr distclean-libtool \
- distclean-recursive distclean-tags distcleancheck distdir \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am am--refresh check check-am clean clean-generic \
+ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
+ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
+ distcheck distclean distclean-generic distclean-hdr \
+ distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
- tags tags-recursive uninstall uninstall-am uninstall-info-am
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-pkgconfigDATA install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-pkgconfigDATA
clean-all: clean
@@ -718,6 +863,7 @@
|| (cp -f ${RPM_I586} .) || (cp -f ${RPM_I686} .) \
|| (cp -f ${RPM_K6} .) || (cp -f ${RPM_NOARCH} .) ) && \
rm -rf ${RPMDIRS}
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff -Nru cunit-2.1-0.dfsg/Man/Jamfile cunit-2.1-2.dfsg/Man/Jamfile
--- cunit-2.1-0.dfsg/Man/Jamfile 2006-03-21 01:30:58.000000000 +0000
+++ cunit-2.1-2.dfsg/Man/Jamfile 1970-01-01 00:00:00.000000000 +0000
@@ -1,25 +0,0 @@
-#
-# Jamfile to build CUnit - man Directory
-# (see http://www.freetype.org/jam/index.html)
-#
-# Copyright (C) 2004-2006 Jerry St.Clair
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#---------------------------------------------------------------------------
-
-SubDir TOP Man ;
-
-SubInclude TOP Man man3 ;
-
diff -Nru cunit-2.1-0.dfsg/Man/Makefile.in cunit-2.1-2.dfsg/Man/Makefile.in
--- cunit-2.1-0.dfsg/Man/Makefile.in 2006-03-22 10:57:16.000000000 +0000
+++ cunit-2.1-2.dfsg/Man/Makefile.in 2010-10-15 15:11:42.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -13,15 +14,12 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -44,21 +42,51 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -77,40 +105,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -120,35 +135,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -160,28 +180,41 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
SUBDIRS = \
man3
@@ -192,14 +225,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Man/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu Man/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Man/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Man/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -217,6 +250,7 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
@@ -224,10 +258,6 @@
clean-libtool:
-rm -rf .libs _libs
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
@@ -235,7 +265,7 @@
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -252,16 +282,15 @@
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
- @failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -287,16 +316,16 @@
else \
local_target="$$target"; \
fi; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -304,14 +333,14 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
+ set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
@@ -323,81 +352,101 @@
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
+ $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
- distdir=`$(am__cd) $(distdir) && pwd`; \
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
- (cd $$subdir && \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
- top_distdir="$$top_distdir" \
- distdir="$$distdir/$$subdir" \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
@@ -427,6 +476,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -437,8 +487,7 @@
distclean: distclean-recursive
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
- distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
@@ -446,18 +495,38 @@
html: html-recursive
+html-am:
+
info: info-recursive
info-am:
install-data-am:
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-recursive
+
+install-html-am:
+
install-info: install-info-recursive
+install-info-am:
+
install-man:
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -476,22 +545,25 @@
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
- clean clean-generic clean-libtool clean-recursive ctags \
- ctags-recursive distclean distclean-generic distclean-libtool \
- distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-libtool \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-info-am
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -Nru cunit-2.1-0.dfsg/Man/man3/CUnit.3 cunit-2.1-2.dfsg/Man/man3/CUnit.3
--- cunit-2.1-0.dfsg/Man/man3/CUnit.3 2006-01-30 03:53:54.000000000 +0000
+++ cunit-2.1-2.dfsg/Man/man3/CUnit.3 2006-04-20 02:15:47.000000000 +0000
@@ -359,8 +359,9 @@
.SS "Adding Suites to the Registry"
The first step in setting up a test system is creating and
registering one or more test collections (suites). Each suite has
-a name which must be unique among all suites registered with the
-test registry. The current implementation does not support the
+a name which may be used to reference the suite. Therefore, it is
+recommended (but not required) that each registered suite have a
+unique name. The current implementation does not support the
creation of suites independent of the test registry. Suites are
simultaneously created and added to the active registry as follows.
.P
@@ -371,22 +372,25 @@
CU_CleanupFunc pClean)"
This creates and registers a new suite having the specified name,
initialization function, and cleanup function. A pointer to the new
-suite is returned for use in adding tests to the suite. If an error
-occurs during the operation, NULL is returned and the framework error
+suite is returned for use in adding tests to the suite. This pointer
+will be NULL if a fatal error occurs. In addition, the framework error
status is set as follows:
.RS 5
.TP 18
+CUE_SUCCESS
+The suite was successfully created and registered.
+.TP 18
CUE_NOREGISTRY
-Test Registry is not initialized.
+Error: Test Registry is not initialized.
.TP 18
CUE_NO_SUITENAME
-Suite name is not specified or NULL.
+Error: Suite name is not specified or NULL.
.TP 18
CUE_DUP_SUITE
-The registry already has a suite with this name.
+Warning: The registry already has a suite with this name.
.TP 18
CUE_NOMEMORY
-Memory allocation failed.
+Error: Memory allocation failed.
.RE
.IP "" 5
The initialization and cleanup functions are optional. Both are C
@@ -401,10 +405,12 @@
.B CU_add_suite().
.SS "Adding Tests to Suites"
-Tests are created and added to suites. Each test has a name which must be
-unique among all tests added to a single suite. The current implementation
-does not support the creation of tests independent of registered suites.
-Tests are simultaneously created and added to a suite as follows.
+Tests are created and added to suites. Each test has a name which may be
+used to reference the test later. Therefore, it is recommended (but not
+required) that the name be unique among all tests added to a single suite.
+The current implementation does not support the creation of tests
+independent of registered suites. Tests are simultaneously created and
+added to a suite as follows.
.P
.B #include
(included automatically by )
@@ -415,30 +421,149 @@
adds it to the indicated suite. The suite should have been previously
created using
.B CU_add_suite().
-A pointer to the new test is returned. If an error occurs during the
-operation, NULL is returned and the framework error status is set as follows:
+A pointer to the new test is returned, which will be NULL if a fatal error
+occurred. In addition, the framework error status is set as follows:
.RS 5
.TP 18
+CUE_SUCCESS
+The test was successfully created and added.
+.TP 18
+CUE_NOREGISTRY
+Error: Test Registry is not initialized.
+.TP 18
CUE_NOSUITE
-Specified suite is NULL or invalid.
+Error: Specified suite is NULL or invalid.
.TP 18
CUE_NO_TESTNAME
-Test name is not specified or NULL.
+Error: Test name is not specified or NULL.
.TP 18
CUE_NOTEST
-Test function is not specified or NULL.
+Error: Test function is not specified or NULL.
.TP 18
CUE_DUP_TEST
-The suite already has a test with this name.
+Warning: The suite already has a test with this name.
.TP 18
CUE_NOMEMORY
-Memory allocation failed.
+Error: Memory allocation failed.
+
+.SS Activation of Suites and Tests
+A suite or test must be active to be executed during a test run
+(all suites and tests are active by default upon creation). The active
+state of a suite or test is available as pSuite->fActive and pTest->fActive,
+respectively. The flag will be CU_TRUE when the entity is active, CU_FALSE
+otherwise. Use the following functions to selectively deactivate suites and
+tests to choose subsets of tests to run dynamically. Note that it is a
+framework error to deactivate a test or suite and then specifically request
+that it be run.
+.P
+.B #include
+(included automatically by )
+.TP 5
+.B "CU_ErrorCode CU_set_suite_active(CU_pSuite pSuite, CU_BOOL fNewActive)"
+.TP 5
+.B "CU_ErrorCode CU_set_test_active(CU_pTest pTest, CU_BOOL fNewActive)"
+Pass CU_TRUE to these functions to activate a suite/test, CU_FALSE to
+deactivate it. These functions return CUE_NOSUITE and CUE_NOTEST, respectively,
+if the specified suite or test is NULL.
+
+.SS Modifying Other Attributes of Suites and Tests
+Normally the attributes of suites and tests are set at creation time. In some
+cases, a client may wish to manipulate these to modify the test structure
+dynamically. The following functions are provided for this purpose, and should
+be used instead of directly setting the value of the data structure members. All
+return CUE_SUCCESS on success, and the indicated error code on failure.
+.P
+.TP5
+.B "CU_ErrorCode CU_set_suite_name(CU_pSuite pSuite, const char *strNewName)"
+.TP 5
+.B "CU_ErrorCode CU_set_test_name(CU_pTest pTest, const char *strNewName)"
+These functions change the name of registered suites and tests. The current names
+are available as the
+.B pSuite->pName
+and
+.BpTest->pName
+data structure members. If the suite or test is NULL, then CUE_NOSUITE or CUE_NOTEST
+is returned, respectively. If strNewName is NULL, then CUE_NO_SUITENAME or
+CUE_NO_TESTNAME is returned, respectively.
+.P
+.TP 5
+.B "CU_ErrorCode CU_set_suite_initfunc(CU_pSuite pSuite, CU_InitializeFunc pNewInit)"
+.TP 5
+.B "CU_ErrorCode CU_set_suite_cleanupfunc(CU_pSuite pSuite, CU_CleanupFunc pNewClean)"
+These functions change the initialization and cleanup functions for a registered suite.
+The current functions are available as the
+.B pSuite->pInitializeFunc
+and
+.B pSuite->pCleanupFunc
+data structure members. If the suite is NULL then CUE_NOSUITE is returned.
+.P
+.TP 5
+.B "CU_ErrorCode CU_set_test_func(CU_pTest pTest, CU_TestFunc pNewFunc)"
+This function changes the test function for a registered test. The current test
+function is available as the
+.B pTest->pTestFunc
+data structure member. If either pTest or pNewFunc is NULL, then CUE_NOTEST
+is returned.
+
+.SS Lookup of Individual Suites and Tests
+In most cases, clients will have references to registered suites and tests as
+pointers returned from
+.B CU_add_suite()
+and
+.B CU_add_test().
+Occassionally, a client may need to be able to retrieve a reference to a suite or test.
+The following functions are provided to assist clients with this when the client has
+some information about the entity (name or order of registration). In cases where
+nothing is known about the suite or test, the client will need to iterate the internal
+data structures to enumerate the suites and tests. This is not directly supported in
+the client API.
+.P
+.TP5
+.B "CU_pSuite CU_get_suite(const char* strName)"
+.TP5
+.B "CU_pSuite CU_get_suite_at_pos(unsigned int pos)"
+.TP5
+.B "unsigned int CU_get_suite_pos(CU_pSuite pSuite)"
+.TP5
+.B "unsigned int CU_get_suite_pos_by_name(const char* strName)"
+
+These functions facilitate lookup of suites registered in the active test registry.
+The first 2 functions allow lookup of the suite by name or position and return NULL
+if the suite cannot be found. The position is a 1-based index in the range
+[1 ..
+.B CU_get_registry()
+->uiNumberOfSuites]. This may be helpful when suites having duplicate names are
+registered, in which case lookup by name can only retrieve the 1st suite having that
+name. The second 2 functions help the client identify the position of a registered suite.
+These return 0 if the suite cannot be found. In addition, all these functions set the
+CUnit error state to CUE_NOREGISTRY> if the registry is not initialized. As appropriate,
+CUE_NO_SUITENAME is set if strName is NULL, and CUE_NOSUITE is set if pSuite is NULL.
+.P
+.TP5
+.B "CU_pTest CU_get_test(CU_pSuite pSuite, const char *strName)"
+.TP5
+.B "CU_pTest CU_get_test_at_pos<(CU_pSuite pSuite, unsigned int pos)"
+.TP5
+.B "unsigned int CU_get_test_pos<(CU_pSuite pSuite, CU_pTest pTest)"
+.TP5
+.B "unsigned int CU_get_test_pos_by_name(CU_pSuite pSuite, const char *strName)"
+These functions facilitate lookup of tests registered in suites. The first
+2 functions allow lookup of the test by name or position and return NULL if the
+test cannot found. The position is a 1-based index in the range
+[1 .. pSuite->uiNumberOfSuites]. This may be helpful when tests having duplicate names
+are registered, in which case lookup by name can only retrieve the 1st test having that
+name. The second 2 functions help the client identify the position of a test in a suite.
+These return 0 if the test cannot be found. In addition, all these functions set the
+CUnit error state to CUE_NOREGISTRY if the registry is not initialized, and to CUE_NOSUITE
+if pSuite is NULL. As appropriate, CUE_NO_TESTNAME is set if strName is NULL, and
+CUE_NOTEST is set if pTest is NULL.
.SH "RUNNING TESTS"
-CUnit supports running all tests in all registered suites, but individual tests
-or suites can also be run. During each run, the framework keeps track of the
-number of suites, tests, and assertions run, passed, and failed. Note that the
-results are cleared each time a test run is initiated (even if it fails).
+CUnit supports running all tests in all registered suites, but individual
+tests or suites can also be run. During each run, the framework keeps track
+of the number of suites, tests, and assertions run, passed, and failed.
+Note that the previous results are cleared each time a test run is initiated
+(even if it fails).
.P
While CUnit provides primitive functions for running suites and tests, most
users will want to use one of the user interfaces. These interfaces handle
@@ -519,20 +644,19 @@
The automated interface is non-interactive. The current implementation only
supports running all registered suites. Results are output to an xml file to
be viewed by appropriate external tools. Registered tests can also be listed
-to
-an xml file for viewing. The following public functions are available:
+to an xml file for viewing. The following public functions are available:
.P
.B #include
.TP 5
.B "void CU_automated_run_tests(void)"
-Run all tests in all registered suites. Results are output to a file named
+Run all tests in all registered (and active) suites.
+Results are output to a file named
.I "ROOT-Results.xml."
The filename 'ROOT' is set using
.B CU_set_output_filename(),
or else the default 'CUnitAutomated' is used. This means that the same
-filename
-is used each run (and the results file overwritten) if the user does not
-explicitly set the 'ROOT' for each run.
+filename is used each run (and the results file overwritten) if the user
+does not explicitly set the 'ROOT' for each run.
.TP 5
.B "CU_ErrorCode CU_list_tests_to_file(void)"
Lists the registered suites and associated tests to file. The listing file is
@@ -550,29 +674,36 @@
.SS "Basic Interface (non-interactive)"
The basic interface is also non-interactive, with results output to stdout.
-This
-interface supports running individual suites or tests, and allows client code
-to
-control the type of output displayed during each run. This interface provides
-the
-most flexibility to clients desiring simplified access to the CUnit API. The
-following public functions are provided:
+This interface supports running individual suites or tests, and allows
+client code to control the type of output displayed during each run. This
+interface provides the most flexibility to clients desiring simplified access
+to the CUnit API. The following public functions are provided:
.P
.B #include
.TP 5
.B "CU_ErrorCode CU_basic_run_tests(void)"
-Run all tests in all registered suites. Returns the 1st error code occurring
-during the test run. The type of output is controlled by the current run mode,
-which can be set using
+Run all tests in all registered suites. Only the active suites are run, and it
+is not considered an error if inactive suites are encountered and skipped.
+Returns the 1st error code occurring during the test run. The type of output
+is controlled by the current run mode, which can be set using
.B CU_basic_set_mode().
.TP 5
.B "CU_ErrorCode CU_basic_run_suite(CU_pSuite pSuite)"
Run all tests in single specified suite. Returns the 1st error code occurring
-during the test run. The type of output is controlled by the current run mode.
+during the test run.
+.B CU_basic_run_suite()
+itself generates CUE_NOSUITE if pSuite is NULL, and CUE_SUITE_INACTIVE if
+the requested suite is not active. The type of output is controlled by the
+current run mode.
.TP 5
.B "CU_ErrorCode CU_basic_run_test(CU_pSuite pSuite, CU_pTest pTest)"
Run a single test in a specified suite. Returns the 1st error code occurring
-during the test run. The type of output is controlled by the current run mode.
+during the test run.
+.B BU_basic_run_test()
+itself generates CUE_NOSUITE of pSuite is NULL; CUE_NOTEST if pTest is NULL;
+CUE_SUITE_INACTIVE if pSuite is not active for execution, CUE_TEST_NOT_IN_SUITE
+if pTest is not a registered member of pSuite, and CUE_TEST_INACTIVE if pTest is
+not active for execution. The type of output is controlled by the current run mode.
.TP 5
.B "void CU_basic_set_mode(CU_BasicRunMode mode)"
Set the basic run mode, which controls the output during the run. Choices are:
@@ -610,8 +741,7 @@
.SS "Interactive Curses Interface"
The curses interface is interactive. All the client needs to do is initiate
-the
-curses session, and the user controls the test run interactively. This include
+the curses session, and the user controls the test run interactively. This include
selection & running of suites and tests, and viewing test results. Use of this
interface requires linking the ncurses library into the application.
.P
@@ -645,6 +775,9 @@
.SS Error Actions
By default, CUnit continues running tests when a framework error occurs.
+In this context, failed assertions are not considered "framework errors".
+All other error conditions including suite initialization or cleanup failures,
+inactive suites or tests which are run explicitly, etc. are included.
This 'error action' can be changed by the user if desired. The following
functions are provided:
.P
diff -Nru cunit-2.1-0.dfsg/Man/man3/Jamfile cunit-2.1-2.dfsg/Man/man3/Jamfile
--- cunit-2.1-0.dfsg/Man/man3/Jamfile 2006-03-21 01:30:58.000000000 +0000
+++ cunit-2.1-2.dfsg/Man/man3/Jamfile 1970-01-01 00:00:00.000000000 +0000
@@ -1,28 +0,0 @@
-#
-# Jamfile to build CUnit - man/man3 Directory
-# (see http://www.freetype.org/jam/index.html)
-#
-# Copyright (C) 2004-2006 Jerry St.Clair
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#---------------------------------------------------------------------------
-
-SubDir TOP Man man3 ;
-
-if $(INSTALL_MAN_DIR)
-{
- InstallMan $(INSTALL_MAN_DIR) : CUnit.3 ;
-}
-
diff -Nru cunit-2.1-0.dfsg/Man/man3/Makefile.in cunit-2.1-2.dfsg/Man/man3/Makefile.in
--- cunit-2.1-0.dfsg/Man/man3/Makefile.in 2006-03-22 10:57:16.000000000 +0000
+++ cunit-2.1-2.dfsg/Man/man3/Makefile.in 2010-10-15 15:11:42.000000000 +0000
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -13,15 +14,12 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -44,16 +42,36 @@
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
man3dir = $(mandir)/man3
am__installdirs = "$(DESTDIR)$(man3dir)"
NROFF = nroff
MANS = $(man_MANS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -72,40 +90,27 @@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURSES_LIB = @CURSES_LIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-ECHO = @ECHO@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
-ENABLE_AUTOMATED_FALSE = @ENABLE_AUTOMATED_FALSE@
-ENABLE_AUTOMATED_TRUE = @ENABLE_AUTOMATED_TRUE@
-ENABLE_BASIC_FALSE = @ENABLE_BASIC_FALSE@
-ENABLE_BASIC_TRUE = @ENABLE_BASIC_TRUE@
-ENABLE_CONSOLE_FALSE = @ENABLE_CONSOLE_FALSE@
-ENABLE_CONSOLE_TRUE = @ENABLE_CONSOLE_TRUE@
-ENABLE_CURSES_FALSE = @ENABLE_CURSES_FALSE@
-ENABLE_CURSES_TRUE = @ENABLE_CURSES_TRUE@
ENABLE_DEBUG = @ENABLE_DEBUG@
ENABLE_DEPRECATED = @ENABLE_DEPRECATED@
-ENABLE_EXAMPLES_FALSE = @ENABLE_EXAMPLES_FALSE@
-ENABLE_EXAMPLES_TRUE = @ENABLE_EXAMPLES_TRUE@
ENABLE_MEMTRACE = @ENABLE_MEMTRACE@
-ENABLE_TEST_FALSE = @ENABLE_TEST_FALSE@
-ENABLE_TEST_TRUE = @ENABLE_TEST_TRUE@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -115,35 +120,40 @@
LIBTOOL_REVISION = @LIBTOOL_REVISION@
LIBTOOL_SUFFIX = @LIBTOOL_SUFFIX@
LIBTOOL_SUFFIX1 = @LIBTOOL_SUFFIX1@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -155,28 +165,41 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
man_MANS = \
CUnit.3
@@ -187,14 +210,14 @@
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Man/man3/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu Man/man3/Makefile
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Man/man3/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Man/man3/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -212,61 +235,51 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-install-man3: $(man3_MANS) $(man_MANS)
+install-man3: $(man_MANS)
@$(NORMAL_INSTALL)
- test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)"
- @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.3*) list="$$list $$i" ;; \
- esac; \
+ test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
+ @list=''; test -n "$(man3dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.3[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
+ fi; \
done; \
- for i in $$list; do \
- if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
- else file=$$i; fi; \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 3*) ;; \
- *) ext='3' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
- $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
- done
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
+ done; }
+
uninstall-man3:
@$(NORMAL_UNINSTALL)
- @list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
- l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
- for i in $$l2; do \
- case "$$i" in \
- *.3*) list="$$list $$i" ;; \
- esac; \
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
- case "$$ext" in \
- 3*) ;; \
- *) ext='3' ;; \
- esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
- echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \
- rm -f "$(DESTDIR)$(man3dir)/$$inst"; \
- done
+ @list=''; test -n "$(man3dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.3[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
tags: TAGS
TAGS:
@@ -275,29 +288,45 @@
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@@ -306,7 +335,7 @@
all-am: Makefile $(MANS)
installdirs:
for dir in "$(DESTDIR)$(man3dir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -328,6 +357,7 @@
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -338,7 +368,7 @@
distclean: distclean-am
-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
dvi: dvi-am
@@ -346,18 +376,38 @@
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am: install-man
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
install-exec-am:
+install-html: install-html-am
+
+install-html-am:
+
install-info: install-info-am
+install-info-am:
+
install-man: install-man3
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -376,20 +426,24 @@
ps-am:
-uninstall-am: uninstall-info-am uninstall-man
+uninstall-am: uninstall-man
uninstall-man: uninstall-man3
+.MAKE: install-am install-strip
+
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-man3 \
+ install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- uninstall uninstall-am uninstall-info-am uninstall-man \
- uninstall-man3
+ uninstall uninstall-am uninstall-man uninstall-man3
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff -Nru cunit-2.1-0.dfsg/Share/CUnit-List.dtd cunit-2.1-2.dfsg/Share/CUnit-List.dtd
--- cunit-2.1-0.dfsg/Share/CUnit-List.dtd 2004-10-01 02:38:26.000000000 +0000
+++ cunit-2.1-2.dfsg/Share/CUnit-List.dtd 2006-05-19 21:57:27.000000000 +0000
@@ -11,13 +11,16 @@
-
+
-
-
+
+
+
+
+
diff -Nru cunit-2.1-0.dfsg/Share/CUnit-List.xsl cunit-2.1-2.dfsg/Share/CUnit-List.xsl
--- cunit-2.1-0.dfsg/Share/CUnit-List.xsl 2006-02-14 02:15:48.000000000 +0000
+++ cunit-2.1-2.dfsg/Share/CUnit-List.xsl 2006-05-19 21:57:27.000000000 +0000
@@ -1,119 +1,151 @@
-
-
-
-
-
- CUnit - Logical Test Case Organization in Test Registry
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
-
-
- |
-
-
-
-
-
-
Listing of All Tests
-
-
-
-
-
-
-
-
-
- Suite |
- |
-
- Initialize Function? |
- |
-
- Cleanup Function? |
- |
-
- Test Count |
- |
-
-
-
-
-
- Test Cases |
-
-
-
-
- |
- |
-
-
-
-
-
-
-
-
- Suite |
- |
-
- Initialize Function? |
- |
-
- Cleanup Function? |
- |
-
- Test Count |
- |
-
-
-
-
-
- Test Cases |
-
-
-
-
- |
- |
-
-
-
-
-
+
+
+
+
+
+ CUnit - Suite and Test Case Organization in Test Registry
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
Listing of Registered Suites & Tests
+
+
+
+ |
+
+
+ |
+ Initialize Function? |
+ Cleanup Function? |
+ Test Count |
+ Active? |
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+ Suite |
+ |
+
+ |
+ |
+ |
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Test |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Suite |
+
+
+ |
+
+ Initialize Function? |
+
+
+ |
+
+ Cleanup Function? |
+
+
+ |
+
+ Test Count |
+
+
+ |
+
+
+
+
+
+ Test Cases |
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+
+
-
-
-
-
+
+
+
+
diff -Nru cunit-2.1-0.dfsg/Share/CUnit-Run.dtd cunit-2.1-2.dfsg/Share/CUnit-Run.dtd
--- cunit-2.1-0.dfsg/Share/CUnit-Run.dtd 2004-10-01 02:38:26.000000000 +0000
+++ cunit-2.1-2.dfsg/Share/CUnit-Run.dtd 2006-05-19 21:57:27.000000000 +0000
@@ -25,11 +25,12 @@
-
+
+
diff -Nru cunit-2.1-0.dfsg/Share/CUnit-Run.xsl cunit-2.1-2.dfsg/Share/CUnit-Run.xsl
--- cunit-2.1-0.dfsg/Share/CUnit-Run.xsl 2006-02-14 02:51:32.000000000 +0000
+++ cunit-2.1-2.dfsg/Share/CUnit-Run.xsl 2006-05-19 21:57:27.000000000 +0000
@@ -2,130 +2,172 @@
-
+
-
- CUnit - All Test Run Summary Report
-
-
-
-
-
-
+
+ CUnit - Automated Test Run Summary Report
+
+
+
+
+
+