[Kst] Test Failures
C. Barth Netterfield
netterfield at physics.utoronto.ca
Wed Aug 6 00:48:48 CEST 2003
On Tuesday 29 July 2003 10:23 pm, George Staikos wrote:
> On Tuesday 29 July 2003 22:14, George Staikos wrote:
> > Here's what I have with test failures so far:
> >
> > Test 139 failed. Expected [-1.000000], received [-0.923256].
> > Test 140 failed. Expected [-1.000000], received [-0.995349].
> >
> > These two are the same thing. I create a vector [-1,-1] with multiple
> > entries. It seems to create junk.
>
> Of course I see what the problem is:
>
> if (x0 == x1) {
> x1 = x0 + 0.1;
> }
>
> Is this really the best solution?
No. the users of the max/min (eg, kstplot, etc) should test for this, not the
vector or the curve.
> > Test 169 failed. Expected [false], received [true].
> > Test 170 failed. Expected [2], received [1].
> > Test 172 failed. Expected [2], received [1].
> > Test 174 failed. Expected [2], received [1].
> >
> > Resize a vector to have 1 element. Should vectors be required to be of
> > size 2 or more? I think so, but it allowed me to resize it to 1 element.
>
> Fixed.
I think 2 or longer should be required.
> > Test 190 failed. Expected [0.000000], received
> > [169375571823246276118412143177423971997862046060116317664063127310251159
> >94
> > 8000913472114443127943090938824465818430574772384589524006761832051110164
> >828 73548810025299145274674725388750178746368.000000]. Test 191 failed.
> > Expected [0.000000], received
> > [327457236244772341646187239693427859555235669941905248266104612481069581
> >24
> > 9502727412370575282733564558350109714171031111122814032152421826285026759
> >862 39290734548578982017915420672.000000].
> >
> > These ones are fun. I resized a vector from 3->5 elements, and elements
> > 4 and 5 looked like this.
>
> Basically it's uninitialised memory, but I think it would be a good idea
> to initialise it to 0. What do you think?
I guess so.... when do we do this? We really shouldn't I would think; so
setting to 0 is good.
More information about the Kst
mailing list