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

Function src_path

core/tests/testutils/mod.rs:34–42  ·  view source on GitHub ↗

Computes the path to the source file `name`.

(name: &str)

Source from the content-addressed store, hash-verified

32
33/// Computes the path to the source file `name`.
34pub(super) fn src_path(name: &str) -> PathBuf {
35 let dir =
36 Path::new(env!("CARGO_MANIFEST_DIR")).parent().expect("Failed to get parent directory");
37
38 // Sanity-check that we landed in the right location.
39 assert!(dir.join("Cargo.lock").exists());
40
41 dir.join(name)
42}
43
44/// A parsed test case from a golden data file.
45#[derive(Debug, Eq, PartialEq)]

Callers 2

run_one_testFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected