Commit 02555385 authored by mats@mysql.com's avatar mats@mysql.com

WL#3208 (Adding TAP support):

Making it portable to non-gcc compilers by defining __attribute__
macro for non-gcc compilers.
parent 1ebd03fc
...@@ -412,42 +412,44 @@ WARN_LOGFILE = ...@@ -412,42 +412,44 @@ WARN_LOGFILE =
# configuration options related to the input files # configuration options related to the input files
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# The INPUT tag can be used to specify the files and/or directories that contain # The INPUT tag can be used to specify the files and/or directories
# documented source files. You may enter file names like "myfile.cpp" or # that contain documented source files. You may enter file names like
# directories like "/usr/src/myproject". Separate the files or directories # "myfile.cpp" or directories like "/usr/src/myproject". Separate the
# with spaces. # files or directories with spaces.
INPUT = INPUT =
# If the value of the INPUT tag contains directories, you can use the # If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # FILE_PATTERNS tag to specify one or more wildcard pattern (like
# and *.h) to filter out the source-files in the directories. If left # *.cpp and *.h) to filter out the source-files in the directories. If
# blank the following patterns are tested: # left blank the following patterns are tested: *.c *.cc *.cxx *.cpp
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp # *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp *.h++
# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm # *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
FILE_PATTERNS = FILE_PATTERNS =
# The RECURSIVE tag can be used to turn specify whether or not subdirectories # The RECURSIVE tag can be used to turn specify whether or not
# should be searched for input files as well. Possible values are YES and NO. # subdirectories should be searched for input files as well. Possible
# If left blank NO is used. # values are YES and NO. If left blank NO is used.
RECURSIVE = NO RECURSIVE = YES
# The EXCLUDE tag can be used to specify files and/or directories that should # The EXCLUDE tag can be used to specify files and/or directories that
# excluded from the INPUT source files. This way you can easily exclude a # should excluded from the INPUT source files. This way you can easily
# subdirectory from a directory tree whose root is specified with the INPUT tag. # exclude a subdirectory from a directory tree whose root is specified
# with the INPUT tag.
EXCLUDE = EXCLUDE =
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories # The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# that are symbolic links (a Unix filesystem feature) are excluded from the input. # directories that are symbolic links (a Unix filesystem feature) are
# excluded from the input.
EXCLUDE_SYMLINKS = NO EXCLUDE_SYMLINKS = NO
# If the value of the INPUT tag contains directories, you can use the # If the value of the INPUT tag contains directories, you can use the
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to
# certain files from those directories. # exclude certain files from those directories.
EXCLUDE_PATTERNS = EXCLUDE_PATTERNS =
...@@ -918,7 +920,7 @@ ENABLE_PREPROCESSING = YES ...@@ -918,7 +920,7 @@ ENABLE_PREPROCESSING = YES
# compilation will be performed. Macro expansion can be done in a controlled # compilation will be performed. Macro expansion can be done in a controlled
# way by setting EXPAND_ONLY_PREDEF to YES. # way by setting EXPAND_ONLY_PREDEF to YES.
MACRO_EXPANSION = NO MACRO_EXPANSION = YES
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to 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
......
...@@ -21,6 +21,10 @@ ...@@ -21,6 +21,10 @@
#ifndef TAP_H #ifndef TAP_H
#define TAP_H #define TAP_H
#ifndef __GNUC__
#define __attribute__(F)
#endif
/* /*
@defgroup MyTAP MySQL support for performing unit tests according to TAP. @defgroup MyTAP MySQL support for performing unit tests according to TAP.
...@@ -86,7 +90,7 @@ void plan(int count); ...@@ -86,7 +90,7 @@ void plan(int count);
which case nothing is printed. which case nothing is printed.
*/ */
void ok(int pass, char const *fmt, ...) void ok(int pass, char const *fmt, ...)
__attribute__ ((format(printf,2,3))); __attribute__((format(printf,2,3)));
/** /**
Skip a determined number of tests. Skip a determined number of tests.
...@@ -113,7 +117,7 @@ void ok(int pass, char const *fmt, ...) ...@@ -113,7 +117,7 @@ void ok(int pass, char const *fmt, ...)
@param reason A reason for skipping the tests @param reason A reason for skipping the tests
*/ */
void skip(int how_many, char const *reason, ...) void skip(int how_many, char const *reason, ...)
__attribute__ ((format(printf,2,3))); __attribute__((format(printf,2,3)));
/** /**
...@@ -142,7 +146,7 @@ void skip(int how_many, char const *reason, ...) ...@@ -142,7 +146,7 @@ void skip(int how_many, char const *reason, ...)
@param fmt Diagnostics message in printf() format. @param fmt Diagnostics message in printf() format.
*/ */
void diag(char const *fmt, ...) void diag(char const *fmt, ...)
__attribute__ ((format(printf,1,2))); __attribute__((format(printf,1,2)));
/** /**
Print summary report and return exit status. Print summary report and return exit status.
...@@ -170,7 +174,7 @@ int exit_status(void); ...@@ -170,7 +174,7 @@ int exit_status(void);
around it. around it.
*/ */
void skip_all(char const *reason, ...) void skip_all(char const *reason, ...)
__attribute__ ((noreturn, format(printf, 1, 2))); __attribute__((noreturn, format(printf, 1, 2)));
/** /**
Start section of tests that are not yet ready. Start section of tests that are not yet ready.
...@@ -193,7 +197,7 @@ void skip_all(char const *reason, ...) ...@@ -193,7 +197,7 @@ void skip_all(char const *reason, ...)
@param message Message that will be printed before the todo tests. @param message Message that will be printed before the todo tests.
*/ */
void todo_start(char const *message, ...) void todo_start(char const *message, ...)
__attribute__ ((format (printf, 1, 2))); __attribute__((format (printf, 1, 2)));
/** /**
End a section of tests that are not yet ready. End a section of tests that are not yet ready.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment