Ignore:
Timestamp:
Jul 7, 2010, 8:19:22 PM (12 years ago)
Author:
Peter
Message:

refs #635. fix return type (int) in compare_3way and add some more test for Segment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/segment_test.cc

    r2293 r2294  
    8888  suite.add(segment14.end()==2);
    8989
     90  if (!suite.add(compare(Segment<double>(0,2), Segment<double>(3,4))))
     91    suite.err() << "error: compare: expected 1\n";
     92  if (!suite.add(compare_3way(Segment<double>(0,2), Segment<double>(3,4))==-1))
     93    suite.err() << "error: compare_3way: expected -1\n";
     94
     95  if (!suite.add(compare(Segment<double>(0,2), Segment<double>(1,2))==false))
     96    suite.err() << "error: compare: expected 0\n";
     97  if (!suite.add(compare_3way(Segment<double>(0,2), Segment<double>(1,2))==0))
     98    suite.err() << "error: compare_3way: expected 0\n";
     99
     100  if (!suite.add(compare(Segment<double>(3,4), Segment<double>(0,2))==false))
     101    suite.err() << "error: compare: expected 0\n";
     102  if (!suite.add(compare_3way(Segment<double>(3,4), Segment<double>(0,2))==1))
     103    suite.err() << "error: compare_3way: expected 1\n";
     104
    90105  return suite.return_value();
    91106}
Note: See TracChangeset for help on using the changeset viewer.