* John W. Eaton <j...@jweaton.org> [2009-06-17 14:24]: > Are you sure you would want this? It won't tell you if the printing > is correct without manual inspection, and will clutter the output from > running "make check" with > > src/pr-output.cc .......................................ans = 0 + 0i > ans = 0 + Infi > ans = 0 - Infi > ans = 0 + NaNi > ans = Inf + 0i > ans = Inf + Infi > ans = Inf - Infi > ans = Inf + NaNi > ans = -Inf + 0i > ans = -Inf + Infi > ans = -Inf - Infi > ans = -Inf + NaNi > ans = NaN + 0i > ans = NaN + Infi > ans = NaN - Infi > ans = NaN + NaNi > PASS 1/1 > > Is there another way to test this without printing the output to the > sreen? Maybe use fdisp to put the output in a file and then compare > the contents of the file to some expected value?
That would be surely better. Actually, in the specific case I had in mind (NaN problem on mips/mipsel) there would be no need to compare the output, just to exercise the code in pr-output.cc. So, the test could be, for now: /* %!test %! format short %! file = tempname () %! fd = fopen (file) %! for r = [0, Inf -Inf, NaN] %! for i = [0, Inf -Inf, NaN] %! fdisp (fd, complex (r, i)) %! endfor %! endfor %! fclose (fd) %! unlink (file) */ -- Rafael -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org