MCPcopy Index your code
hub / github.com/endbasic/endbasic / labels_for

Function labels_for

core/tests/testutils/mod.rs:327–347  ·  view source on GitHub ↗

Obtains the section markers to use when writing out the data of `test`.

(test: &Test)

Source from the content-addressed store, hash-verified

325
326/// Obtains the section markers to use when writing out the data of `test`.
327fn 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.

Callers 1

regenerateFunction · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected