Changeset 620 for trunk/test/averager_test.cc
 Timestamp:
 Sep 4, 2006, 5:16:57 PM (16 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/averager_test.cc
r617 r620 51 51 } 52 52 53 Averager* a1 = new Averager(1+3+5,1+9+25,3); 53 54 Averager* a1 = new Averager(1.0+3+5,1.0+9+25,3); 54 55 if (!equal(a,*a1)){ 55 56 ok=false; 56 std::cout << a.sum_x() << std::endl; 57 std::cout << a.sum_xx() << std::endl; 58 std::cout << a.n() << std::endl; 59 std::cout << a.variance() << std::endl; 60 std::cout << a.mean() << std::endl; 61 std::cout << a1>sum_x() << std::endl; 62 std::cout << a1>sum_xx() << std::endl; 63 std::cout << a1>n() << std::endl; 64 std::cout << a1>variance() << std::endl; 65 std::cout << a1>mean() << std::endl; 57 std::cout.precision(25); 58 std::cout << equal(a,*a1) << std::endl; 59 std::cout << a.sum_x() << '\t' << a1>sum_x() << std::endl; 60 std::cout << a.sum_xx() << '\t' << a1>sum_xx() << std::endl; 61 std::cout << a.n() << '\t' << a1>n() << std::endl; 62 std::cout << a.variance() << '\t' << a1>variance() << std::endl; 63 std::cout << a.mean() << '\t' << a1>mean() << std::endl; 66 64 std::cout << a.mean()  a1>mean() << std::endl; 67 65 std::cout << a.variance()  a1>variance() << std::endl; 68 *error << "error: Averager( const double x,const double xx,constlong n)\n";66 *error << "error: Averager(double x, double xx, u_long n)\n"; 69 67 } 70 68 delete a1; … … 208 206 bool equal(const Averager& a, const Averager& b) 209 207 { 210 // 208 // std::cout << (a.n()==b.n()) << std::endl; 211 209 // std::cout << (a.mean()==b.mean()) << std::endl; 212 210 // std::cout << (a.variance()==b.variance()) << std::endl;
Note: See TracChangeset
for help on using the changeset viewer.