diff doc/interpreter/testfun.txi @ 6728:a25173d58101

[project @ 2007-06-14 21:10:48 by jwe]
author jwe
date Thu, 14 Jun 2007 21:10:48 +0000
parents 6bf56668b01a
children aff0c76321aa
line wrap: on
line diff
--- a/doc/interpreter/testfun.txi	Thu Jun 14 20:47:47 2007 +0000
+++ b/doc/interpreter/testfun.txi	Thu Jun 14 21:10:48 2007 +0000
@@ -32,7 +32,7 @@
 
 @example
 @group
-   %!test error("this test fails!");
+   %!test error ("this test fails!");
    %!test "this test doesn't fail since it doesn't generate an error";
 @end group
 @end example
@@ -41,7 +41,7 @@
 
 @example
 @group
-     ***** test error('this test fails!')
+     ***** test error ('this test fails!')
    !!!!! test failed
    this test fails!
 @end group
@@ -109,6 +109,19 @@
    %!test assert (@dots{})
 @end example
 
+Sometimes during development there is a test that should work but is
+known to fail.  You still want to leave the test in because when the
+final code is ready the test should pass, but you may not be able to
+fix it immediately.  To avoid unecessary bug reports for these known
+failures, mark the block with @code{xtest} rather than @code{test}:
+
+@example
+   %!xtest error ("This test is known to fail.")
+@end example
+
+Another use of @code{xtest} is for statistical tests which should
+pass most of the time but are known to fail occasionally.
+
 Each block is evaluated in its own function environment, which means
 that variables defined in one block are not automatically shared
 with other blocks.  If you do want to share variables, then you