| 10116 | } |
| 10117 | |
| 10118 | void TrackerBase::close() { |
| 10119 | |
| 10120 | // Close any still open children (e.g. generators) |
| 10121 | while (&m_ctx.currentTracker() != this) |
| 10122 | m_ctx.currentTracker().close(); |
| 10123 | |
| 10124 | switch (m_runState) { |
| 10125 | case NeedsAnotherRun: |
| 10126 | break; |
| 10127 | |
| 10128 | case Executing: |
| 10129 | m_runState = CompletedSuccessfully; |
| 10130 | break; |
| 10131 | case ExecutingChildren: |
| 10132 | if (m_children.empty() || m_children.back()->isComplete()) |
| 10133 | m_runState = CompletedSuccessfully; |
| 10134 | break; |
| 10135 | |
| 10136 | case NotStarted: |
| 10137 | case CompletedSuccessfully: |
| 10138 | case Failed: |
| 10139 | CATCH_INTERNAL_ERROR("Illogical state: " << m_runState); |
| 10140 | |
| 10141 | default: |
| 10142 | CATCH_INTERNAL_ERROR("Unknown state: " << m_runState); |
| 10143 | } |
| 10144 | moveToParent(); |
| 10145 | m_ctx.completeCycle(); |
| 10146 | } |
| 10147 | void TrackerBase::fail() { |
| 10148 | m_runState = Failed; |
| 10149 | if (m_parent) |
no test coverage detected