Ignore:
Timestamp:
Aug 9, 2006, 11:36:31 PM (17 years ago)
Author:
Jari Häkkinen
Message:

Removed test/parser.cc and test/stats.cc. These tests are an essential
part in the test/directory.cc and test/file.cc, and thus redundant.
Fixed the other tests to actually report success or failure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/gnuplot_pipe.cc

    r119 r145  
    3030  using namespace theplu;
    3131
    32   bool ok = true;
     32  bool ok = false; // false indicates success, i.e., no errors detected.
    3333
    3434  std::vector<double> x,y;
     
    3939
    4040  svnstat::Gnuplot gnuplot1;
    41   gnuplot1.command("set output 'test1.png'; set term png ; set title 'sine'");
    42   gnuplot1.command("plot sin(x) title 'sine of x' with lines");
     41  ok|=gnuplot1.command("set output 'test1.png'; set term png ; set title 'sine'");
     42  ok|=gnuplot1.command("plot sin(x) title 'sine of x' with lines");
    4343
    4444  svnstat::Gnuplot gnuplot2;
    45   gnuplot2.command("set output 'test2.png'; set term png");
    46   gnuplot2.plot(x);
     45  ok|=gnuplot2.command("set output 'test2.png'; set term png");
     46  ok|=gnuplot2.plot(x);
    4747
    4848  svnstat::Gnuplot gnuplot3;
    49   gnuplot3.command("set output 'test3.png'; set term png");
     49  ok|=gnuplot3.command("set output 'test3.png'; set term png");
    5050  gnuplot3.linetitle("parabola");
    51   gnuplot3.plot(x,y);
    52   gnuplot3.command("set output 'test4.png'");
    53   gnuplot3.command("set title 'ddddd'");
     51  ok|=gnuplot3.plot(x,y);
     52  ok|=gnuplot3.command("set output 'test4.png'");
     53  ok|=gnuplot3.command("set title 'ddddd'");
    5454  //gnuplot3.linestyle("linespoints");
    5555  gnuplot3.linetitle("bajs");
    56   gnuplot3.plot(x);
     56  ok|=gnuplot3.plot(x);
    5757
    5858  /*
     
    6767  */
    6868
    69   return (ok ? 0 : -1);
     69  return ok;
    7070}
Note: See TracChangeset for help on using the changeset viewer.