Changeset 393


Ignore:
Timestamp:
Sep 14, 2005, 8:25:03 PM (16 years ago)
Author:
Peter
Message:

extended test of matrix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/matrix_test.cc

    r301 r393  
    66#include <iostream>
    77
    8 int main()
    9 
     8int main(const int argc,const char* argv[])
    109
    1110  using namespace theplu;
     11  std::ostream* error;
     12  if (argc>1 && argv[1]==std::string("-p"))
     13    error = &std::cerr;
     14  else
     15    error = new std::ofstream("/dev/null");
     16
     17  *error << "testing matrix" << std::endl;
     18
    1219  bool ok = true;
    1320
     
    2734    ok=false;
    2835
    29   if (ok) {
    30     return 0;
     36  gslapi::matrix m4(3,3,1);
     37  m4 *= 9;
     38 
     39  if (m4!=m){
     40    ok=false;
     41    *error << "error operator*=(double)" << std::endl;
    3142  }
    32   return -1;
     43
     44
     45  if (error!=&std::cerr)
     46    delete error;
     47
     48  return (ok ? 0 : -1);
    3349
    3450}
Note: See TracChangeset for help on using the changeset viewer.