Browse files

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...
1 parent e1329bf commit 0e45669c781edad2062a60e689adda447c0a380b Jake Gelbman committed Jul 13, 2012
Showing with 15 additions and 15 deletions.
  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
View
10 README.md
@@ -198,16 +198,16 @@ FUNCTIONS
- skip(test, n)
- skip(test, n, fmt, ...)
-- endskip
+- end_skip
Skip a series of n tests if test is true. You may give a reason why you are
skipping them or not. The (possibly) skipped tests must occur between the
- skip and endskip macros.
+ skip and end_skip macros.
skip(TRUE, 2);
ok(1);
ok(0);
- endskip;
+ end_skip;
prints:
@@ -216,14 +216,14 @@ FUNCTIONS
- todo()
- todo(fmt, ...)
-- endtodo
+- end_todo
Specifies a series of tests that you expect to fail because they are not
yet implemented.
todo()
ok(0);
- endtodo;
+ end_todo;
prints:
View
8 t/skip.c
@@ -7,18 +7,18 @@ int main () {
ok(1, "quux");
ok(1, "thud");
ok(1, "wombat");
- endskip;
+ end_skip;
skip(1, 1, "need to be on windows");
ok(0, "blurgle");
- endskip;
+ end_skip;
skip(0, 3);
ok(1, "quux");
ok(1, "thud");
ok(1, "wombat");
- endskip;
+ end_skip;
skip(1, 1);
ok(0, "blurgle");
- endskip;
+ end_skip;
done_testing();
}
View
4 t/todo.c
@@ -7,12 +7,12 @@ int main () {
ok(0, "foo");
ok(1, "bar");
ok(1, "baz");
- endtodo;
+ end_todo;
todo("im not ready");
ok(0, "quux");
ok(1, "thud");
ok(1, "wombat");
- endtodo;
+ end_todo;
done_testing();
}
View
2 tap.c
@@ -262,7 +262,7 @@ todof (int ignore, const char *fmt, ...) {
}
void
-endtodof () {
+end_todof () {
free(todo_mesg);
todo_mesg = NULL;
}
View
6 tap.h
@@ -40,7 +40,7 @@ int note (const char *fmt, ...);
int exit_status (void);
void skippy (int n, const char *fmt, ...);
void todof (int ignore, const char *fmt, ...);
-void endtodof (void);
+void end_todof (void);
#define NO_PLAN -1
#define SKIP_ALL -2
@@ -55,10 +55,10 @@ void endtodof (void);
#define fail(...) ok(0, "" __VA_ARGS__)
#define skip(test, ...) do {if (test) {skippy(__VA_ARGS__, NULL); break;}
-#define endskip } while (0)
+#define end_skip } while (0)
#define todo(...) todof(0, "" __VA_ARGS__, NULL)
-#define endtodo endtodof()
+#define end_todo end_todof()
#define dies_ok(...) dies_ok_common(1, __VA_ARGS__)
#define lives_ok(...) dies_ok_common(0, __VA_ARGS__)

0 comments on commit 0e45669

Please sign in to comment.