From 1fad1b04d505288ac8fcc8a4c4ec1502306a0e12 Mon Sep 17 00:00:00 2001 From: stewartamiles Date: Thu, 23 Jul 2009 16:37:20 +0000 Subject: [PATCH] Fixed internal links () to headings that contain spaces when index.html is converted to wiki format. git-svn-id: http://cmockery.googlecode.com/svn/trunk@40 40f4469a-5155-0410-be90-2de3f0bae501 --- doc/html2wiki.sh | 3 +++ doc/index.html | 56 ++++++++++++++++++++++++------------------------ 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/doc/html2wiki.sh b/doc/html2wiki.sh index a7892ce..f962e2e 100644 --- a/doc/html2wiki.sh +++ b/doc/html2wiki.sh @@ -128,6 +128,9 @@ function list_indent(indent) { # Limitations: # * Anchors must be on a single line and must contain one of either the name or # href attributes. +# * Href of local anchors (href="#.*") should be set to the name of a heading +# within the document. If the heading contains spaces the href should +# contain underscores. # * All external links are relative to # http://cmockery.googlecode.com/svn/trunk/doc/ sed -r ' diff --git a/doc/index.html b/doc/index.html index 384e732..960f9a1 100644 --- a/doc/index.html +++ b/doc/index.html @@ -9,20 +9,20 @@ @@ -62,7 +62,7 @@ some modification, therefore the preprocessor symbol UNIT_TESTING should be defined when Cmockery unit test applications are compiled so code within the module can be conditionally compiled for tests.

-

Test Execution

+

Test Execution

Cmockery unit test cases are functions with the signature void function(void **state). Cmockery test applications initialize a table with test case function pointers using unit_test*() macros. This @@ -93,14 +93,14 @@ int main(int argc, char* argv[]) { } -

Exception Handling

+

Exception Handling

Before a test function is executed by run_tests(), exception / signal handlers are overridden with a handler that simply displays an error and exits a test function if an exception occurs. If an exception occurs outside of a test function, for example in Cmockery itself, the application aborts execution and returns an error code.

-

Failure Conditions

+

Failure Conditions

If a failure occurs during a test function that's executed via run_tests(), the test function is aborted and the application's execution resumes with the next test function. @@ -111,13 +111,13 @@ failure...

@@ -125,7 +125,7 @@ failure...

Runtime assert macros like the standard C library's assert() should be redefined in modules being tested to use Cmockery's mock_assert() function. Normally mock_assert() signals a -test failure. If a function is called using +test failure. If a function is called using the expect_assert_failure() macro, any calls to mock_assert() within the function will result in the execution of the test. If no calls to mock_assert() occur during the function called via @@ -192,7 +192,7 @@ int main(int argc, char *argv[]) { } -

Assert Macros

+

Assert Macros

Cmockery provides an assortment of assert macros that tests applications should use use in preference to the C standard library's assert macro. On an @@ -264,14 +264,14 @@ int main(int argc, char *argv[]) { } -

Dynamic Memory Allocation

+

Dynamic Memory Allocation

To test for memory leaks, buffer overflows and underflows a module being tested by Cmockery should replace calls to malloc(), calloc() and free() to test_malloc(), test_calloc() and test_free() respectively. Each time a block is deallocated using test_free() it is checked for corruption, if a corrupt block is found -a test failure is signalled. All blocks +a test failure is signalled. All blocks allocated using the test_*() allocation functions are tracked by the Cmockery library. When a test completes if any allocated blocks (memory leaks) remain they are reported and a test failure is signalled.

@@ -349,7 +349,7 @@ int main(int argc, char* argv[]) { } -

Mock Functions

+

Mock Functions

A unit test should ideally isolate the function or module being tested from any external dependencies. This can be performed using mock functions @@ -359,7 +359,7 @@ references external functions. Dynamic linking is simply the process of setting a function pointer in a table used by the tested module to reference a mock function defined in the unit test.

-

Return Values

+

Return Values

In order to simplify the implementation of mock functions Cmockery provides functionality which stores return values for mock functions in each test @@ -492,7 +492,7 @@ int main(int argc, char* argv[]) { } -

Checking Parameters

+

Checking Parameters

In addition to storing the return values of mock functions, Cmockery provides functionality to store expected values for mock function parameters using the expect_*() functions provided. A mock function parameter can then @@ -569,7 +569,7 @@ int main(int argc, char* argv[]) { } -

Test State

+

Test State

Cmockery allows the specification of multiple setup and tear down functions for each test case. Setup functions, specified by the unit_test_setup() @@ -702,5 +702,5 @@ are provided as an example of Cmockery's features discussed in this document.


- Last modified: Mon Jul 20 15:57:27 PDT 2009 + Last modified: Wed Jul 22 12:11:43 PDT 2009 -- 2.34.1