Generate the `Report` for: ```text P 1 │ ▼ P 2 │ ▼ C 1 │ ▼ ┌───P 3───┐ │ │ ▼ ▼ P 4 P 5 │ │ ▼ ▼ C 2 C 10 │ │ ▼ ▼ P 6 P 7 │ │ ▼ ▼ root error 1 C 3 │ ▼ P 8 │ ▼ ┌─────────────────P 9─────────────────┬─────────────┐ │ │ │ │ │ │ │
()
| 163 | /// |
| 164 | /// Legend: `P = Printable`, `C = Context`. |
| 165 | fn create_sources_nested() -> Report<ContextA> { |
| 166 | let r4 = create_report() |
| 167 | .change_context(ContextA(5)) |
| 168 | .attach("15") |
| 169 | .attach("14"); |
| 170 | |
| 171 | let r6 = create_report() |
| 172 | .change_context(ContextA(7)) |
| 173 | .change_context(ContextA(6)) |
| 174 | .attach("12"); |
| 175 | |
| 176 | let r5 = create_report().change_context(ContextA(9)).attach("11"); |
| 177 | |
| 178 | let mut r3 = create_report() |
| 179 | .change_context(ContextA(8)) |
| 180 | .attach("13") |
| 181 | .expand(); |
| 182 | |
| 183 | r3.push(r4); |
| 184 | let r3 = r3.attach("10").attach("16"); |
| 185 | |
| 186 | let mut r2 = create_report().change_context(ContextA(4)).expand(); |
| 187 | |
| 188 | r2.append(r3); |
| 189 | r2.push(r5); |
| 190 | r2.push(r6); |
| 191 | |
| 192 | let r2 = r2 |
| 193 | .attach("9") |
| 194 | .attach("8") |
| 195 | .change_context(ContextA(3)) |
| 196 | .attach("7") |
| 197 | .change_context(ContextA(10)) |
| 198 | .attach("5"); |
| 199 | |
| 200 | let mut r1 = create_report() |
| 201 | .attach("6") |
| 202 | .change_context(ContextA(2)) |
| 203 | .attach("4") |
| 204 | .expand(); |
| 205 | |
| 206 | r1.push(r2); |
| 207 | |
| 208 | r1.attach("3") |
| 209 | .change_context(ContextA(1)) |
| 210 | .attach("2") |
| 211 | .attach("1") |
| 212 | } |
| 213 | |
| 214 | /// This is the main test, to test all different parts at once, |
| 215 | /// and demonstrates that the rendering algorithm works at arbitrary depth. |
no test coverage detected