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

Function add_test

core/tests/testutils/mod.rs:64–74  ·  view source on GitHub ↗
(tests: &mut Tests, name: String, sources: Vec<String>)

Source from the content-addressed store, hash-verified

62 let reader = BufReader::new(file);
63
64 fn add_test(tests: &mut Tests, name: String, sources: Vec<String>) -> io::Result<()> {
65 if sources.is_empty() {
66 Err(io::Error::new(
67 io::ErrorKind::InvalidData,
68 format!("Test case '{}' has no Source section", name),
69 ))
70 } else {
71 tests.push(Test { name, sources });
72 Ok(())
73 }
74 }
75
76 fn finish_source(sources: &mut Vec<String>, source: &mut Option<String>) {
77 if let Some(source) = source.take() {

Callers 1

read_sourcesFunction · 0.85

Calls 2

pushMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected