* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+#include <ccan/compiler/compiler.h>
/**
* plan_tests - announce the number of tests you plan to run
# define skip_end } while(0)
-#ifndef PRINTF_ATTRIBUTE
-#ifdef __GNUC__
-#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
-#else
-#define PRINTF_ATTRIBUTE(a1, a2)
-#endif
-#endif
-
-unsigned int _gen_result(int, const char *, char *, unsigned int, char *, ...)
- PRINTF_ATTRIBUTE(5, 6);
+unsigned int _gen_result(int, const char *, const char *, unsigned int,
+ const char *, ...) PRINTF_ATTRIBUTE(5, 6);
/**
* diag - print a diagnostic message (use instead of printf/fprintf)
* Example:
* diag("Now running complex tests");
*/
-void diag(char *fmt, ...) PRINTF_ATTRIBUTE(1, 2);
+void diag(const char *fmt, ...) PRINTF_ATTRIBUTE(1, 2);
/**
* skip - print a diagnostic message (use instead of printf/fprintf)
* skip(1, "Don't have SOME_FEATURE");
* #endif
*/
-void skip(unsigned int n, char *fmt, ...) PRINTF_ATTRIBUTE(2, 3);
+void skip(unsigned int n, const char *fmt, ...) PRINTF_ATTRIBUTE(2, 3);
/**
* todo_start - mark tests that you expect to fail.
* ok(dwim(), "Did what the user wanted");
* todo_end();
*/
-void todo_start(char *fmt, ...) PRINTF_ATTRIBUTE(1, 2);
+void todo_start(const char *fmt, ...) PRINTF_ATTRIBUTE(1, 2);
/**
* todo_end - end of tests you expect to fail.
* }
* plan_tests(13);
*/
-void plan_skip_all(char *reason);
+void plan_skip_all(const char *reason);
#endif /* C99 or gcc */