Mercurial > octave-nkf
comparison scripts/testfun/assert.m @ 10793:be55736a0783
Grammarcheck the documentation from m-files.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 18 Jul 2010 20:35:16 -0700 |
parents | 95c3e38098bf |
children | a4f482e66b65 |
comparison
equal
deleted
inserted
replaced
10792:91342260063e | 10793:be55736a0783 |
---|---|
15 ## You should have received a copy of the GNU General Public License | 15 ## You should have received a copy of the GNU General Public License |
16 ## along with Octave; see the file COPYING. If not, see | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | 17 ## <http://www.gnu.org/licenses/>. |
18 | 18 |
19 ## -*- texinfo -*- | 19 ## -*- texinfo -*- |
20 ## @deftypefn {Function File} {} assert (@var{cond}) | 20 ## @deftypefn {Function File} {} assert (@var{cond}) |
21 ## @deftypefnx {Function File} {} assert (@var{cond}, @var{errmsg}, @dots{}) | 21 ## @deftypefnx {Function File} {} assert (@var{cond}, @var{errmsg}, @dots{}) |
22 ## @deftypefnx {Function File} {} assert (@var{cond}, @var{msg_id}, @var{errmsg}, @dots{}) | 22 ## @deftypefnx {Function File} {} assert (@var{cond}, @var{msg_id}, @var{errmsg}, @dots{}) |
23 ## @deftypefnx {Function File} {} assert (@var{observed},@var{expected}) | 23 ## @deftypefnx {Function File} {} assert (@var{observed},@var{expected}) |
24 ## @deftypefnx {Function File} {} assert (@var{observed},@var{expected},@var{tol}) | 24 ## @deftypefnx {Function File} {} assert (@var{observed},@var{expected},@var{tol}) |
25 ## | 25 ## |
40 ## observed and expected can be strings, scalars, vectors, matrices, | 40 ## observed and expected can be strings, scalars, vectors, matrices, |
41 ## lists or structures. | 41 ## lists or structures. |
42 ## | 42 ## |
43 ## @item assert(@var{observed}, @var{expected}, @var{tol}) | 43 ## @item assert(@var{observed}, @var{expected}, @var{tol}) |
44 ## Accept a tolerance when comparing numbers. | 44 ## Accept a tolerance when comparing numbers. |
45 ## If @var{tol} is positive use it as an absolute tolerance, will produce an error if | 45 ## If @var{tol} is positive use it as an absolute tolerance, will produce an |
46 ## error if | |
46 ## @code{abs(@var{observed} - @var{expected}) > abs(@var{tol})}. | 47 ## @code{abs(@var{observed} - @var{expected}) > abs(@var{tol})}. |
47 ## If @var{tol} is negative use it as a relative tolerance, will produce an error if | 48 ## If @var{tol} is negative use it as a relative tolerance, will produce an |
49 ## error if | |
48 ## @code{abs(@var{observed} - @var{expected}) > abs(@var{tol} * @var{expected})}. | 50 ## @code{abs(@var{observed} - @var{expected}) > abs(@var{tol} * @var{expected})}. |
49 ## If @var{expected} is zero @var{tol} will always be used as an absolute tolerance. | 51 ## If @var{expected} is zero @var{tol} will always be used as an absolute |
52 ## tolerance. | |
50 ## @end table | 53 ## @end table |
51 ## @seealso{test} | 54 ## @seealso{test} |
52 ## @end deftypefn | 55 ## @end deftypefn |
53 | 56 |
54 ## FIXME: Output throttling: don't print out the entire 100x100 matrix, | 57 ## FIXME: Output throttling: don't print out the entire 100x100 matrix, |