skip_all.t.c

Sometimes, you skip an entire test because it's testing a feature that doesn't exist on the system that you're testing. To skip an entire test, use the skip_all() function according to this example.

00001 
00002 #include <stdlib.h>
00003 #include <tap.h>
00004 
00005 int has_feature() {
00006   return 0;
00007 }
00008 
00009 /*
00010   In some cases, an entire test file does not make sense because there
00011   some feature is missing.  In that case, the entire test case can be
00012   skipped in the following manner.
00013  */
00014 int main() {
00015   if (!has_feature())
00016     skip_all("Example of skipping an entire test");
00017   plan(4);
00018   ok(1, NULL);
00019   ok(1, NULL);
00020   ok(1, NULL);
00021   ok(1, NULL);
00022   return exit_status();
00023 }

Generated on Fri Oct 20 21:13:28 2006 by  doxygen 1.4.6