| 20 | // ---------------------------------------------------------------------------------------- |
| 21 | |
| 22 | bool order_rects ( |
| 23 | const rectangle& a, |
| 24 | const rectangle& b |
| 25 | ) |
| 26 | { |
| 27 | if (a.left() < b.left()) return true; |
| 28 | else if (a.left() > b.left()) return false; |
| 29 | |
| 30 | if (a.right() < b.right()) return true; |
| 31 | else if (a.right() > b.right()) return false; |
| 32 | |
| 33 | if (a.top() < b.top()) return true; |
| 34 | else if (a.top() > b.top()) return false; |
| 35 | |
| 36 | if (a.bottom() < b.bottom()) return true; |
| 37 | else if (a.bottom() > b.bottom()) return false; |
| 38 | |
| 39 | return false; |
| 40 | } |
| 41 | |
| 42 | void run_test( |
| 43 | const int num |