Ignore:
Timestamp:
Sep 25, 2008, 8:24:28 PM (13 years ago)
Author:
Peter
Message:

fixed some bugs in DataWeight?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/data_weight_test.cc

    r1487 r1534  
    3636  DataWeight x;
    3737  x.data()=3.14;
    38   suite.add(x.data()==3.14);
    39   suite.add(x.weight()==1.0);
     38  suite.add(suite.equal(x.data(),3.14));
     39  suite.add(suite.equal(x.weight(),1.0));
    4040  DataWeight y(3.14);
    4141  y = DataWeight(3.14, 0.1);
    42   suite.add(x==y);
    43   suite.add(! (x!=y) );
    44   suite.add(! (x<y) );
    45   suite.add(! (x>y) );
    46   suite.add(x<=y);
    47   suite.add(x>=y);
     42  suite.add(suite.equal(x.data(), y.data()));
     43  if (!suite.add(x==y))
     44    suite.err() << "operator==\n";
     45  if (!suite.add(! (x!=y) ))
     46    suite.err() << "operator!=\n";
     47  if (!suite.add(! (x<y) ))
     48    suite.err() << "operator<\n";
     49  if (!suite.add(! (x>y) ))
     50    suite.err() << "operator>\n";
     51  if (!suite.add(x<=y))
     52    suite.err() << "operator<=\n";
     53  if (!suite.add(x>=y))
     54    suite.err() << "operator>=\n";
     55
    4856  DataWeight z(y);
    4957
    50   suite.return_value();
     58  return suite.return_value();
    5159}
Note: See TracChangeset for help on using the changeset viewer.