| 119 | |
| 120 | template <class T> |
| 121 | void |
| 122 | testMakeEmpty (const char* type) |
| 123 | { |
| 124 | cout << " makeEmpty() for type " << type << endl; |
| 125 | |
| 126 | // |
| 127 | // Empty box |
| 128 | // |
| 129 | { |
| 130 | IMATH_INTERNAL_NAMESPACE::Box<T> b; |
| 131 | b.makeEmpty (); |
| 132 | assert ( |
| 133 | b.min == T (T::baseTypeMax ()) && |
| 134 | b.max == T (T::baseTypeLowest ())); |
| 135 | } |
| 136 | |
| 137 | // |
| 138 | // Non-empty, has volume |
| 139 | // |
| 140 | { |
| 141 | IMATH_INTERNAL_NAMESPACE::Box<T> b (T (-1), T (1)); |
| 142 | b.makeEmpty (); |
| 143 | assert ( |
| 144 | b.min == T (T::baseTypeMax ()) && |
| 145 | b.max == T (T::baseTypeLowest ())); |
| 146 | } |
| 147 | |
| 148 | // |
| 149 | // Non-empty, no volume |
| 150 | // Boxes are: |
| 151 | // 2D: [(0, 0), (0, 1) ] |
| 152 | // 3D: [(0, 0, 0), (0, 0, 1) ] |
| 153 | // 4D: [(0, 0, 0, 0), (0, 0, 0, 1)] |
| 154 | // |
| 155 | { |
| 156 | T min (0); |
| 157 | T max (0); |
| 158 | max[T::dimensions () - 1] = 1; |
| 159 | |
| 160 | IMATH_INTERNAL_NAMESPACE::Box<T> b (min, max); |
| 161 | b.makeEmpty (); |
| 162 | assert ( |
| 163 | b.min == T (T::baseTypeMax ()) && |
| 164 | b.max == T (T::baseTypeLowest ())); |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | template <class T> |
| 169 | void |
nothing calls this directly
no test coverage detected