Changeset 393 for trunk/test/matrix_test.cc
- Timestamp:
- Sep 14, 2005, 8:25:03 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/matrix_test.cc
r301 r393 6 6 #include <iostream> 7 7 8 int main() 9 8 int main(const int argc,const char* argv[]) 10 9 { 11 10 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 12 19 bool ok = true; 13 20 … … 27 34 ok=false; 28 35 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; 31 42 } 32 return -1; 43 44 45 if (error!=&std::cerr) 46 delete error; 47 48 return (ok ? 0 : -1); 33 49 34 50 }
Note: See TracChangeset
for help on using the changeset viewer.