Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
87235230
Commit
87235230
authored
Oct 20, 2006
by
mats@romeo.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation changes to MyTAP.
parent
d67b341a
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
302 additions
and
59 deletions
+302
-59
unittest/README.txt
unittest/README.txt
+9
-0
unittest/mytap/Doxyfile
unittest/mytap/Doxyfile
+24
-23
unittest/mytap/tap.c
unittest/mytap/tap.c
+246
-22
unittest/mytap/tap.h
unittest/mytap/tap.h
+23
-14
No files found.
unittest/README.txt
View file @
87235230
...
@@ -37,3 +37,12 @@ directory and add the following to the Makefile.am in that directory
...
@@ -37,3 +37,12 @@ directory and add the following to the Makefile.am in that directory
Note, it's important to have "-t" at the end of the filename, otherwise the
Note, it's important to have "-t" at the end of the filename, otherwise the
test won't be executed by 'make test' !
test won't be executed by 'make test' !
Documentation
-------------
The generated documentation is temporarily placed at:
http://www.kindahl.net/mytap/doc/
I will move it to a better place once I figure out where and how.
unittest/mytap/Doxyfile
View file @
87235230
...
@@ -432,7 +432,7 @@ FILE_PATTERNS =
...
@@ -432,7 +432,7 @@ FILE_PATTERNS =
# subdirectories should be searched for input files as well. Possible
# subdirectories should be searched for input files as well. Possible
# values are YES and NO. If left blank NO is used.
# values are YES and NO. If left blank NO is used.
RECURSIVE =
YES
RECURSIVE =
NO
# The EXCLUDE tag can be used to specify files and/or directories that
# The EXCLUDE tag can be used to specify files and/or directories that
# should excluded from the INPUT source files. This way you can easily
# should excluded from the INPUT source files. This way you can easily
...
@@ -457,14 +457,14 @@ EXCLUDE_PATTERNS =
...
@@ -457,14 +457,14 @@ EXCLUDE_PATTERNS =
# directories that contain example code fragments that are included (see
# directories that contain example code fragments that are included (see
# the \include command).
# the \include command).
EXAMPLE_PATH =
EXAMPLE_PATH =
e
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# and *.h) to filter out the source-files in the directories. If left
# and *.h) to filter out the source-files in the directories. If left
# blank all files are included.
# blank all files are included.
EXAMPLE_PATTERNS =
EXAMPLE_PATTERNS =
*.c
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
# searched for input files to be used with the \include or \dontinclude
# searched for input files to be used with the \include or \dontinclude
...
@@ -926,7 +926,7 @@ MACRO_EXPANSION = YES
...
@@ -926,7 +926,7 @@ MACRO_EXPANSION = YES
# then the macro expansion is limited to the macros specified with the
# then the macro expansion is limited to the macros specified with the
# PREDEFINED and EXPAND_AS_PREDEFINED tags.
# PREDEFINED and EXPAND_AS_PREDEFINED tags.
EXPAND_ONLY_PREDEF =
NO
EXPAND_ONLY_PREDEF =
YES
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
# in the INCLUDE_PATH (see below) will be search if a #include is found.
# in the INCLUDE_PATH (see below) will be search if a #include is found.
...
@@ -939,33 +939,34 @@ SEARCH_INCLUDES = YES
...
@@ -939,33 +939,34 @@ SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_PATH =
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more
wildcard
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more
#
patterns (like *.h and *.hpp) to filter out the header-files in the
#
wildcard patterns (like *.h and *.hpp) to filter out the
#
directories. If left blank, the patterns specified with FILE_PATTERNS will
#
header-files in the directories. If left blank, the patterns
# be used.
#
specified with FILE_PATTERNS will
be used.
INCLUDE_FILE_PATTERNS =
INCLUDE_FILE_PATTERNS =
# The PREDEFINED tag can be used to specify one or more macro names
that
# The PREDEFINED tag can be used to specify one or more macro names
#
are defined before the preprocessor is started (similar to the -D option of
#
that are defined before the preprocessor is started (similar to the
#
gcc). The argument of the tag is a list of macros of the form: name
#
-D option of gcc). The argument of the tag is a list of macros of
#
or name=definition (no spaces). If the definition and the = are
#
the form: name or name=definition (no spaces). If the definition and
# omitted =1 is assumed.
#
the = are
omitted =1 is assumed.
PREDEFINED =
PREDEFINED =
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES
# this tag can be used to specify a list of macro names that should be expanded.
# then this tag can be used to specify a list of macro names that
# The macro definition that is found in the sources will be used.
# should be expanded. The macro definition that is found in the
# Use the PREDEFINED tag if you want to use a different macro definition.
# sources will be used. Use the PREDEFINED tag if you want to use a
# different macro definition.
EXPAND_AS_DEFINED =
EXPAND_AS_DEFINED =
__attribute__
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
# doxygen's preprocessor will remove all function-like macros that are
alone
# doxygen's preprocessor will remove all function-like macros that are
#
on a line, have an all uppercase name, and do not end with a semicolon. Such
#
alone on a line, have an all uppercase name, and do not end with a
#
function macros are typically used for boiler-plate code, and will confuse the
#
semicolon. Such function macros are typically used for boiler-plate
# parser if not removed.
#
code, and will confuse the
parser if not removed.
SKIP_FUNCTION_MACROS = YES
SKIP_FUNCTION_MACROS = YES
...
...
unittest/mytap/tap.c
View file @
87235230
This diff is collapsed.
Click to expand it.
unittest/mytap/tap.h
View file @
87235230
...
@@ -23,16 +23,13 @@
...
@@ -23,16 +23,13 @@
#include "my_global.h"
#include "my_global.h"
/*
@defgroup MyTAP MySQL support for performing unit tests according to TAP.
*/
#define NO_PLAN (0)
#define NO_PLAN (0)
/**
/**
Data about test plan.
Data about test plan.
@ingroup MyTAP_Internal
@internal We are using the "typedef struct X { ... } X" idiom to
@internal We are using the "typedef struct X { ... } X" idiom to
create class/struct X both in C and C++.
create class/struct X both in C and C++.
*/
*/
...
@@ -59,6 +56,14 @@ typedef struct TEST_DATA {
...
@@ -59,6 +56,14 @@ typedef struct TEST_DATA {
extern
"C"
{
extern
"C"
{
#endif
#endif
/**
@defgroup MyTAP_API MyTAP API
MySQL support for performing unit tests according to TAP.
@{
*/
/**
/**
Set number of tests that is planned to execute.
Set number of tests that is planned to execute.
...
@@ -93,11 +98,14 @@ void ok(int pass, char const *fmt, ...)
...
@@ -93,11 +98,14 @@ void ok(int pass, char const *fmt, ...)
/**
/**
Skip a determined number of tests.
Skip a determined number of tests.
Function to print that <em>how_many</em> tests have been
Function to print that <em>how_many</em> tests have been skipped.
skipped. The reason is printed for each skipped test. Observe
The reason is printed for each skipped test. Observe that this
that this function does not do the actual skipping for you, it just
function does not do the actual skipping for you, it just prints
prints information that tests have been skipped. It shall be used
information that tests have been skipped. This function is not
in the following manner:
usually used, but rather the macro @c SKIP_BLOCK_IF, which does the
skipping for you.
It shall be used in the following manner:
@code
@code
if (ducks == 0) {
if (ducks == 0) {
...
@@ -130,10 +138,9 @@ void skip(int how_many, char const *reason, ...)
...
@@ -130,10 +138,9 @@ void skip(int how_many, char const *reason, ...)
for (i = 0 ; i < 2 ; ++i)
for (i = 0 ; i < 2 ; ++i)
ok(duck[i] == paddling, "is duck %d paddling?", i);
ok(duck[i] == paddling, "is duck %d paddling?", i);
}
}
@endcode
@see skip
@see skip
@endcode
*/
*/
#define SKIP_BLOCK_IF(SKIP_IF_TRUE, COUNT, REASON) \
#define SKIP_BLOCK_IF(SKIP_IF_TRUE, COUNT, REASON) \
if (SKIP_IF_TRUE) skip((COUNT),(REASON)); else
if (SKIP_IF_TRUE) skip((COUNT),(REASON)); else
...
@@ -158,8 +165,8 @@ void diag(char const *fmt, ...)
...
@@ -158,8 +165,8 @@ void diag(char const *fmt, ...)
return exit_status();
return exit_status();
@endcode
@endcode
@returns
EXIT_SUCCESS if all tests passed, EXIT_FAILURE if one or
@returns
@c EXIT_SUCCESS if all tests passed, @c EXIT_FAILURE if
more tests failed.
one or
more tests failed.
*/
*/
int
exit_status
(
void
);
int
exit_status
(
void
);
...
@@ -202,6 +209,8 @@ void todo_start(char const *message, ...)
...
@@ -202,6 +209,8 @@ void todo_start(char const *message, ...)
*/
*/
void
todo_end
();
void
todo_end
();
/** @} */
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment