octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: missing tests


From: Markus Appel
Subject: Re: missing tests
Date: Thu, 16 Jan 2014 17:17:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 01/16/2014 12:46 PM, Carnë Draug wrote:
>
> The tests look good to me, and quite extensive. I would add some to
> matrices as well, not only scalars. Example:
>
> %!test
> %! a = b = randi ([-1000 1000], 10, 15, 14, 78);
> %! b(b>255) = 255;
> %! b(b<0) = 0;
> %! assert (cast (a, "uint8"), uint8 (b));
>
> Similarly, you could test that scalars works fine with one example,
> and then all the other possibilities (complex numbers, above and below
> the range, etc) in a matrix with a single test.
>
> Carnë
Do you think that it is (in general) a good idea to use anything
randomized in tests?
If a check fails and needs to be examined, I would expect that exactly
the same stuff gets tested every time I run it.

Markus


reply via email to

[Prev in Thread] Current Thread [Next in Thread]