automated (or otherwise) tests for graphics code?

Ben Abbott bpabbott at mac.com
Thu Oct 16 14:51:10 CDT 2008


On Thursday, October 16, 2008, at 03:31PM, "John W. Eaton" <jwe at bevo.che.wisc.edu> wrote:
>On 16-Oct-2008, Ben Abbott wrote:
>
>| There have been some instances of coding errors respecting the
>| graphics sources recently. These bugs could be identified by running
>| tests/demos where no graphics are produced. Might the rundemos()
>| script be able to run in that way and be added to "make check"?
>
>If there are tests that can be done that don't require visual
>inspection, then please add them.  But they should be done with
>%!test, %!assert, %!fail, etc., not %!demo.
>
>jwe

hmmm, ok.

What I was thinking of was a way to hide the figures and run the demos. Any "assert" would be superfluous. 
For example, sombero.m might contain a test

%!test
%! figure (1)
%! set (gcf, "visibility", "off")
%! sombrero
%! colorbar
%! shading interp
%! shading flat
%! shading facted
%! assert (true)

That certainly is the kind of "test" that is usually done, as it is a like firing a gun into the darkness and hoping to hit the boogie man. While I hesitate to suggest such, I thought I'd mention it.

Ben




More information about the Octave-maintainers mailing list