diff options
author | Tor Didriksen <tor.didriksen@sun.com> | 2010-06-10 13:15:35 +0200 |
---|---|---|
committer | Tor Didriksen <tor.didriksen@sun.com> | 2010-06-10 13:15:35 +0200 |
commit | a24df71e95fb6379a3ba86322c9941a82b8d6527 (patch) | |
tree | cbbeaa1e16e995fa7ff3358a1069ebb16c27870d /unittest/mytap/tap.h | |
parent | 34ceaa6a3d030c25500e7e39e95ca92d0f1448b4 (diff) | |
download | mariadb-git-a24df71e95fb6379a3ba86322c9941a82b8d6527.tar.gz |
Backport of Bug#53303 mytap tests should always have a plan()
The bug was caused by buffered output. Flushing resolved it.
We still recommend to allways call plan().
Also fix some compile warnings (formal parameter different from declaration)
unittest/examples/Makefile.am:
Omit core-t, since it will always fail.
unittest/examples/no_plan-t.c:
Comment that we recommend calling plan(NO_PLAN)
unittest/mytap/tap.c:
Use the named constant NO_PLAN
Flush all output.
unittest/mytap/tap.h:
Change documentation for the plan() function.
Diffstat (limited to 'unittest/mytap/tap.h')
-rw-r--r-- | unittest/mytap/tap.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/unittest/mytap/tap.h b/unittest/mytap/tap.h index 31ec47d1ef2..4118207ca7a 100644 --- a/unittest/mytap/tap.h +++ b/unittest/mytap/tap.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 MySQL AB +/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -72,10 +72,9 @@ extern "C" { /** Set number of tests that is planned to execute. - The function also accepts the predefined constant - <code>NO_PLAN</code>. If the function is not called, it is as if - it was called with <code>NO_PLAN</code>, i.e., the test plan will - be printed after all the test lines. + The function also accepts the predefined constant <code>NO_PLAN</code>. + If invoked with this constant -- or not invoked at all -- + the test plan will be printed after all the test lines. The plan() function will install signal handlers for all signals that generate a core, so if you want to override these signals, do @@ -84,7 +83,7 @@ extern "C" { @param count The planned number of tests to run. */ -void plan(int count); +void plan(int const count); /** @@ -103,7 +102,7 @@ void plan(int count); which case nothing is printed. */ -void ok(int pass, char const *fmt, ...) +void ok(int const pass, char const *fmt, ...) __attribute__((format(printf,2,3))); |