Obtains the section markers to use when writing out the data of `test`.
(test: &Test)
| 325 | |
| 326 | /// Obtains the section markers to use when writing out the data of `test`. |
| 327 | fn labels_for(test: &Test) -> Labels { |
| 328 | if test.sources.len() > 1 { |
| 329 | Labels { |
| 330 | source: "## Source (partial)", |
| 331 | disassembly: "## Disassembly (full)", |
| 332 | compiler_errors: "## Compiler errors (partial)", |
| 333 | exit_code: "## Exit code (partial)", |
| 334 | output: "## Output (partial)", |
| 335 | runtime_errors: "## Runtime errors (partial)", |
| 336 | } |
| 337 | } else { |
| 338 | Labels { |
| 339 | source: "## Source", |
| 340 | disassembly: "## Disassembly", |
| 341 | compiler_errors: "## Compilation errors", |
| 342 | exit_code: "## Exit code", |
| 343 | output: "## Output", |
| 344 | runtime_errors: "## Runtime errors", |
| 345 | } |
| 346 | } |
| 347 | } |
| 348 | |
| 349 | /// Generates a textual diff of `golden` and `generated`. The output is meant to be useful for |
| 350 | /// human consumption when a test fails and is not guaranteed to be in patch format. |