Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Rename endskip and endtodo to end_skip and end_todo

The other functions use underscore separated names like cmp_ok, dies_ok,
lives_ok, done_testing, BAIL_OUT. These functions should too.
  • Loading branch information...
commit 0e45669c781edad2062a60e689adda447c0a380b 1 parent e1329bf
Jake Gelbman authored

Showing 5 changed files with 15 additions and 15 deletions. Show diff stats Hide diff stats

  1. +5 5 README.md
  2. +4 4 t/skip.c
  3. +2 2 t/todo.c
  4. +1 1  tap.c
  5. +3 3 tap.h
10 README.md
Source Rendered
@@ -198,16 +198,16 @@ FUNCTIONS
198 198
199 199 - skip(test, n)
200 200 - skip(test, n, fmt, ...)
201   -- endskip
  201 +- end_skip
202 202
203 203 Skip a series of n tests if test is true. You may give a reason why you are
204 204 skipping them or not. The (possibly) skipped tests must occur between the
205   - skip and endskip macros.
  205 + skip and end_skip macros.
206 206
207 207 skip(TRUE, 2);
208 208 ok(1);
209 209 ok(0);
210   - endskip;
  210 + end_skip;
211 211
212 212 prints:
213 213
@@ -216,14 +216,14 @@ FUNCTIONS
216 216
217 217 - todo()
218 218 - todo(fmt, ...)
219   -- endtodo
  219 +- end_todo
220 220
221 221 Specifies a series of tests that you expect to fail because they are not
222 222 yet implemented.
223 223
224 224 todo()
225 225 ok(0);
226   - endtodo;
  226 + end_todo;
227 227
228 228 prints:
229 229
8 t/skip.c
@@ -7,18 +7,18 @@ int main () {
7 7 ok(1, "quux");
8 8 ok(1, "thud");
9 9 ok(1, "wombat");
10   - endskip;
  10 + end_skip;
11 11 skip(1, 1, "need to be on windows");
12 12 ok(0, "blurgle");
13   - endskip;
  13 + end_skip;
14 14 skip(0, 3);
15 15 ok(1, "quux");
16 16 ok(1, "thud");
17 17 ok(1, "wombat");
18   - endskip;
  18 + end_skip;
19 19 skip(1, 1);
20 20 ok(0, "blurgle");
21   - endskip;
  21 + end_skip;
22 22 done_testing();
23 23 }
24 24
4 t/todo.c
@@ -7,12 +7,12 @@ int main () {
7 7 ok(0, "foo");
8 8 ok(1, "bar");
9 9 ok(1, "baz");
10   - endtodo;
  10 + end_todo;
11 11 todo("im not ready");
12 12 ok(0, "quux");
13 13 ok(1, "thud");
14 14 ok(1, "wombat");
15   - endtodo;
  15 + end_todo;
16 16 done_testing();
17 17 }
18 18
2  tap.c
@@ -262,7 +262,7 @@ todof (int ignore, const char *fmt, ...) {
262 262 }
263 263
264 264 void
265   -endtodof () {
  265 +end_todof () {
266 266 free(todo_mesg);
267 267 todo_mesg = NULL;
268 268 }
6 tap.h
@@ -40,7 +40,7 @@ int note (const char *fmt, ...);
40 40 int exit_status (void);
41 41 void skippy (int n, const char *fmt, ...);
42 42 void todof (int ignore, const char *fmt, ...);
43   -void endtodof (void);
  43 +void end_todof (void);
44 44
45 45 #define NO_PLAN -1
46 46 #define SKIP_ALL -2
@@ -55,10 +55,10 @@ void endtodof (void);
55 55 #define fail(...) ok(0, "" __VA_ARGS__)
56 56
57 57 #define skip(test, ...) do {if (test) {skippy(__VA_ARGS__, NULL); break;}
58   -#define endskip } while (0)
  58 +#define end_skip } while (0)
59 59
60 60 #define todo(...) todof(0, "" __VA_ARGS__, NULL)
61   -#define endtodo endtodof()
  61 +#define end_todo end_todof()
62 62
63 63 #define dies_ok(...) dies_ok_common(1, __VA_ARGS__)
64 64 #define lives_ok(...) dies_ok_common(0, __VA_ARGS__)

0 comments on commit 0e45669

Please sign in to comment.
Something went wrong with that request. Please try again.