[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automated (or otherwise) tests for graphics code?
From: |
Ben Abbott |
Subject: |
Re: automated (or otherwise) tests for graphics code? |
Date: |
Thu, 16 Oct 2008 16:13:06 -0400 |
On Thursday, October 16, 2008, at 03:59PM, "David Bateman" <address@hidden>
wrote:
>Ben Abbott wrote:
>> On Thursday, October 16, 2008, at 03:31PM, "John W. Eaton" <address@hidden>
>> 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.
>>
>
>Such a test would at least prove that something was plotted and so would
>isolate some of the issues, so I'd say it was worth it. However, I'd say
>you need to restore the visibility property to its initial value before
>the final assert as otherwise future plots will disappear.
>
>D.
If the figure is closed before the assert, would that do the trick?
Ben
- Re: automated (or otherwise) tests for graphics code?, (continued)
Re: automated (or otherwise) tests for graphics code?, Dmitri A. Sergatskov, 2008/10/16
Re: automated (or otherwise) tests for graphics code?, Ben Abbott, 2008/10/18
Re: automated (or otherwise) tests for graphics code?, Ben Abbott, 2008/10/16
Re: automated (or otherwise) tests for graphics code?, Ben Abbott, 2008/10/16