| 260 | // Debugging checks |
| 261 | |
| 262 | void ContractionState::Check() const { |
| 263 | #ifdef CHECK_CORRECTNESS |
| 264 | for (int vline = 0; vline < LinesDisplayed(); vline++) { |
| 265 | const int lineDoc = DocFromDisplay(vline); |
| 266 | PLATFORM_ASSERT(GetVisible(lineDoc)); |
| 267 | } |
| 268 | for (int lineDoc = 0; lineDoc < LinesInDoc(); lineDoc++) { |
| 269 | const int displayThis = DisplayFromDoc(lineDoc); |
| 270 | const int displayNext = DisplayFromDoc(lineDoc + 1); |
| 271 | const int height = displayNext - displayThis; |
| 272 | PLATFORM_ASSERT(height >= 0); |
| 273 | if (GetVisible(lineDoc)) { |
| 274 | PLATFORM_ASSERT(GetHeight(lineDoc) == height); |
| 275 | } else { |
| 276 | PLATFORM_ASSERT(0 == height); |
| 277 | } |
| 278 | } |
| 279 | #endif |
| 280 | } |
nothing calls this directly
no outgoing calls
no test coverage detected