Mercurial > octave-nkf
view .hgsub @ 17250:afd235a206a2
Allow vector/matrix tolerance and improve error messages for assert.m script
* assert.m
(assert): Document non-scalar tolerance option. Remove FIXME about format of
output. Remove 'coda' and 'iserror' spanning whole routine. Use structure
'err.index/expected/observed/reason' to keep track of multiple results and
recursions. Add persistent variables 'errmsg', 'assert_call_depth' and
'assert_error_occurred' to allow recursions and print only when all complete.
Place output formating in pprint() function. Construct vector tolerance from
scalar tolerance. Add test illustrating recursions and multiple tables. Add
test illustrating variable tolerance. Add test illustrating multidimensional
matrices. Remove looping for constructing error information. Add thorough
tests for exceptional values by checking both real and imaginary. Place zeros
where exceptional values exist in real and imaginary parts of the two matrices.
Add tests illustrating exceptional values in real and/or imaginary part and
numerical mismatch in the other part.
(construct_indeces): Format linear indexing as tuple indexing, vectors (#),
scalars ().
(pprint): Sub function to format and print input command, index of failure,
expected and observed values at failure, and the reason for failure.
author | Daniel J Sebald <daniel.sebald@ieee.org> |
---|---|
date | Mon, 12 Aug 2013 15:44:40 -0500 |
parents | 44f30dcd87e0 |
children |